Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/26882
Change subject: soc/intel/{apollolake, geminilake}: Rectify GSPI device name ......................................................................
soc/intel/{apollolake, geminilake}: Rectify GSPI device name
As per GLK EDS B:D:F (0:0xd:2) is HW SEQ SPI and (0:0x19:0-2) are GSPI0-2
Change-Id: Iff540eefa5e93b8ad86916745705b48e99cc6767 Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/soc/intel/apollolake/include/soc/pci_devs.h M src/soc/intel/apollolake/spi.c 2 files changed, 12 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/26882/1
diff --git a/src/soc/intel/apollolake/include/soc/pci_devs.h b/src/soc/intel/apollolake/include/soc/pci_devs.h index 25b74ba..c715c4f 100644 --- a/src/soc/intel/apollolake/include/soc/pci_devs.h +++ b/src/soc/intel/apollolake/include/soc/pci_devs.h @@ -131,13 +131,13 @@ #define PCH_DEV_UART3 _PCH_DEV(UART, 3)
/* LPSS SPI */ -#define PCH_DEV_SLOT_SPI 0x19 -#define PCH_DEVFN_SPI0 _PCH_DEVFN(SPI, 0) -#define PCH_DEVFN_SPI1 _PCH_DEVFN(SPI, 1) -#define PCH_DEVFN_SPI2 _PCH_DEVFN(SPI, 2) -#define PCH_DEV_SPI0 _PCH_DEV(SPI, 0) -#define PCH_DEV_SPI1 _PCH_DEV(SPI, 1) -#define PCH_DEV_SPI2 _PCH_DEV(SPI, 2) +#define PCH_DEV_SLOT_GSPI 0x19 +#define PCH_DEVFN_GSPI0 _PCH_DEVFN(GSPI, 0) +#define PCH_DEVFN_GSPI1 _PCH_DEVFN(GSPI, 1) +#define PCH_DEVFN_GSPI2 _PCH_DEVFN(GSPI, 2) +#define PCH_DEV_GSPI0 _PCH_DEV(GSPI, 0) +#define PCH_DEV_GSPI1 _PCH_DEV(GSPI, 1) +#define PCH_DEV_GSPI2 _PCH_DEV(GSPI, 2)
/* LPSS PWM */ #define PCH_DEV_SLOT_PWM 0x1a diff --git a/src/soc/intel/apollolake/spi.c b/src/soc/intel/apollolake/spi.c index b85d6b1..ecc2e32 100644 --- a/src/soc/intel/apollolake/spi.c +++ b/src/soc/intel/apollolake/spi.c @@ -21,12 +21,14 @@ int spi_soc_devfn_to_bus(unsigned int devfn) { switch (devfn) { - case PCH_DEVFN_SPI0: + case PCH_DEV_SPI: return 0; - case PCH_DEVFN_SPI1: + case PCH_DEVFN_GSPI0: return 1; - case PCH_DEVFN_SPI2: + case PCH_DEVFN_GSPI1: return 2; + case PCH_DEVFN_GSPI2: + return 3; } return -1; }