u-boot/drivers/dfu
Patrick Delaunay 2dc41fccf3 dfu: dfu_mtd: set max_buf_size to erasesize also for NOR devices
For NOR devices the logical DFU buffer size is the sector_size,
as it is done in dfu_sf.c or in spi/sf_mtd.c
(sf_mtd_info.erasesize = flash->sector_size)

For NAND the DFU size was already limited to erasesize as
has_pages = true.

So the mtd dfu backend can use this erasesize for all the MTD devices,
NOR and NAND with dfu->max_buf_size = mtd->erasesize

This difference was initially copied from MTD command, where
data is fully available in RAM without size limitation.

This patch avoids to have many sector write in dfu_mtd.c at the end
of the DFU transfer and avoids issues with USB timeout or WATCHDOG.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-06-18 10:09:41 +02:00
..
dfu.c dfu: add 'SCRIPT' entity 2021-01-31 14:08:56 +01:00
dfu_alt.c dfu: add dfu_write_by_alt() 2020-10-30 14:20:27 +01:00
dfu_mmc.c dfu: add 'SCRIPT' entity 2021-01-31 14:08:56 +01:00
dfu_mtd.c dfu: dfu_mtd: set max_buf_size to erasesize also for NOR devices 2021-06-18 10:09:41 +02:00
dfu_nand.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dfu_ram.c dfu: fix dfu tftp on sandbox 2020-09-01 14:47:43 +02:00
dfu_sf.c dfu: dfu_sf: avoid double free of SPI device 2021-03-25 20:15:30 +01:00
dfu_virt.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig usb: dfu: Migrate CONFIG_SYS_DFU_DATA_BUF_SIZE and CONFIG_SYS_DFU_MAX_FILE_SIZE to Kconfig 2021-06-08 21:38:53 -04:00
Makefile dfu: rename dfu_tftp_write() to dfu_write_by_name() 2020-10-30 14:20:27 +01:00