[coreboot] PATCH: Add Spansion S25FL016A to flashrom

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Jan 24 16:57:35 CET 2008


On 24.01.2008 13:38, Peter Stuge wrote:
> I put a Spansion chip on a m57sli. This patch lets flashrom read the
> chip successfully. Writing is inconsistent.
>
> I've done two writes so far. Writing takes several minutes and I
> don't get any progress messages from flashrom.
>
> The first run was 4*coreboot.rom and that booted right away with VGA
> and all. Yay! The read back file matched the original file.
>   

As expected.

> Then I wrote rand.bin which is 2MB of /dev/random. This consistently
> reads back as something quite different from the original. See 8MB
> diff at http://stuge.se/m57sli/s25fl016a.diff (rand.bin and back.bin
> are there too)
>   

If the readback doesn't change between reads, the explanation may be
simple. Look at the bit pattern in rand.xxd and back.xxd. Note that
probably all bits which are set to 0 in rand.xxd are also 0 in back.xxd.
This looks like the chip was not erased between writing 4*coreboot.rom
and the random image.
Can you verify the chip is indeed blank after erase, and then flash the
random image again?

> +	{"S25FL016A",	SPANSION_ID,	SPANSION_S25FL016A,	2048, 256,
> +	 probe_spi,	generic_spi_chip_erase_c7,	over512k_spi_chip_write, over512k_spi_chip_read},
>   

You can use generic_spi_* instead of over512k_spi_*. The code is
intelligent enough to switch behaviour based on ROM chip size.


Regards,
Carl-Daniel




More information about the coreboot mailing list