diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2018-05-22 01:15:17 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-01-04 21:22:04 +0000 |
commit | 4ad7f5b1a4f81343cee634a3a49145a3ed9855b7 (patch) | |
tree | 6d94849295621aa816ac37a48cf8cf94b066bc4f /src/southbridge/amd/agesa | |
parent | 33ff44c37ccb96c209b002e5430deefc00cc5591 (diff) | |
download | coreboot-4ad7f5b1a4f81343cee634a3a49145a3ed9855b7.tar.xz |
AGESA: Use pcidev_on_root()
We have constant CONFIG_CBB==0, replace ill dev_find_slot()
with safe pcidev_on_root();
Change-Id: Ieb2030fa3d77a9f49fc5faf12b92b5f00f49d354
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/26482
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge/amd/agesa')
-rw-r--r-- | src/southbridge/amd/agesa/hudson/lpc.c | 2 | ||||
-rw-r--r-- | src/southbridge/amd/agesa/hudson/sd.c | 2 | ||||
-rw-r--r-- | src/southbridge/amd/agesa/hudson/spi.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/southbridge/amd/agesa/hudson/lpc.c b/src/southbridge/amd/agesa/hudson/lpc.c index 132a3335af..8d07e6487e 100644 --- a/src/southbridge/amd/agesa/hudson/lpc.c +++ b/src/southbridge/amd/agesa/hudson/lpc.c @@ -38,7 +38,7 @@ static void lpc_init(struct device *dev) struct device *sm_dev; /* Enable the LPC Controller */ - sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0)); + sm_dev = pcidev_on_root(0x14, 0); dword = pci_read_config32(sm_dev, 0x64); dword |= 1 << 20; pci_write_config32(sm_dev, 0x64, dword); diff --git a/src/southbridge/amd/agesa/hudson/sd.c b/src/southbridge/amd/agesa/hudson/sd.c index e98be57575..878f136205 100644 --- a/src/southbridge/amd/agesa/hudson/sd.c +++ b/src/southbridge/amd/agesa/hudson/sd.c @@ -25,7 +25,7 @@ static void sd_init(struct device *dev) { u32 stepping; - stepping = pci_read_config32(dev_find_slot(0, PCI_DEVFN(0x18, 3)), 0xFC); + stepping = pci_read_config32(pcidev_on_root(0x18, 3), 0xFC); struct southbridge_amd_agesa_hudson_config *sd_chip = (struct southbridge_amd_agesa_hudson_config *)(dev->chip_info); diff --git a/src/southbridge/amd/agesa/hudson/spi.c b/src/southbridge/amd/agesa/hudson/spi.c index 94846514ce..ade7a02376 100644 --- a/src/southbridge/amd/agesa/hudson/spi.c +++ b/src/southbridge/amd/agesa/hudson/spi.c @@ -81,7 +81,7 @@ void spi_init(void) { struct device *dev; - dev = dev_find_slot(0, PCI_DEVFN(0x14, 3)); + dev = pcidev_on_root(0x14, 3); spibar = pci_read_config32(dev, 0xA0) & ~0x1F; } |