blob: c46135f55bd89d84fe45ab1cc332481bcadeddbd [file] [log] [blame]
Furquan Shaikhcff479e2020-07-08 15:47:19 -07001/* SPDX-License-Identifier: GPL-2.0-or-later */
2
Raul E Rangel4e80fae2020-12-16 10:08:41 -07003#include <amdblocks/amd_pci_util.h>
Furquan Shaikhcff479e2020-07-08 15:47:19 -07004#include <soc/pci_devs.h>
Furquan Shaikhcff479e2020-07-08 15:47:19 -07005
Raul E Rangela8405a42021-05-07 11:19:42 -06006/* See AMD PPR 55570 - IOAPIC Initialization for the table that AGESA sets up */
7const struct pci_routing_info pci_routing_table[] = {
8 {PCIE_GPP_0_DEVFN, 0, PCI_SWIZZLE_ABCD, 0x10},
9 {PCIE_GPP_1_DEVFN, 1, PCI_SWIZZLE_ABCD, 0x11},
10 {PCIE_GPP_2_DEVFN, 2, PCI_SWIZZLE_ABCD, 0x12},
11 {PCIE_GPP_3_DEVFN, 3, PCI_SWIZZLE_ABCD, 0x13},
12 {PCIE_GPP_4_DEVFN, 4, PCI_SWIZZLE_ABCD, 0x10},
13 {PCIE_GPP_5_DEVFN, 5, PCI_SWIZZLE_ABCD, 0x11},
14 {PCIE_GPP_6_DEVFN, 6, PCI_SWIZZLE_ABCD, 0x12},
15 {PCIE_GPP_A_DEVFN, 7, PCI_SWIZZLE_ABCD, 0x13},
16 {PCIE_GPP_B_DEVFN, 7, PCI_SWIZZLE_CDAB, 0x0C},
Raul E Rangel2f5fd112020-12-14 16:55:09 -070017};
18
Raul E Rangela8405a42021-05-07 11:19:42 -060019const struct pci_routing_info *get_pci_routing_table(size_t *entries)
20{
21 *entries = ARRAY_SIZE(pci_routing_table);
22 return pci_routing_table;
23}