Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Ravi Sarawadi | 3669a06 | 2018-02-27 13:23:42 -0800 | [diff] [blame] | 2 | |
Ravi Sarawadi | 3669a06 | 2018-02-27 13:23:42 -0800 | [diff] [blame] | 3 | #include <intelblocks/gspi.h> |
Ravi Sarawadi | 3669a06 | 2018-02-27 13:23:42 -0800 | [diff] [blame] | 4 | #include <soc/pci_devs.h> |
Ravi Sarawadi | 3669a06 | 2018-02-27 13:23:42 -0800 | [diff] [blame] | 5 | |
| 6 | int gspi_soc_bus_to_devfn(unsigned int gspi_bus) |
| 7 | { |
Subrata Banik | 9ab6d92 | 2018-05-08 20:08:49 +0530 | [diff] [blame] | 8 | switch (gspi_bus) { |
| 9 | case 0: |
| 10 | return PCH_DEVFN_SPI0; |
| 11 | case 1: |
| 12 | return PCH_DEVFN_SPI1; |
| 13 | case 2: |
| 14 | return PCH_DEVFN_SPI2; |
| 15 | } |
| 16 | return -1; |
Ravi Sarawadi | 3669a06 | 2018-02-27 13:23:42 -0800 | [diff] [blame] | 17 | } |