1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 3 #include <intelblocks/fast_spi.h> 4 #include <intelblocks/spi.h> 5 #include <soc/pci_devs.h> 6 7 #define PSF_SPI_DESTINATION_ID 0x5140 8 spi_soc_devfn_to_bus(unsigned int devfn)9int spi_soc_devfn_to_bus(unsigned int devfn) 10 { 11 switch (devfn) { 12 case PCI_DEVFN_GSPI0: 13 return 1; 14 case PCI_DEVFN_GSPI1: 15 return 2; 16 case PCI_DEVFN_GSPI2: 17 return 3; 18 } 19 return -1; 20 } 21 soc_get_spi_psf_destination_id(void)22uint32_t soc_get_spi_psf_destination_id(void) 23 { 24 return PSF_SPI_DESTINATION_ID; 25 } 26