]> git.sur5r.net Git - u-boot/commit
sf: Fix to compute proper sector_size
authorJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Mon, 27 Apr 2015 15:34:15 +0000 (21:04 +0530)
committerJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Tue, 28 Apr 2015 08:01:36 +0000 (13:31 +0530)
commitc650ca7b4c160193791dc7a52381c71c6a29e871
treec6a76664fb5224df2a35bc6f2d74991fcd20c69f
parent074eed5146acc39a77f15ecdc8404b3ba74aa3ae
sf: Fix to compute proper sector_size

Upto now flash sector_size is assigned from params which isn't
necessarily a sector size from vendor, so based on the SECT_*
flags from flash_params the erase_size will compute and it will
become the sector_size finally.

Bug report (from Bin Meng):
=> sf probe
SF: Detected SST25VF016B with page size 256 Bytes, erase size 4 KiB,
total 2 MiB, mapped at ffe00000

=> sf erase 0 +100
SF: 65536 bytes @ 0x0 Erased: OK

Signed-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Reported-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
drivers/mtd/spi/sf_internal.h
drivers/mtd/spi/sf_probe.c