soc/amd/picasso/chip.c: Generate ACPI nodes for PCI Bridge A and B

This node is required so we can add child ACPI nodes.

BUG=b:147042464
TEST=Boot trembyle and confirm Bus A has a firmware node
$ cat /sys/bus/pci/devices/0000\:00\:08.1/firmware_node/path
\_SB_.PCI0.PBRA

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I18144a69ed28a913bc9a2523d69edf84a1402e7e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41546
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Raul E Rangel 2020-05-19 16:13:06 -06:00 committed by Felix Held
parent 5df9a04640
commit 6de79b9a1d
1 changed files with 21 additions and 4 deletions

View File

@ -112,18 +112,35 @@ struct device_operations pci_domain_ops = {
.acpi_name = soc_acpi_name, .acpi_name = soc_acpi_name,
}; };
static struct device_operations pci_ops_ops_bus_ab = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
.scan_bus = pci_scan_bridge,
.reset_bus = pci_bus_reset,
.acpi_fill_ssdt = acpi_device_write_pci_dev,
};
static void enable_dev(struct device *dev) static void enable_dev(struct device *dev)
{ {
/* Set the operations if it is a special bus type */ /* Set the operations if it is a special bus type */
if (dev->path.type == DEVICE_PATH_DOMAIN) if (dev->path.type == DEVICE_PATH_DOMAIN) {
dev->ops = &pci_domain_ops; dev->ops = &pci_domain_ops;
else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) } else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
dev->ops = &cpu_bus_ops; dev->ops = &cpu_bus_ops;
else if (dev->path.type == DEVICE_PATH_PCI) } else if (dev->path.type == DEVICE_PATH_PCI) {
if (dev->bus->dev->path.type == DEVICE_PATH_DOMAIN) {
switch (dev->path.pci.devfn) {
case PCIE_GPP_A_DEVFN:
case PCIE_GPP_B_DEVFN:
dev->ops = &pci_ops_ops_bus_ab;
}
}
sb_enable(dev); sb_enable(dev);
else if (dev->path.type == DEVICE_PATH_MMIO) } else if (dev->path.type == DEVICE_PATH_MMIO) {
if (i2c_acpi_name(dev) != NULL) if (i2c_acpi_name(dev) != NULL)
dev->ops = &picasso_i2c_mmio_ops; dev->ops = &picasso_i2c_mmio_ops;
}
} }
static void soc_init(void *chip_info) static void soc_init(void *chip_info)