summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2018-12-29 14:45:28 +0200
committerPatrick Georgi <pgeorgi@google.com>2019-01-24 13:53:32 +0000
commit267684f10e5b86bfa5ee8af25d8f61b2a5a27e5e (patch)
tree2bab35b4703b3c0dac7a7c8e3c307e3ff709b0e1
parent44e9c37f356f2832c079b1b8a5145dd7be77a37c (diff)
soc/cavium/cn81xx: Replace uses of dev_find_slot()
Change-Id: I9f176caff3b6423121676eb895f5f68a5b926de4 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/30517 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
-rw-r--r--src/soc/cavium/cn81xx/ecam0.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/cavium/cn81xx/ecam0.c b/src/soc/cavium/cn81xx/ecam0.c
index cff25076f7..6747fa6ad1 100644
--- a/src/soc/cavium/cn81xx/ecam0.c
+++ b/src/soc/cavium/cn81xx/ecam0.c
@@ -273,7 +273,7 @@ static void ecam0_init(struct device *dev)
u32 reg32;
printk(BIOS_INFO, "ECAM0: init\n");
- const struct device *bridge = dev_find_slot(0, PCI_DEVFN(1, 0));
+ const struct device *bridge = pcidev_on_root(1, 0);
if (!bridge) {
printk(BIOS_INFO, "ECAM0: ERROR: PCI 00:01.0 not found.\n");
return;
@@ -287,7 +287,7 @@ static void ecam0_init(struct device *dev)
/* Program secure ARI capability on bus 1 */
child_last = NULL;
for (i = 0; i <= PCI_DEVFN(0x1f, 7); i++) {
- child = dev_find_slot(bridge->link_list->secondary, i);
+ child = pcidev_path_behind(bridge->link_list, i);
if (!child || !child->enabled)
continue;
@@ -306,7 +306,7 @@ static void ecam0_init(struct device *dev)
/* Program insecure ARI capability on bus 1 */
child_last = NULL;
for (i = 0; i <= PCI_DEVFN(0x1f, 7); i++) {
- child = dev_find_slot(bridge->link_list->secondary, i);
+ child = pcidev_path_behind(bridge->link_list, i);
if (!child)
continue;
config = child->chip_info;
@@ -327,7 +327,7 @@ static void ecam0_init(struct device *dev)
/* Enable / disable devices on bus 0 */
for (i = 0; i <= 0x1f; i++) {
- child = dev_find_slot(0, PCI_DEVFN(i, 0));
+ child = pcidev_on_root(i, 0);
config = child ? child->chip_info : NULL;
if (child && child->enabled && config && !config->secure)
enable_device(i);
@@ -337,7 +337,7 @@ static void ecam0_init(struct device *dev)
/* Enable / disable devices and functions on bus 1 */
for (i = 0; i <= PCI_DEVFN(0x1f, 7); i++) {
- child = dev_find_slot(bridge->link_list->secondary, i);
+ child = pcidev_path_behind(bridge->link_list, i);
config = child ? child->chip_info : NULL;
if (child && child->enabled &&
((config && !config->secure) || !config))
@@ -349,7 +349,7 @@ static void ecam0_init(struct device *dev)
/* Apply IRQ on PCI devices */
/* UUA */
for (i = 0; i < 4; i++) {
- child = dev_find_slot(bridge->link_list->secondary,
+ child = pcidev_path_behind(bridge->link_list,
PCI_DEVFN(8, i));
if (!child)
continue;