[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
Tue May 13 17:52:36 CEST 2008

On 13.05.2008 17:37, Stefan Reinauer wrote:
> Carl-Daniel Hailfinger wrote:
>> Hi Claus,
>> thanks for your patch. I will work on it and try to integrate it more
>> with the existing flashrom structure.
>> On 13.05.2008 15:29, Claus Gindhart wrote:
>>> This patch adds support for the SPI Chips Atmel AT25DF32,
>>> ST M25P80, ST M25P16, M25P32, ST M25P64 attached to the ICH9.
>>> Because chipset plays an important role in communicating with these
>>> chips, it was not possible to integrate this support into the already 
>>> existing spi.c
>>> This module was tested with the devices as mentioned above, but
>>> it should be easy to expand it for other SPI chips attached to an ICH.
>>> Signed-off-by: Claus Gindhart <claus.gindhart at kontron.com>
>> Expect some feedback and a patch against your tree to improve
>> integration tomorrow.
> I suggest we check this in and you work on the public tree. There is no
> reason to delay check-in.

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


More information about the coreboot mailing list