drivers/spi/spi_flash.c: Add SPI vendor IDs

Currently SPI vendor IDs are magic numbers in spi_flash.c. These definitions
are needed for AMD's fch_spi. So add the definitions to spi_generic.h and use
it at spi_flash.c

BUG=b:136595978
TEST=Build test of several platforms that don't use stoneyridge. Build and boot
grunt (using stoneyridge new fch_spi).

Change-Id: Ie39485d8c092151db8c9d88afaf02e19c507c93f
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35240
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Richard Spiegel
2019-09-03 11:54:55 -07:00
committed by Martin Roth
parent 28086f0d2c
commit 563b8694d2
2 changed files with 24 additions and 11 deletions

View File

@ -28,6 +28,19 @@
#include <stdint.h>
#include <stddef.h>
/* SPI vendor IDs */
#define VENDOR_ID_ADESTO 0x1f
#define VENDOR_ID_AMIC 0x37
#define VENDOR_ID_ATMEL 0x1f
#define VENDOR_ID_EON 0x1c
#define VENDOR_ID_GIGADEVICE 0xc8
#define VENDOR_ID_MACRONIX 0xc2
#define VENDOR_ID_SPANSION 0x01
#define VENDOR_ID_SST 0xbf
#define VENDOR_ID_STMICRO 0x20
#define VENDOR_ID_STMICRO_FF 0xff
#define VENDOR_ID_WINBOND 0xef
/* Controller-specific definitions: */
struct spi_ctrlr;