soc/amd/picasso/pci_devs: Update pci_devs.h with correct values
This is a squash of the following commits. The original values were wrong, and had confusing naming. soc/amd/picasso: Get rid of *_DEVID from pci_devs.h Signed-off-by: Furquan Shaikh <furquan@google.com> Original-Change-Id: I203449499840bf0a6df8bd879fb7d2e75a16b284 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2153714 src/amd/picasso: Update PCI bridge devices Orignal-Change-Id: I1fa9d52ce113eacdc5c9ba31ab46b6428a7d6ca9 Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Zork: Reorganizing ACPI and adding PCI bridge configs Signed-off-by: Pranay Shoroff <pshoroff@google.com> Original-Change-Id: I1e2095567525f302dfd0bce8e39001250523180b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2063536 soc/amd/picasso: Fix soc_acpi_name() to use devfn instead of devid Signed-off-by: Furquan Shaikh <furquan@google.com> Original-Change-Id: I2486e7e0059e0528f53d5a158c9328636563fe93 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2153712 BUG=b:147042464 TEST=Build trembyle and boot to OS Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I91bf7f9edcddf03027f8fdcaadf4e290ece10df5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41542 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
4732f23a1f
commit
5df9a04640
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <bootstate.h>
|
||||
#include <cpu/amd/mtrr.h>
|
||||
#include <console/console.h>
|
||||
#include <device/device.h>
|
||||
#include <device/pci.h>
|
||||
#include <drivers/i2c/designware/dw_i2c.h>
|
||||
|
@ -50,30 +51,58 @@ const char *soc_acpi_name(const struct device *dev)
|
|||
if (dev->path.type != DEVICE_PATH_PCI)
|
||||
return NULL;
|
||||
|
||||
if (dev->bus->dev->path.type == DEVICE_PATH_DOMAIN) {
|
||||
switch (dev->path.pci.devfn) {
|
||||
case PCIE0_DEVFN:
|
||||
case GNB_DEVFN:
|
||||
return "GNB";
|
||||
case IOMMU_DEVFN:
|
||||
return "IOMM";
|
||||
case PCIE_GPP_0_DEVFN:
|
||||
return "PBR0";
|
||||
case PCIE_GPP_1_DEVFN:
|
||||
return "PBR1";
|
||||
case PCIE_GPP_2_DEVFN:
|
||||
return "PBR2";
|
||||
case PCIE_GPP_3_DEVFN:
|
||||
return "PBR3";
|
||||
case PCIE_GPP_4_DEVFN:
|
||||
return "PBR4";
|
||||
case PCIE1_DEVFN:
|
||||
case PCIE_GPP_5_DEVFN:
|
||||
return "PBR5";
|
||||
case PCIE2_DEVFN:
|
||||
case PCIE_GPP_6_DEVFN:
|
||||
return "PBR6";
|
||||
case PCIE3_DEVFN:
|
||||
return "PBR7";
|
||||
case PCIE4_DEVFN:
|
||||
return "PBR8";
|
||||
case HDA1_DEVFN:
|
||||
return "AZHD";
|
||||
case PCIE_GPP_A_DEVFN:
|
||||
return "PBRA";
|
||||
case PCIE_GPP_B_DEVFN:
|
||||
return "PBRB";
|
||||
case LPC_DEVFN:
|
||||
return "LPCB";
|
||||
case SMBUS_DEVFN:
|
||||
return "SBUS";
|
||||
default:
|
||||
printk(BIOS_WARNING, "Unknown root PCI device: dev: %d, fn: %d\n",
|
||||
PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (dev->bus->dev->path.type == DEVICE_PATH_PCI
|
||||
&& dev->bus->dev->path.pci.devfn == PCIE_GPP_A_DEVFN) {
|
||||
switch (dev->path.pci.devfn) {
|
||||
case XHCI0_DEVFN:
|
||||
return "XHC0";
|
||||
case XHCI1_DEVFN:
|
||||
return "XHC1";
|
||||
default:
|
||||
printk(BIOS_WARNING, "Unknown Bus A PCI device: dev: %d, fn: %d\n",
|
||||
PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
printk(BIOS_WARNING, "Unknown PCI device: dev: %d, fn: %d\n",
|
||||
PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn));
|
||||
return NULL;
|
||||
};
|
||||
|
||||
struct device_operations pci_domain_ops = {
|
||||
|
|
|
@ -15,79 +15,78 @@
|
|||
/* GNB Root Complex */
|
||||
#define GNB_DEV 0x0
|
||||
#define GNB_FUNC 0
|
||||
#define GNB_DEVID 0x1576
|
||||
#define GNB_DEVFN PCI_DEVFN(GNB_DEV, GNB_FUNC)
|
||||
#define SOC_GNB_DEV _SOC_DEV(GNB_DEV, GNB_FUNC)
|
||||
|
||||
/* IOMMU */
|
||||
#define IOMMU_DEV 0x0
|
||||
#define IOMMU_FUNC 2
|
||||
#define IOMMU_DEVID 0x1577
|
||||
#define IOMMU_DEVFN PCI_DEVFN(IOMMU_DEV, IOMMU_FUNC)
|
||||
#define SOC_IOMMU_DEV _SOC_DEV(IOMMU_DEV, IOMMU_FUNC)
|
||||
|
||||
/* Internal Graphics */
|
||||
#define GFX_DEV 0x1
|
||||
/* PCIe GPP Bridges 0 - 6 */
|
||||
#define PCIE_HOST_BRIDGE_06_DEV 0x1
|
||||
|
||||
#define PCIE_GPP_0_FUNC 1
|
||||
#define PCIE_GPP_0_DEVFN PCI_DEVFN(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_0_FUNC)
|
||||
#define SOC_GPP_0_DEV _SOC_DEV(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_0_FUNC)
|
||||
|
||||
#define PCIE_GPP_1_FUNC 2
|
||||
#define PCIE_GPP_1_DEVFN PCI_DEVFN(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_1_FUNC)
|
||||
#define SOC_GPP_1_DEV _SOC_DEV(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_1_FUNC)
|
||||
|
||||
#define PCIE_GPP_2_FUNC 3
|
||||
#define PCIE_GPP_2_DEVFN PCI_DEVFN(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_2_FUNC)
|
||||
#define SOC_GPP_2_DEV _SOC_DEV(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_2_FUNC)
|
||||
|
||||
#define PCIE_GPP_3_FUNC 4
|
||||
#define PCIE_GPP_3_DEVFN PCI_DEVFN(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_3_FUNC)
|
||||
#define SOC_GPP_3_DEV _SOC_DEV(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_3_FUNC)
|
||||
|
||||
#define PCIE_GPP_4_FUNC 5
|
||||
#define PCIE_GPP_4_DEVFN PCI_DEVFN(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_4_FUNC)
|
||||
#define SOC_GPP_4_DEV _SOC_DEV(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_4_FUNC)
|
||||
|
||||
#define PCIE_GPP_5_FUNC 6
|
||||
#define PCIE_GPP_5_DEVFN PCI_DEVFN(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_5_FUNC)
|
||||
#define SOC_GPP_5_DEV _SOC_DEV(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_5_FUNC)
|
||||
|
||||
#define PCIE_GPP_6_FUNC 7
|
||||
#define PCIE_GPP_6_DEVFN PCI_DEVFN(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_6_FUNC)
|
||||
#define SOC_GPP_6_DEV _SOC_DEV(PCIE_HOST_BRIDGE_06_DEV, PCIE_GPP_6_FUNC)
|
||||
|
||||
/* PCIe GPP Bridges to Bus A and Bus B devices */
|
||||
#define PCIE_HOST_BRIDGE_AB_DEV 0x8
|
||||
|
||||
#define PCIE_GPP_A_FUNC 1
|
||||
#define PCIE_GPP_A_DEVFN PCI_DEVFN(PCIE_HOST_BRIDGE_AB_DEV, PCIE_GPP_A_FUNC)
|
||||
#define SOC_PCIE_GPP_A_DEV _SOC_DEV(PCIE_HOST_BRIDGE_AB_DEV, PCIE_GPP_A_FUNC)
|
||||
#define GFX_DEV 0x0
|
||||
#define GFX_FUNC 0
|
||||
#define GFX_DEVID 0x15d8
|
||||
#define GFX_DEVFN PCI_DEVFN(GFX_DEV, GFX_FUNC)
|
||||
#define SOC_GFX_DEV _SOC_DEV(GFX_DEV, GFX_FUNC)
|
||||
|
||||
/* HD Audio 0 */
|
||||
#define HDA0_DEV 0x1
|
||||
#define HDA0_FUNC 1
|
||||
#define HDA0_DEVID 0x15b3
|
||||
#define HDA0_DEVFN PCI_DEVFN(HDA0_DEV, HDA0_FUNC)
|
||||
#define SOC_HDA0_DEV _SOC_DEV(HDA0_DEV, HDA0_FUNC)
|
||||
#define XHCI0_DEV 0x0
|
||||
#define XHCI0_FUNC 3
|
||||
#define XHCI0_DEVFN PCI_DEVFN(XHCI0_DEV, XHCI0_FUNC)
|
||||
|
||||
/* Host Bridge */
|
||||
#define HOST_DEV 0x2
|
||||
#define HOST_FUNC 0
|
||||
#define HOST_DEVID 0x157b
|
||||
#define HOST_DEVFN PCI_DEVFN(HOST_DEV, HOST_FUNC)
|
||||
#define SOC_HOST_DEV _SOC_DEV(HOST_DEV, HOST_FUNC)
|
||||
#define XHCI1_DEV 0x0
|
||||
#define XHCI1_FUNC 4
|
||||
#define XHCI1_DEVFN PCI_DEVFN(XHCI1_DEV, XHCI1_FUNC)
|
||||
|
||||
/* PCIe GPP Bridge 0 */
|
||||
#define PCIE0_DEV 0x2
|
||||
#define PCIE0_FUNC 1
|
||||
#define PCIE0_DEVID 0x157c
|
||||
#define PCIE0_DEVFN PCI_DEVFN(PCIE0_DEV, PCIE0_FUNC)
|
||||
#define SOC_PCIE0_DEV _SOC_DEV(PCIE0_DEV, PCIE0_FUNC)
|
||||
#define AUDIO_DEV 0x0
|
||||
#define AUDIO_FUNC 5
|
||||
#define AUDIO_DEVFN PCI_DEVFN(AUDIO_DEV, AUDIO_FUNC)
|
||||
|
||||
/* PCIe GPP Bridge 1 */
|
||||
#define PCIE1_DEV 0x2
|
||||
#define PCIE1_FUNC 2
|
||||
#define PCIE1_DEVID 0x157c
|
||||
#define PCIE1_DEVFN PCI_DEVFN(PCIE1_DEV, PCIE1_FUNC)
|
||||
#define SOC_PCIE1_DEV _SOC_DEV(PCIE1_DEV, PCIE1_FUNC)
|
||||
#define HD_AUDIO_DEV 0x0
|
||||
#define HD_AUDIO_FUNC 6
|
||||
#define HD_AUDIO_DEVFN PCI_DEVFN(HD_AUDIO_DEV, HD_AUDIO_FUNC)
|
||||
|
||||
/* PCIe GPP Bridge 2 */
|
||||
#define PCIE2_DEV 0x2
|
||||
#define PCIE2_FUNC 3
|
||||
#define PCIE2_DEVID 0x157c
|
||||
#define PCIE2_DEVFN PCI_DEVFN(PCIE2_DEV, PCIE2_FUNC)
|
||||
#define SOC_PCIE2_DEV _SOC_DEV(PCIE2_DEV, PCIE2_FUNC)
|
||||
|
||||
/* PCIe GPP Bridge 3 */
|
||||
#define PCIE3_DEV 0x2
|
||||
#define PCIE3_FUNC 4
|
||||
#define PCIE3_DEVID 0x157c
|
||||
#define PCIE3_DEVFN PCI_DEVFN(PCIE3_DEV, PCIE3_FUNC)
|
||||
#define SOC_PCIE3_DEV _SOC_DEV(PCIE3_DEV, PCIE3_FUNC)
|
||||
|
||||
/* PCIe GPP Bridge 4 */
|
||||
#define PCIE4_DEV 0x2
|
||||
#define PCIE4_FUNC 5
|
||||
#define PCIE4_DEVID 0x157c
|
||||
#define PCIE4_DEVFN PCI_DEVFN(PCIE4_DEV, PCIE4_FUNC)
|
||||
#define SOC_PCIE4_DEV _SOC_DEV(PCIE4_DEV, PCIE4_FUNC)
|
||||
|
||||
/* HD Audio 1 */
|
||||
#define HDA1_DEV 0x9
|
||||
#define HDA1_FUNC 2
|
||||
#define HDA1_DEVID 0x157a
|
||||
#define HDA1_DEVFN PCI_DEVFN(HDA1_DEV, HDA1_FUNC)
|
||||
#define SOC_HDA1_DEV _SOC_DEV(HDA1_DEV, HDA1_FUNC)
|
||||
#define PCIE_GPP_B_FUNC 2
|
||||
#define PCIE_GPP_B_DEVFN PCI_DEVFN(PCIE_HOST_BRIDGE_AB_DEV, PCIE_GPP_B_FUNC)
|
||||
#define SOC_PCIE_GPP_B_DEV _SOC_DEV(PCIE_HOST_BRIDGE_AB_DEV, PCIE_GPP_B_FUNC)
|
||||
#define SATA_DEV 0x0
|
||||
#define SATA_FUNC 0
|
||||
#define SATA_DEVFN PCI_DEVFN(SATA_DEV, SATA_FUNC)
|
||||
|
||||
/* Data Fabric functions */
|
||||
#define DF_DEV 0x18
|
||||
|
@ -113,40 +112,15 @@
|
|||
#define DF_F6_DEVFN PCI_DEVFN(DF_DEV, 6)
|
||||
#define SOC_DF_F6_DEV _SOC_DEV(DF_DEV, 6)
|
||||
|
||||
/* USB 3.1 */
|
||||
#define XHCI0_DEV 0x0
|
||||
#define XHCI0_FUNC 3
|
||||
#define XHCI0_DEVID 0x15e0
|
||||
#define XHCI0_DEVFN PCI_DEVFN(XHCI0_DEV, XHCI0_FUNC)
|
||||
#define SOC_XHCI0_DEV _SOC_DEV(XHCI0_DEV, XHCI0_FUNC)
|
||||
|
||||
/* USB 3.1 */
|
||||
#define XHCI1_DEV 0x0
|
||||
#define XHCI1_FUNC 4
|
||||
#define XHCI1_DEVID 0x15e1
|
||||
#define XHCI1_DEVFN PCI_DEVFN(XHCI1_DEV, XHCI1_FUNC)
|
||||
#define SOC_XHCI1_DEV _SOC_DEV(XHCI1_DEV, XHCI1_FUNC)
|
||||
|
||||
/* SATA */
|
||||
#define SATA_DEV 0x11
|
||||
#define SATA_FUNC 0
|
||||
#define SATA_IDE_DEVID 0x7900
|
||||
#define AHCI_DEVID_MS 0x7901
|
||||
#define AHCI_DEVID_AMD 0x7904
|
||||
#define SATA_DEVFN PCI_DEVFN(SATA_DEV, SATA_FUNC)
|
||||
#define SOC_SATA_DEV _SOC_DEV(SATA_DEV, SATA_FUNC)
|
||||
|
||||
/* SMBUS */
|
||||
#define SMBUS_DEV 0x14
|
||||
#define SMBUS_FUNC 0
|
||||
#define SMBUS_DEVID 0x790b
|
||||
#define SMBUS_DEVFN PCI_DEVFN(SMBUS_DEV, SMBUS_FUNC)
|
||||
#define SOC_SMBUS_DEV _SOC_DEV(SMBUS_DEV, SMBUS_FUNC)
|
||||
|
||||
/* LPC BUS */
|
||||
#define PCU_DEV 0x14
|
||||
#define LPC_FUNC 3
|
||||
#define LPC_DEVID 0x790e
|
||||
#define LPC_DEVFN PCI_DEVFN(PCU_DEV, LPC_FUNC)
|
||||
#define SOC_LPC_DEV _SOC_DEV(PCU_DEV, LPC_FUNC)
|
||||
|
||||
|
|
Loading…
Reference in New Issue