aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/irq.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-06-01 10:40:11 -0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2013-06-21 10:35:26 -0400
commit546c830c90beb7d3e398007715fd1b631c6c060a (patch)
tree3cc13cb4c3adba7026f19a4072b5e58fe99c11d6 /arch/arm/mach-at91/irq.c
parent133e00116b5bc76110bcc41ded369489209b641f (diff)
ARM: at91: fix at91_extern_irq usage for non-dt boards
Since 4b68520dc0ec96153bc0d87bca5ffba508edfcf ARM: at91: add AIC5 support we allocate the at91_extern_irq. This patch makes it static and stores the non-dt extern irq in the soc structure. It is then possible to use a at91_get_extern_irq() function to get the value for outside of the irq driver. It is useful for passing its value to at91_aic_init(). Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> [nicolas.ferre@atmel.com: rework commit message] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/irq.c')
-rw-r--r--arch/arm/mach-at91/irq.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c
index e0ca59171022..3d192c5aee66 100644
--- a/arch/arm/mach-at91/irq.c
+++ b/arch/arm/mach-at91/irq.c
@@ -232,7 +232,14 @@ static void __maybe_unused at91_aic5_eoi(struct irq_data *d)
232 at91_aic_write(AT91_AIC5_EOICR, 0); 232 at91_aic_write(AT91_AIC5_EOICR, 0);
233} 233}
234 234
235unsigned long *at91_extern_irq; 235static unsigned long *at91_extern_irq;
236
237u32 at91_get_extern_irq(void)
238{
239 if (!at91_extern_irq)
240 return 0;
241 return *at91_extern_irq;
242}
236 243
237#define is_extern_irq(hwirq) test_bit(hwirq, at91_extern_irq) 244#define is_extern_irq(hwirq) test_bit(hwirq, at91_extern_irq)
238 245