Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Aamir Bohra | dd7acaa | 2020-03-25 11:36:22 +0530 | [diff] [blame] | 2 | |
Aamir Bohra | dd7acaa | 2020-03-25 11:36:22 +0530 | [diff] [blame] | 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 PCH_DEVFN_GSPI0; | ||||
11 | case 1: | ||||
12 | return PCH_DEVFN_GSPI1; | ||||
13 | case 2: | ||||
14 | return PCH_DEVFN_GSPI2; | ||||
15 | } | ||||
16 | return -1; | ||||
17 | } |