diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2019-01-23 14:18:34 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-01-25 11:18:45 +0000 |
commit | d2abe9314e418f55df7ed7318bcf31131d0143ae (patch) | |
tree | 195a40d994af82d2092d989fe65bb02e14efded7 /src/mainboard | |
parent | b32347415de85199cb0178a2c8c89deae20a1866 (diff) |
mb/{kontron,supermicro}: Use pcidev_on_root()
Change-Id: I61b3e5c92830f02d61a108dadde25ff261099e57
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31051
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tristan Corrick <tristan@corrick.kiwi>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/kontron/986lcd-m/mainboard.c | 2 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8scm_fam10/acpi_tables.c | 2 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8scm_fam10/mptable.c | 5 | ||||
-rw-r--r-- | src/mainboard/supermicro/x10slm-f/mainboard.c | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/src/mainboard/kontron/986lcd-m/mainboard.c b/src/mainboard/kontron/986lcd-m/mainboard.c index d0d6c6bdbe..73d59974b9 100644 --- a/src/mainboard/kontron/986lcd-m/mainboard.c +++ b/src/mainboard/kontron/986lcd-m/mainboard.c @@ -173,7 +173,7 @@ static void mainboard_init(void *chip_info) if (!ethernet_disable) continue; printk(BIOS_DEBUG, "Disabling Ethernet NIC #%d\n", i); - dev = dev_find_slot(0, PCI_DEVFN(28, i - 1)); + dev = pcidev_on_root(28, i - 1); if (dev == NULL) { printk(BIOS_ERR, "Disabling Ethernet NIC: Cannot find 00:1c.%d!\n", diff --git a/src/mainboard/supermicro/h8scm_fam10/acpi_tables.c b/src/mainboard/supermicro/h8scm_fam10/acpi_tables.c index 4b2095ac10..716a77f3f0 100644 --- a/src/mainboard/supermicro/h8scm_fam10/acpi_tables.c +++ b/src/mainboard/supermicro/h8scm_fam10/acpi_tables.c @@ -34,7 +34,7 @@ unsigned long acpi_fill_madt(unsigned long current) IO_APIC_ADDR, gsi_base); /* IOAPIC on rs5690 */ gsi_base += 24; /* SB700 has 24 IOAPIC entries. */ - dev = dev_find_slot(0, PCI_DEVFN(0, 0)); + dev = pcidev_on_root(0, 0); if (dev) { pci_write_config32(dev, 0xF8, 0x1); dword = pci_read_config32(dev, 0xFC) & 0xfffffff0; diff --git a/src/mainboard/supermicro/h8scm_fam10/mptable.c b/src/mainboard/supermicro/h8scm_fam10/mptable.c index ca9136879a..e28f422f51 100644 --- a/src/mainboard/supermicro/h8scm_fam10/mptable.c +++ b/src/mainboard/supermicro/h8scm_fam10/mptable.c @@ -45,8 +45,7 @@ static void *smp_write_config_table(void *v) u32 *dword; u8 byte; - dev = dev_find_slot(0, //pirq_router_bus TODO: why bus_sp5100[0] use same value of bus_sr5650[0] assigned by get_pci1234(), instead of 0. - PCI_DEVFN(0x14, 0)); + dev = pcidev_on_root(0x14, 0); if (dev) { dword = (u32 *)(pci_read_config32(dev, 0x74) & 0xfffffff0); smp_write_ioapic(mc, apicid_sp5100, 0x11, dword); @@ -79,7 +78,7 @@ static void *smp_write_config_table(void *v) * 00:14.6: INTB MCI */ } - dev = dev_find_slot(0, PCI_DEVFN(0, 0)); + dev = pcidev_on_root(0, 0); if (dev) { pci_write_config32(dev, 0xF8, 0x1); dword = (u32 *)(pci_read_config32(dev, 0xFC) & 0xfffffff0); diff --git a/src/mainboard/supermicro/x10slm-f/mainboard.c b/src/mainboard/supermicro/x10slm-f/mainboard.c index 8d0e3b0281..4bd5d159c1 100644 --- a/src/mainboard/supermicro/x10slm-f/mainboard.c +++ b/src/mainboard/supermicro/x10slm-f/mainboard.c @@ -32,7 +32,7 @@ */ static void hide_ast2400(void) { - struct device *dev = dev_find_slot(0, PCI_DEVFN(0x1c, 0)); + struct device *dev = pcidev_on_root(0x1c, 0); if (!dev) return; |