Tan, Lean Sheng | 05dfe31 | 2020-08-25 20:40:17 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
2 | |||||
3 | #include <intelblocks/spi.h> | ||||
4 | #include <soc/pci_devs.h> | ||||
5 | |||||
6 | int spi_soc_devfn_to_bus(unsigned int devfn) | ||||
7 | { | ||||
8 | switch (devfn) { | ||||
Tan, Lean Sheng | 05dfe31 | 2020-08-25 20:40:17 -0700 | [diff] [blame] | 9 | case PCH_DEVFN_GSPI0: |
10 | return 1; | ||||
11 | case PCH_DEVFN_GSPI1: | ||||
12 | return 2; | ||||
13 | case PCH_DEVFN_GSPI2: | ||||
14 | return 3; | ||||
15 | } | ||||
16 | return -1; | ||||
17 | } |