Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Furquan Shaikh | 42cfdf5 | 2016-12-21 10:58:26 -0800 | [diff] [blame] | 2 | |
Subrata Banik | 09564fc | 2017-11-09 12:16:36 +0530 | [diff] [blame] | 3 | #include <intelblocks/spi.h> |
Subrata Banik | cca5085 | 2017-11-07 17:53:38 +0530 | [diff] [blame] | 4 | #include <soc/pci_devs.h> |
Furquan Shaikh | 42cfdf5 | 2016-12-21 10:58:26 -0800 | [diff] [blame] | 5 | |
Subrata Banik | 09564fc | 2017-11-09 12:16:36 +0530 | [diff] [blame] | 6 | int spi_soc_devfn_to_bus(unsigned int devfn) |
| 7 | { |
| 8 | switch (devfn) { |
Subrata Banik | 09564fc | 2017-11-09 12:16:36 +0530 | [diff] [blame] | 9 | case PCH_DEVFN_GSPI0: |
| 10 | return 1; |
| 11 | case PCH_DEVFN_GSPI1: |
| 12 | return 2; |
| 13 | } |
| 14 | return -1; |
| 15 | } |