soc/intel: Add Alder Lake's GT device ID
[coreboot.git] / src / soc / intel / alderlake / spi.c
blobb02f2a20fda3d99e7d892ee084ecfd1d45040a5e
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /*
4 * This file is created based on Intel Alder Lake Processor PCH Datasheet
5 * Document number: 621483
6 * Chapter number: 7
7 */
9 #include <intelblocks/fast_spi.h>
10 #include <intelblocks/spi.h>
11 #include <soc/pci_devs.h>
12 #include <soc/pcr_ids.h>
14 int spi_soc_devfn_to_bus(unsigned int devfn)
16 switch (devfn) {
17 case PCH_DEVFN_SPI:
18 return 0;
19 case PCH_DEVFN_GSPI0:
20 return 1;
21 case PCH_DEVFN_GSPI1:
22 return 2;
23 case PCH_DEVFN_GSPI2:
24 return 3;
25 case PCH_DEVFN_GSPI3:
26 return 4;
28 return -1;
31 uint32_t soc_get_spi_dmi_destination_id(void)
33 return SPI_DMI_DESTINATION_ID;