Subrata Banik | 2871e0e | 2020-09-27 11:30:58 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
| 3 | /* |
| 4 | * This file is created based on Intel Alder Lake Processor PCH Datasheet |
| 5 | * Document number: 621483 |
| 6 | * Chapter number: 11 |
| 7 | */ |
| 8 | |
| 9 | #include <intelblocks/gspi.h> |
| 10 | #include <soc/pci_devs.h> |
| 11 | |
| 12 | int gspi_soc_bus_to_devfn(unsigned int gspi_bus) |
| 13 | { |
| 14 | switch (gspi_bus) { |
| 15 | case 0: |
| 16 | return PCH_DEVFN_GSPI0; |
| 17 | case 1: |
| 18 | return PCH_DEVFN_GSPI1; |
| 19 | case 2: |
| 20 | return PCH_DEVFN_GSPI2; |
| 21 | case 3: |
| 22 | return PCH_DEVFN_GSPI3; |
| 23 | } |
| 24 | return -1; |
| 25 | } |