dfu: allow backend to specify a maximum buffer size
authorStephen Warren <swarren@nvidia.com>
Wed, 11 Jun 2014 22:03:34 +0000 (16:03 -0600)
committerTom Rini <trini@ti.com>
Sat, 9 Aug 2014 15:16:58 +0000 (11:16 -0400)
commit7ac1b410ac9b66150170718a6f807ce52ffd8400
tree1823b2c0b7926e258b371f43630d00769be657ca
parentdd64827eb60de9f71b1a1d6aecf488104cdd7b96
dfu: allow backend to specify a maximum buffer size

CONFIG_SYS_DFU_DATA_BUF_SIZE may be large to allow for FAT/ext layouts
to transfer large files. However, this means that individual write
operations will take a long time. Allow backends to specify a maximum
buffer size, so that each write operation is limited to a smaller data
block. This prevents the DFU protocol from timing out when e.g. writing
to SPI flash. I would guess that NAND might benefit from setting this
value too, but I can't test that.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
drivers/dfu/dfu.c
drivers/usb/gadget/f_thor.c
include/dfu.h