coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gspi.c
Go to the documentation of this file.
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: 11
7  */
8 
9 #include <intelblocks/gspi.h>
10 #include <soc/pci_devs.h>
11 
12 int gspi_soc_bus_to_devfn(unsigned int gspi_bus)
13 {
14  switch (gspi_bus) {
15  case 0:
16  return PCH_DEVFN_GSPI0;
17  case 1:
18  return PCH_DEVFN_GSPI1;
19  case 2:
20  return PCH_DEVFN_GSPI2;
21  case 3:
22  return PCH_DEVFN_GSPI3;
23  }
24  return -1;
25 }
int gspi_soc_bus_to_devfn(unsigned int gspi_bus)
Definition: gspi.c:12
#define PCH_DEVFN_GSPI0
Definition: pci_devs.h:206
#define PCH_DEVFN_GSPI3
Definition: pci_devs.h:114
#define PCH_DEVFN_GSPI2
Definition: pci_devs.h:107
#define PCH_DEVFN_GSPI1
Definition: pci_devs.h:207