
On Monday 13 August 2012 18:46:21 Stephen Warren wrote:
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.
yeah, sorry about that. merged into my branch.
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.
yes, i get the feeling most spi drivers just copied an existing one, switched out some constants until it worked, and then moved on. i don't have an EON flashes, so i haven't looked too much.
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?
part of it is that SPI flashes themselves aren't constant in terms of what they call blocks, sectors, and pages. so people have to read the datasheet and try and coordinate the meanings in that with how the spi flash code represents things, and coordinate with the erase commands that get used. -mike