Debian Codegraph @

src/soc/intel/alderlake/spi.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /*
4 * This file is created based on Intel Alder Lake Processor PCH Datasheet
5 * Document number: 621483
6 * Chapter number: 7
7 */
8
9 #include <intelblocks/fast_spi.h>
10 #include <intelblocks/spi.h>
11 #include <soc/pci_devs.h>
12
13 #define PSF_SPI_DESTINATION_ID 0x23a8
14
15 int spi_soc_devfn_to_bus(unsigned int devfn)
16 {
17 switch (devfn) {
18 case PCH_DEVFN_GSPI0:
19 return 1;
20 case PCH_DEVFN_GSPI1:
21 return 2;
22 case PCH_DEVFN_GSPI2:
23 return 3;
24 case PCH_DEVFN_GSPI3:
25 return 4;
26 }
27 return -1;
28 }
29
30 uint32_t soc_get_spi_psf_destination_id(void)
31 {
32 return PSF_SPI_DESTINATION_ID;
33 }