summaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/include
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-02-11 11:06:19 -0800
committerFurquan Shaikh <furquan@google.com>2017-02-16 08:42:08 +0100
commit0de80da24cc39003f61f86452f46c9b48c95ae4d (patch)
tree05dc491b12f44adc9a31a3b7d027fc32045d54a7 /src/soc/intel/skylake/include
parent4e084796886259133d9226c40822e44599a41302 (diff)
downloadcoreboot-0de80da24cc39003f61f86452f46c9b48c95ae4d.tar.xz
soc/intel/skylake: Add support for SPI device
Add a new PCI driver for SPI devices with supported PCI ids. Also, provide a translation table to convert struct device structure into SPI bus number. BUG=chrome-os-partner:59832 BRANCH=None TEST=Compiles successfully Change-Id: If860eb819f2ce5ae5443f808b356af57f86c52be Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/18341 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/soc/intel/skylake/include')
-rw-r--r--src/soc/intel/skylake/include/soc/pci_devs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/include/soc/pci_devs.h b/src/soc/intel/skylake/include/soc/pci_devs.h
index 974f1d8e19..a19a7c6007 100644
--- a/src/soc/intel/skylake/include/soc/pci_devs.h
+++ b/src/soc/intel/skylake/include/soc/pci_devs.h
@@ -176,4 +176,14 @@ static inline int i2c_devfn_to_bus(unsigned devfn)
return -1;
}
+static inline int spi_devfn_to_bus(unsigned devfn)
+{
+ switch (devfn) {
+ case PCH_DEVFN_SPI: return 0;
+ case PCH_DEVFN_GSPI0: return 1;
+ case PCH_DEVFN_GSPI1: return 2;
+ }
+ return -1;
+}
+
#endif