Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113131
b: refs/heads/master
c: c91e2ec
h: refs/heads/master
i:
  113129: 8b7880b
  113127: 840624d
v: v3
  • Loading branch information
David S. Miller committed Sep 12, 2008
1 parent 7c06490 commit eda4603
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e0b1e6186c755becf8b19c844c63db1a551898b
refs/heads/master: c91e2ecad0a392604ece6e53d38b484918060825
85 changes: 55 additions & 30 deletions trunk/arch/sparc64/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct device_node *of_find_node_by_phandle(phandle handle)
{
struct device_node *np;

for (np = allnodes; np != 0; np = np->allnext)
for (np = allnodes; np; np = np->allnext)
if (np->node == handle)
break;

Expand Down Expand Up @@ -1043,22 +1043,30 @@ static void __init irq_trans_init(struct device_node *dp)
for (i = 0; i < ARRAY_SIZE(pci_irq_trans_table); i++) {
struct irq_trans *t = &pci_irq_trans_table[i];

if (!strcmp(model, t->name))
return t->init(dp);
if (!strcmp(model, t->name)) {
t->init(dp);
return;
}
}
}
#endif
#ifdef CONFIG_SBUS
if (!strcmp(dp->name, "sbus") ||
!strcmp(dp->name, "sbi"))
return sbus_irq_trans_init(dp);
!strcmp(dp->name, "sbi")) {
sbus_irq_trans_init(dp);
return;
}
#endif
if (!strcmp(dp->name, "fhc") &&
!strcmp(dp->parent->name, "central"))
return central_irq_trans_init(dp);
!strcmp(dp->parent->name, "central")) {
central_irq_trans_init(dp);
return;
}
if (!strcmp(dp->name, "virtual-devices") ||
!strcmp(dp->name, "niu"))
return sun4v_vdev_irq_trans_init(dp);
!strcmp(dp->name, "niu")) {
sun4v_vdev_irq_trans_init(dp);
return;
}
}

static int is_root_node(const struct device_node *dp)
Expand Down Expand Up @@ -1329,32 +1337,49 @@ static void __init __build_path_component(struct device_node *dp, char *tmp_buf)

if (parent != NULL) {
if (!strcmp(parent->type, "pci") ||
!strcmp(parent->type, "pciex"))
return pci_path_component(dp, tmp_buf);
if (!strcmp(parent->type, "sbus"))
return sbus_path_component(dp, tmp_buf);
if (!strcmp(parent->type, "upa"))
return upa_path_component(dp, tmp_buf);
if (!strcmp(parent->type, "ebus"))
return ebus_path_component(dp, tmp_buf);
!strcmp(parent->type, "pciex")) {
pci_path_component(dp, tmp_buf);
return;
}
if (!strcmp(parent->type, "sbus")) {
sbus_path_component(dp, tmp_buf);
return;
}
if (!strcmp(parent->type, "upa")) {
upa_path_component(dp, tmp_buf);
return;
}
if (!strcmp(parent->type, "ebus")) {
ebus_path_component(dp, tmp_buf);
return;
}
if (!strcmp(parent->name, "usb") ||
!strcmp(parent->name, "hub"))
return usb_path_component(dp, tmp_buf);
if (!strcmp(parent->type, "i2c"))
return i2c_path_component(dp, tmp_buf);
if (!strcmp(parent->type, "firewire"))
return ieee1394_path_component(dp, tmp_buf);
if (!strcmp(parent->type, "virtual-devices"))
return vdev_path_component(dp, tmp_buf);

!strcmp(parent->name, "hub")) {
usb_path_component(dp, tmp_buf);
return;
}
if (!strcmp(parent->type, "i2c")) {
i2c_path_component(dp, tmp_buf);
return;
}
if (!strcmp(parent->type, "firewire")) {
ieee1394_path_component(dp, tmp_buf);
return;
}
if (!strcmp(parent->type, "virtual-devices")) {
vdev_path_component(dp, tmp_buf);
return;
}
/* "isa" is handled with platform naming */
}

/* Use platform naming convention. */
if (tlb_type == hypervisor)
return sun4v_path_component(dp, tmp_buf);
else
return sun4u_path_component(dp, tmp_buf);
if (tlb_type == hypervisor) {
sun4v_path_component(dp, tmp_buf);
return;
} else {
sun4u_path_component(dp, tmp_buf);
}
}

static char * __init build_path_component(struct device_node *dp)
Expand Down

0 comments on commit eda4603

Please sign in to comment.