aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-03-19 10:31:08 -0400
committerArnd Bergmann <arnd@arndb.de>2013-03-25 07:25:41 -0400
commit67d71344fd09223820eb9de39b597ec29f035e89 (patch)
treec4c49ff1d1879d2fa006a22cef4edaf3adb20ece
parentb426476a5c55a3fa2747810f616e395b31ff029e (diff)
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>
-rw-r--r--arch/arm/mach-prima2/timer-prima2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-prima2/timer-prima2.c b/arch/arm/mach-prima2/timer-prima2.c
index 6da584f8a949..982908350b46 100644
--- a/arch/arm/mach-prima2/timer-prima2.c
+++ b/arch/arm/mach-prima2/timer-prima2.c
@@ -16,6 +16,7 @@
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <linux/of.h> 18#include <linux/of.h>
19#include <linux/of_irq.h>
19#include <linux/of_address.h> 20#include <linux/of_address.h>
20#include <mach/map.h> 21#include <mach/map.h>
21#include <asm/sched_clock.h> 22#include <asm/sched_clock.h>
@@ -223,7 +224,6 @@ static struct of_device_id timer_ids[] = {
223static void __init sirfsoc_of_timer_map(void) 224static void __init sirfsoc_of_timer_map(void)
224{ 225{
225 struct device_node *np; 226 struct device_node *np;
226 const unsigned int *intspec;
227 227
228 np = of_find_matching_node(NULL, timer_ids); 228 np = of_find_matching_node(NULL, timer_ids);
229 if (!np) 229 if (!np)
@@ -233,9 +233,7 @@ static void __init sirfsoc_of_timer_map(void)
233 panic("unable to map timer cpu registers\n"); 233 panic("unable to map timer cpu registers\n");
234 234
235 /* Get the interrupts property */ 235 /* Get the interrupts property */
236 intspec = of_get_property(np, "interrupts", NULL); 236 sirfsoc_timer_irq.irq = irq_of_parse_and_map(np, 0);
237 BUG_ON(!intspec);
238 sirfsoc_timer_irq.irq = be32_to_cpup(intspec);
239 237
240 of_node_put(np); 238 of_node_put(np);
241} 239}