[flashrom] [PATCH] Kill hardcoded block erase on ICH SPI

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Nov 25 01:52:03 CET 2009


On 24.11.2009 18:47, Adam Jurkowski wrote:
> Sorry for not posting to your original post, but I don't have it on my 
> inbox...
>   

No problem.

> 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.
>   

My current plan is to pick one of the blockwise flashing functions in
chip code, make it generic and call chip drivers from the generic code.
That way, chip drivers only have to provide a function which writes a
single block and a function which erases a single block, and the generic
code will walk each erase block and do the right thing (call
erase_block_foo and write_block_foo). That will simplify the chip
drivers a lot.

Regards,
Carl-Daniel

-- 
Developer quote of the month: 
"We are juggling too many chainsaws and flaming arrows and tigers."





More information about the flashrom mailing list