[coreboot] flashrom: simplify ich spi read/write operations

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Nov 26 02:17:50 CET 2008

On 25.11.2008 06:15, FENG Yu Ning wrote:
> This patch simplifies ich spi read/write operations, and changes
> naming from "page" to "block".

Can you change the naming to "chunk"? "page" and "block" have meanings
which do not match the code very well.

> The impact of modification have been made minimal, other parts of
> flashrom should not be affected.

I think I saw a data sheet which stated that you may not read
arbitrarily large chunks of the chip. Although the current ICH SPI code
is not matching the design of the parallel flash chip drivers, your
change will effectively change the chunk size for reads.

There are some other architectural changes which look good at first, but
they are unneeded. Look at ich_spi_read_block and tell me why you want
block_size as a parameter. The block size should be stored in struct
flashchip and not be passed around separately.



More information about the coreboot mailing list