Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225720
b: refs/heads/master
c: 9663eb2
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Hellstrom authored and David S. Miller committed Jan 4, 2011
1 parent 92f35e6 commit ca4d1c2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 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: 2791c1a4390085789e37347fc49f7d189fedae88
refs/heads/master: 9663eb21fcfeb1ed9afd73d14bbc4198796cfc7b
27 changes: 19 additions & 8 deletions trunk/arch/sparc/kernel/prom_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,29 @@ static void __init ebus_path_component(struct device_node *dp, char *tmp_buf)
/* "name:vendor:device@irq,addrlo" */
static void __init ambapp_path_component(struct device_node *dp, char *tmp_buf)
{
struct amba_prom_registers *regs; unsigned int *intr;
unsigned int *device, *vendor;
struct amba_prom_registers *regs;
unsigned int *intr, *device, *vendor, reg0;
struct property *prop;
int interrupt = 0;

/* In order to get a unique ID in the device tree (multiple AMBA devices
* may have the same name) the node number is printed
*/
prop = of_find_property(dp, "reg", NULL);
if (!prop)
return;
regs = prop->value;
if (!prop) {
reg0 = (unsigned int)dp->phandle;
} else {
regs = prop->value;
reg0 = regs->phys_addr;
}

/* Not all cores have Interrupt */
prop = of_find_property(dp, "interrupts", NULL);
if (!prop)
return;
intr = prop->value;
intr = &interrupt; /* IRQ0 does not exist */
else
intr = prop->value;

prop = of_find_property(dp, "vendor", NULL);
if (!prop)
return;
Expand All @@ -159,7 +170,7 @@ static void __init ambapp_path_component(struct device_node *dp, char *tmp_buf)

sprintf(tmp_buf, "%s:%d:%d@%x,%x",
dp->name, *vendor, *device,
*intr, regs->phys_addr);
*intr, reg0);
}

static void __init __build_path_component(struct device_node *dp, char *tmp_buf)
Expand Down

0 comments on commit ca4d1c2

Please sign in to comment.