Skip to content

Commit 67d7134

Browse files
committed
ARM: sirf: fix prima2 interrupt lookup
We must not read the interrupts property manually but instead use irq_of_parse_and_map() to guarantee that we get the correct interrupt number once we stop using the legacy IRQ domain. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Barry Song <Baohua.Song@csr.com>
1 parent b426476 commit 67d7134

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎arch/arm/mach-prima2/timer-prima2.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/err.h>
1717
#include <linux/slab.h>
1818
#include <linux/of.h>
19+
#include <linux/of_irq.h>
1920
#include <linux/of_address.h>
2021
#include <mach/map.h>
2122
#include <asm/sched_clock.h>
@@ -223,7 +224,6 @@ static struct of_device_id timer_ids[] = {
223224
static void __init sirfsoc_of_timer_map(void)
224225
{
225226
struct device_node *np;
226-
const unsigned int *intspec;
227227

228228
np = of_find_matching_node(NULL, timer_ids);
229229
if (!np)
@@ -233,9 +233,7 @@ static void __init sirfsoc_of_timer_map(void)
233233
panic("unable to map timer cpu registers\n");
234234

235235
/* Get the interrupts property */
236-
intspec = of_get_property(np, "interrupts", NULL);
237-
BUG_ON(!intspec);
238-
sirfsoc_timer_irq.irq = be32_to_cpup(intspec);
236+
sirfsoc_timer_irq.irq = irq_of_parse_and_map(np, 0);
239237

240238
of_node_put(np);
241239
}

0 commit comments

Comments
 (0)