Ravi Sarawadi | 91ffac8 | 2022-05-07 16:37:09 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
2 | |||||
3 | #include <intelblocks/gspi.h> | ||||
4 | #include <soc/pci_devs.h> | ||||
5 | |||||
6 | int gspi_soc_bus_to_devfn(unsigned int gspi_bus) | ||||
7 | { | ||||
8 | switch (gspi_bus) { | ||||
9 | case 0: | ||||
10 | return PCI_DEVFN_GSPI0; | ||||
11 | case 1: | ||||
12 | return PCI_DEVFN_GSPI1; | ||||
Angel Pons | c7c746c | 2022-07-16 12:37:38 +0200 | [diff] [blame] | 13 | case 2: |
14 | return PCI_DEVFN_GSPI2; | ||||
Ravi Sarawadi | 91ffac8 | 2022-05-07 16:37:09 -0700 | [diff] [blame] | 15 | } |
16 | return -1; | ||||
17 | } |