Skip to content

Commit 9742e72

Browse files
daniel-hellstromdavem330
authored andcommitted
LEON: added raw AMBA vendor/device number to find TIMER, IRQCTRL
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e2305e3 commit 9742e72

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎arch/sparc/kernel/leon_kernel.c‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,23 @@ void __init leon_init_timers(irq_handler_t counter_fn)
120120
if (!rootnp)
121121
goto bad;
122122
np = of_find_node_by_name(rootnp, "GAISLER_IRQMP");
123-
if (!np)
124-
goto bad;
123+
if (!np) {
124+
np = of_find_node_by_name(rootnp, "01_00d");
125+
if (!np)
126+
goto bad;
127+
}
125128
pp = of_find_property(np, "reg", &len);
126129
if (!pp)
127130
goto bad;
128131
leon3_irqctrl_regs = *(struct leon3_irqctrl_regs_map **)pp->value;
129132

130133
/* Find GPTIMER Timer Registers base address otherwise bail out. */
131134
np = of_find_node_by_name(rootnp, "GAISLER_GPTIMER");
132-
if (!np)
133-
goto bad;
135+
if (!np) {
136+
np = of_find_node_by_name(np, "01_011");
137+
if (!np)
138+
goto bad;
139+
}
134140
pp = of_find_property(np, "reg", &len);
135141
if (!pp)
136142
goto bad;

0 commit comments

Comments
 (0)