mb/ocp/tiogapass: Fix GPIOs
[coreboot2.git] / src / mainboard / aopen / dxplplusu / acpi_tables.c
blob114068fc41648da4b7a71c208c2e52980b65d5e3
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpi.h>
4 #include <device/pci_def.h>
6 unsigned long acpi_fill_madt(unsigned long current)
8 struct device *bdev, *dev = NULL;
9 struct resource *res = NULL;
11 bdev = pcidev_on_root(2, 0);
12 /* P64H2 Bus B IOAPIC */
13 if (bdev)
14 dev = pcidev_path_behind(bdev->downstream, PCI_DEVFN(28, 0));
15 if (dev) {
16 res = find_resource(dev, PCI_BASE_ADDRESS_0);
17 current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, res->base);
20 /* P64H2 Bus A IOAPIC */
21 if (bdev)
22 dev = pcidev_path_behind(bdev->downstream, PCI_DEVFN(30, 0));
23 if (dev) {
24 res = find_resource(dev, PCI_BASE_ADDRESS_0);
25 current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, res->base);
28 return current;