summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/i2c
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/soc/intel/common/block/i2c
parentc70eed1e6202c928803f3e7f79161cd247a62b23 (diff)
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/soc/intel/common/block/i2c')
-rw-r--r--src/soc/intel/common/block/i2c/i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/intel/common/block/i2c/i2c.c b/src/soc/intel/common/block/i2c/i2c.c
index 01a9bc3ff7..f72adfce8a 100644
--- a/src/soc/intel/common/block/i2c/i2c.c
+++ b/src/soc/intel/common/block/i2c/i2c.c
@@ -65,7 +65,7 @@ static int lpss_i2c_early_init_bus(unsigned int bus)
/* Look up the controller device in the devicetree */
dev = PCI_DEV(0, PCI_SLOT(devfn), PCI_FUNC(devfn));
- tree_dev = dev_find_slot(0, devfn);
+ tree_dev = pcidev_path_on_root(devfn);
if (!tree_dev || !tree_dev->enabled) {
printk(BIOS_ERR, "I2C%u device not enabled\n", bus);
return -1;
@@ -134,7 +134,7 @@ uintptr_t dw_i2c_base_address(unsigned int bus)
return (uintptr_t)NULL;
/* devfn -> dev */
- dev = dev_find_slot(0, devfn);
+ dev = pcidev_path_on_root(devfn);
if (!dev || !dev->enabled)
return (uintptr_t)NULL;