[coreboot] Add support for SPI-Chips on ICH9 to flash rom / please delete the last mail

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed May 14 06:34:39 CEST 2008

Hi Claus,

flashrom spi.c has been greatly restructured in the last few commits and
all IT87 specific routines have been moved to it87spi.c and useful
#defines have been moved to spi.h.
I hope spi.c is now a lot more clear and understandable. Can you check?
AFAICS we can reduce the amount of code in ichspi.c by ~50% or more if
we use the generic functions from spi.c.

I also merged some of your changes in flash.h (albeit at a different
place) and added dozens of ATMEL flash chip IDs to flash.h.

On 13.05.2008 17:52, Carl-Daniel Hailfinger wrote:
> Sorry, the patch Claus posted duplicates a lot of existing
> infrastructure because the existing SPI abstraction was not clearly
> visible. That means to support a SPI flash chip with ICH9 and any other
> chipset we have to add it twice to flashchips.c. I have posted 3 patches
> to improve the existing SPI abstraction and 2 of them have already been
> merged. Once the third patch is merged, I can eliminate all reasons for
> duplicate listings in flashcips.c with a fourth patch. I expect to have
> all patches merged tomorrow and then we can rework Claus' patch a bit more.
> Claus, if I don't find time until tomorrow to post a patch against your
> tree, can you look into using spi.h for some of your #defines? I'm
> thinking of these:
>> +#define SPI_ST_M25P_COMMAND_WRITE         0x02
>> +#define SPI_ST_M25P_COMMAND_READ          0x03
>> +#define SPI_ST_M25P_COMMAND_ERASE         0xd8
>> +#define SPI_ST_M25P_COMMAND_READ_STATUS   0x05
>> +#define SPI_ST_M25P_COMMAND_WRITE_ENABLE  0x06
>> +#define SPI_ST_M25P_COMMAND_JDEC          0x9F
>> +#define SPI_ST_M25P_COMMAND_RES_PD        0xab
>> +#define SPI_ST_M25P_COMMAND_WRITE_S_EN    0x50
>> +#define SPI_ST_M25P_COMMAND_WRITE_S       0x01
>> +#define SPI_ST_M25P_COMMAND_BULK_ERASE    0xc7
> AFAICS all of them are in spi.h under a different name and it would be
> cool if you could reuse the definitions from spi.h
> Regards,
> Carl-Daniel


More information about the coreboot mailing list