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>
This commit is contained in:
parent
44e9c37f35
commit
267684f10e
|
@ -273,7 +273,7 @@ static void ecam0_init(struct device *dev)
|
||||||
u32 reg32;
|
u32 reg32;
|
||||||
|
|
||||||
printk(BIOS_INFO, "ECAM0: init\n");
|
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) {
|
if (!bridge) {
|
||||||
printk(BIOS_INFO, "ECAM0: ERROR: PCI 00:01.0 not found.\n");
|
printk(BIOS_INFO, "ECAM0: ERROR: PCI 00:01.0 not found.\n");
|
||||||
return;
|
return;
|
||||||
|
@ -287,7 +287,7 @@ static void ecam0_init(struct device *dev)
|
||||||
/* Program secure ARI capability on bus 1 */
|
/* Program secure ARI capability on bus 1 */
|
||||||
child_last = NULL;
|
child_last = NULL;
|
||||||
for (i = 0; i <= PCI_DEVFN(0x1f, 7); i++) {
|
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)
|
if (!child || !child->enabled)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ static void ecam0_init(struct device *dev)
|
||||||
/* Program insecure ARI capability on bus 1 */
|
/* Program insecure ARI capability on bus 1 */
|
||||||
child_last = NULL;
|
child_last = NULL;
|
||||||
for (i = 0; i <= PCI_DEVFN(0x1f, 7); i++) {
|
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)
|
if (!child)
|
||||||
continue;
|
continue;
|
||||||
config = child->chip_info;
|
config = child->chip_info;
|
||||||
|
@ -327,7 +327,7 @@ static void ecam0_init(struct device *dev)
|
||||||
|
|
||||||
/* Enable / disable devices on bus 0 */
|
/* Enable / disable devices on bus 0 */
|
||||||
for (i = 0; i <= 0x1f; i++) {
|
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;
|
config = child ? child->chip_info : NULL;
|
||||||
if (child && child->enabled && config && !config->secure)
|
if (child && child->enabled && config && !config->secure)
|
||||||
enable_device(i);
|
enable_device(i);
|
||||||
|
@ -337,7 +337,7 @@ static void ecam0_init(struct device *dev)
|
||||||
|
|
||||||
/* Enable / disable devices and functions on bus 1 */
|
/* Enable / disable devices and functions on bus 1 */
|
||||||
for (i = 0; i <= PCI_DEVFN(0x1f, 7); i++) {
|
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;
|
config = child ? child->chip_info : NULL;
|
||||||
if (child && child->enabled &&
|
if (child && child->enabled &&
|
||||||
((config && !config->secure) || !config))
|
((config && !config->secure) || !config))
|
||||||
|
@ -349,7 +349,7 @@ static void ecam0_init(struct device *dev)
|
||||||
/* Apply IRQ on PCI devices */
|
/* Apply IRQ on PCI devices */
|
||||||
/* UUA */
|
/* UUA */
|
||||||
for (i = 0; i < 4; i++) {
|
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));
|
PCI_DEVFN(8, i));
|
||||||
if (!child)
|
if (!child)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue