u-boot/drivers/dfu
Fabio Estevam f4c9258213 dfu: dfu_sf: Use the erase sector size for erase operations
SPI NOR flashes need to erase the entire sector size and we cannot pass
any arbitrary length for the erase operation.

To illustrate the problem:

Copying data from PC to DFU device
Download    [=========================] 100%       478208 bytes
Download done.
state(7) = dfuMANIFEST, status(0) = No error condition is present
state(10) = dfuERROR, status(14) = Something went wrong, but the
device does not know what it was
Done!

In this case, the binary has 478208 bytes and the M25P32 SPI NOR
has an erase sector of 64kB.

478208  = 7 entire sectors of 64kiB + 19456 bytes.

Erasing the first seven 64 kB sectors works fine, but when trying
to erase the remainding 19456 causes problem and the board hangs.

Fix the issue by always erasing with the erase sector size.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
2015-10-19 13:47:06 -04:00
..
dfu_mmc.c dfu: mmc: buffer file reads too 2015-09-11 17:15:23 -04:00
dfu_nand.c dfu: nand: Verify writes 2015-03-30 23:24:38 -05:00
dfu_ram.c dfu: defer parsing of device string to IO backend 2014-08-09 11:16:58 -04:00
dfu_sf.c dfu: dfu_sf: Use the erase sector size for erase operations 2015-10-19 13:47:06 -04:00
dfu_tftp.c dfu: tftp: update: Provide tftp support for the DFU subsystem 2015-09-07 13:41:04 +02:00
dfu.c dfu: mmc: buffer file reads too 2015-09-11 17:15:23 -04:00
Kconfig dfu: tftp: Kconfig: Add Kconfig entry for dfu tftp feature 2015-09-07 13:41:05 +02:00
Makefile dfu: tftp: update: Provide tftp support for the DFU subsystem 2015-09-07 13:41:04 +02:00