summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2018-06-21 16:20:55 +0300
committerFelix Held <felix-coreboot@felixheld.de>2019-01-06 13:09:54 +0000
commite7377556cc33b10fdba6d956ac83d823478f5eb4 (patch)
tree8843182316aed1730edb12aa0fbc18de4d3be414 /src/drivers
parentc70eed1e6202c928803f3e7f79161cd247a62b23 (diff)
downloadcoreboot-e7377556cc33b10fdba6d956ac83d823478f5eb4.tar.xz
device: Use pcidev_path_on_root()
Change-Id: I2e28b9f4ecaf258bff8a062b5a54cb3d8e2bb9b0 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/30400 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/usb/pci_ehci.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/drivers/usb/pci_ehci.c b/src/drivers/usb/pci_ehci.c
index a61779cc7a..e0f88ec098 100644
--- a/src/drivers/usb/pci_ehci.c
+++ b/src/drivers/usb/pci_ehci.c
@@ -37,8 +37,7 @@ int ehci_debug_hw_enable(unsigned int *base, unsigned int *dbg_offset)
#ifdef __SIMPLE_DEVICE__
pci_devfn_t dev = dbg_dev;
#else
- struct device *dev = dev_find_slot(PCI_DEV2SEGBUS(dbg_dev),
- PCI_DEV2DEVFN(dbg_dev));
+ struct device *dev = pcidev_path_on_root(PCI_DEV2DEVFN(dbg_dev));
#endif
u32 class = pci_read_config32(dev, PCI_CLASS_REVISION) >> 8;
@@ -124,8 +123,7 @@ u8 *pci_ehci_base_regs(pci_devfn_t sdev)
#ifdef __SIMPLE_DEVICE__
u8 *base = (u8 *)(pci_read_config32(sdev, EHCI_BAR_INDEX) & ~0x0f);
#else
- struct device *dev = dev_find_slot(PCI_DEV2SEGBUS(sdev),
- PCI_DEV2DEVFN(sdev));
+ struct device *dev = pcidev_path_on_root(PCI_DEV2DEVFN(sdev));
u8 *base = (u8 *)(pci_read_config32(dev, EHCI_BAR_INDEX) & ~0x0f);
#endif
return base + HC_LENGTH(read32(base));