Commit 250a9350 authored by Darren Stevens's avatar Darren Stevens Committed by Michael Ellerman

powerpc/pasemi: Search for PCI root bus by compatible property

Pasemi arch code finds the root of the PCI-e bus by searching the
device-tree for a node called 'pxp'. But the root bus has a compatible
property of 'pasemi,rootbus' so search for that instead.
Signed-off-by: default avatarDarren Stevens <darren@stevens-zone.net>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 396ab6ab
...@@ -216,6 +216,7 @@ static int __init pas_add_bridge(struct device_node *dev) ...@@ -216,6 +216,7 @@ static int __init pas_add_bridge(struct device_node *dev)
void __init pas_pci_init(void) void __init pas_pci_init(void)
{ {
struct device_node *np, *root; struct device_node *np, *root;
int res;
root = of_find_node_by_path("/"); root = of_find_node_by_path("/");
if (!root) { if (!root) {
...@@ -226,11 +227,11 @@ void __init pas_pci_init(void) ...@@ -226,11 +227,11 @@ void __init pas_pci_init(void)
pci_set_flags(PCI_SCAN_ALL_PCIE_DEVS); pci_set_flags(PCI_SCAN_ALL_PCIE_DEVS);
for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) np = of_find_compatible_node(root, NULL, "pasemi,rootbus");
if (np->name && !strcmp(np->name, "pxp") && !pas_add_bridge(np)) if (np) {
of_node_get(np); res = pas_add_bridge(np);
of_node_put(np);
of_node_put(root); }
} }
void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset) void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment