Commit 565010b9 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: JS20 PHB devfn fix

From: Jake Moilanen <moilanen@austin.ibm.com>

The JS20 uses devfn 0 for a HT->PCI bridge.  The PHB devfn
assumption does not hold for this case.
parent d9110d3a
...@@ -50,13 +50,20 @@ update_dn_pci_info(struct device_node *dn, void *data) ...@@ -50,13 +50,20 @@ update_dn_pci_info(struct device_node *dn, void *data)
struct pci_controller *phb = (struct pci_controller *)data; struct pci_controller *phb = (struct pci_controller *)data;
u32 *regs; u32 *regs;
char *device_type = get_property(dn, "device_type", 0); char *device_type = get_property(dn, "device_type", 0);
char *model;
dn->phb = phb; dn->phb = phb;
if (device_type && strcmp(device_type, "pci") == 0 && get_property(dn, "class-code", 0) == 0) { if (device_type && strcmp(device_type, "pci") == 0 && get_property(dn, "class-code", 0) == 0) {
/* special case for PHB's. Sigh. */ /* special case for PHB's. Sigh. */
regs = (u32 *)get_property(dn, "bus-range", 0); regs = (u32 *)get_property(dn, "bus-range", 0);
dn->busno = regs[0]; dn->busno = regs[0];
dn->devfn = 0; /* assumption */
model = (char *)get_property(dn, "model", NULL);
if (strstr(model, "U3"))
dn->devfn = -1;
else
dn->devfn = 0; /* assumption */
} else { } else {
regs = (u32 *)get_property(dn, "reg", 0); regs = (u32 *)get_property(dn, "reg", 0);
if (regs) { if (regs) {
......
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