Skip to content

Commit

Permalink
LEON: added raw AMBA vendor/device number to find TIMER, IRQCTRL
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Hellstrom authored and David S. Miller committed Jan 4, 2011
1 parent e2305e3 commit 9742e72
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions arch/sparc/kernel/leon_kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,23 @@ void __init leon_init_timers(irq_handler_t counter_fn)
if (!rootnp)
goto bad;
np = of_find_node_by_name(rootnp, "GAISLER_IRQMP");
if (!np)
goto bad;
if (!np) {
np = of_find_node_by_name(rootnp, "01_00d");
if (!np)
goto bad;
}
pp = of_find_property(np, "reg", &len);
if (!pp)
goto bad;
leon3_irqctrl_regs = *(struct leon3_irqctrl_regs_map **)pp->value;

/* Find GPTIMER Timer Registers base address otherwise bail out. */
np = of_find_node_by_name(rootnp, "GAISLER_GPTIMER");
if (!np)
goto bad;
if (!np) {
np = of_find_node_by_name(np, "01_011");
if (!np)
goto bad;
}
pp = of_find_property(np, "reg", &len);
if (!pp)
goto bad;
Expand Down

0 comments on commit 9742e72

Please sign in to comment.