
From: Stephen Warren swarren@nvidia.com
Commit a4ed3b6 "sf: inline data constants" modified winbond.c's page_size from 256 to 4096. This prevents either/both of "sf write" writing the correct data, or "sf read" from reading the correct data back.
This allows U-Boot running on Compulab Tegra to upgrade itself.
Signed-off-by: Stephen Warren swarren@nvidia.com Cc: Mike Frysinger vapier@gentoo.org --- I'm not convinced there aren't other similar problems. At least eon.c's values don't make much sense to me; sector_size=256*16*16, yet total device size is just 256*16*nr_sectors. That was a pre-existing issue though. Another audit might make sense. This might be due to the apparent separation between page/sector/block, yet struct spi_flash only knowing about page and sectors, not blocks, leaving sf authors to wonder whether blocks are really sectors, or just to ignore blocks? --- drivers/mtd/spi/winbond.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c index 427b71f..1d90c1e 100644 --- a/drivers/mtd/spi/winbond.c +++ b/drivers/mtd/spi/winbond.c @@ -94,7 +94,7 @@ struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode) flash->write = spi_flash_cmd_write_multi; flash->erase = spi_flash_cmd_erase; flash->read = spi_flash_cmd_read_fast; - flash->page_size = 4096; + flash->page_size = 256; flash->sector_size = 4096; flash->size = 4096 * 16 * params->nr_blocks;