From 7ff530b40ef862e4d1bf6b30c34635a279a1b312 Mon Sep 17 00:00:00 2001 From: Ronald Hoogenboom Date: Sat, 19 Jan 2008 00:04:46 +0000 Subject: Further abstract SPI functions to allow chips bigger than 512 kB behind IT8716Fs Support SPI flash chips bigger than 512 kByte sitting behind IT8716F Super I/O performing LPC-to-SPI flash translation. Corresponding to flashrom svn r181 and coreboot v2 svn r3061. Signed-off-by: Ronald Hoogenboom Signed-off-by: Carl-Daniel Hailfinger Acked-by: Carl-Daniel Hailfinger --- flash.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'flash.h') diff --git a/flash.h b/flash.h index dffb1b803..048f7440f 100644 --- a/flash.h +++ b/flash.h @@ -234,7 +234,16 @@ extern struct flashchip flashchips[]; #define TI_ID 0x97 /* Texas Instruments */ +/* + * W25X chips are SPI, first byte of device ID is memory type, second + * byte of device ID is related to log(bitsize). + */ #define WINBOND_ID 0xDA /* Winbond */ +#define WINBOND_NEX_ID 0xEF /* Winbond (ex Nexcom) serial flash devices */ +#define W_25X10 0x3011 +#define W_25X20 0x3012 +#define W_25X40 0x3013 +#define W_25X80 0x3014 #define W_29C011 0xC1 #define W_29C020C 0x45 #define W_29C040P 0x46 @@ -297,6 +306,7 @@ void generic_spi_write_enable(); void generic_spi_write_disable(); int generic_spi_chip_erase_c7(struct flashchip *flash); int generic_spi_chip_write(struct flashchip *flash, uint8_t *buf); +int generic_spi_chip_read(struct flashchip *flash, uint8_t *buf); /* 82802ab.c */ int probe_82802ab(struct flashchip *flash); -- cgit v1.2.3