Sorry for not posting to your original post, but I don't have it on my inbox...
I would still use "spi_block_erase_d8()" on the flashes where it is defined but replaced hard-coded call with "flash->erase_block[n]()". However, erasing the whole flash is required if block_erasers is NULL. Then flash->erase() seems to fit better.
But maybe it's the solution for the future as the patch seems to work for all the boards at least.
best regards, Adam
On 2009-11-24 15:51, Maciej Pijanka wrote:
On Mon, 23 Nov 2009, Carl-Daniel Hailfinger wrote:
Kill hardcoded block erase on ICH SPI. The existing code does not work for all SPI chips, and it just was a band-aid to cope with locked down chipsets back in a time when there was no eraseblock infrastructure. Basically, this unbreaks a few SPI chips on ICH.
Looks sane for me, but i don't have any ICH/SPI hardware to check, idea seems to be right too, because it replace hardcoded one-of-erase-types with chip-based erase.
Acked-by: Maciej Pijanka maciej.pijanka@gmail.com
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-ich_spi_no_hardcoded_block_erase/ichspi.c
--- flashrom-ich_spi_no_hardcoded_block_erase/ichspi.c (Revision 769) +++ flashrom-ich_spi_no_hardcoded_block_erase/ichspi.c (Arbeitskop