aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-12-09 18:49:23 -0500
committerTony Lindgren <tony@atomide.com>2010-12-09 18:49:23 -0500
commit03a9e5126147c9f92aeba4b34f62b15b625087fb (patch)
tree6673d24a716ca01911b69f541b1c7bd56c0a827a
parentcf7d7e5a1980d1116ee152d25dac382b112b9c17 (diff)
omap1: Use asm_irq_flags for entry-macro.S
Initialize asm_irq_flags in omap_init_irq and use it in get_irqnr_and_base to detect between omap7xx and omap15xx/16xx. Note that both INT_1510_IH2_IRQ and INT_1510_IH2_IRQ are defined as 0, so use INT_1510_IH2_IRQ for both of them. Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap1/include/mach/entry-macro.S27
-rw-r--r--arch/arm/mach-omap1/irq.c5
-rw-r--r--arch/arm/plat-omap/include/plat/irqs.h2
3 files changed, 20 insertions, 14 deletions
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S
index df9060edda2..c9be6d4d83e 100644
--- a/arch/arm/mach-omap1/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap1/include/mach/entry-macro.S
@@ -14,18 +14,17 @@
14#include <mach/irqs.h> 14#include <mach/irqs.h>
15#include <asm/hardware/gic.h> 15#include <asm/hardware/gic.h>
16 16
17#if (defined(CONFIG_ARCH_OMAP730)||defined(CONFIG_ARCH_OMAP850)) && \ 17/*
18 (defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)) 18 * We use __glue to avoid errors with multiple definitions of
19#error "FIXME: OMAP7XX doesn't support multiple-OMAP" 19 * .globl omap_irq_flags as it's included from entry-armv.S but not
20#elif defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 20 * from entry-common.S.
21#define INT_IH2_IRQ INT_7XX_IH2_IRQ 21 */
22#elif defined(CONFIG_ARCH_OMAP15XX) 22#ifdef __glue
23#define INT_IH2_IRQ INT_1510_IH2_IRQ 23 .pushsection .data
24#elif defined(CONFIG_ARCH_OMAP16XX) 24 .globl omap_irq_flags
25#define INT_IH2_IRQ INT_1610_IH2_IRQ 25omap_irq_flags:
26#else 26 .word 0
27#warning "IH2 IRQ defaulted" 27 .popsection
28#define INT_IH2_IRQ INT_1510_IH2_IRQ
29#endif 28#endif
30 29
31 .macro disable_fiq 30 .macro disable_fiq
@@ -47,9 +46,11 @@
47 beq 1510f 46 beq 1510f
48 47
49 ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET] 48 ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
49 ldr \tmp, =omap_irq_flags @ irq flags address
50 ldr \tmp, [\tmp, #0] @ irq flags value
50 cmp \irqnr, #0 51 cmp \irqnr, #0
51 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] 52 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
52 cmpeq \irqnr, #INT_IH2_IRQ 53 cmpeq \irqnr, \tmp
53 ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE) 54 ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE)
54 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] 55 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
55 addeqs \irqnr, \irqnr, #32 56 addeqs \irqnr, \irqnr, #32
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c
index db913c34d1f..6bddbc869f4 100644
--- a/arch/arm/mach-omap1/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -176,26 +176,31 @@ static struct irq_chip omap_irq_chip = {
176 176
177void __init omap_init_irq(void) 177void __init omap_init_irq(void)
178{ 178{
179 extern unsigned int omap_irq_flags;
179 int i, j; 180 int i, j;
180 181
181#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 182#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
182 if (cpu_is_omap7xx()) { 183 if (cpu_is_omap7xx()) {
184 omap_irq_flags = INT_7XX_IH2_IRQ;
183 irq_banks = omap7xx_irq_banks; 185 irq_banks = omap7xx_irq_banks;
184 irq_bank_count = ARRAY_SIZE(omap7xx_irq_banks); 186 irq_bank_count = ARRAY_SIZE(omap7xx_irq_banks);
185 } 187 }
186#endif 188#endif
187#ifdef CONFIG_ARCH_OMAP15XX 189#ifdef CONFIG_ARCH_OMAP15XX
188 if (cpu_is_omap1510()) { 190 if (cpu_is_omap1510()) {
191 omap_irq_flags = INT_1510_IH2_IRQ;
189 irq_banks = omap1510_irq_banks; 192 irq_banks = omap1510_irq_banks;
190 irq_bank_count = ARRAY_SIZE(omap1510_irq_banks); 193 irq_bank_count = ARRAY_SIZE(omap1510_irq_banks);
191 } 194 }
192 if (cpu_is_omap310()) { 195 if (cpu_is_omap310()) {
196 omap_irq_flags = INT_1510_IH2_IRQ;
193 irq_banks = omap310_irq_banks; 197 irq_banks = omap310_irq_banks;
194 irq_bank_count = ARRAY_SIZE(omap310_irq_banks); 198 irq_bank_count = ARRAY_SIZE(omap310_irq_banks);
195 } 199 }
196#endif 200#endif
197#if defined(CONFIG_ARCH_OMAP16XX) 201#if defined(CONFIG_ARCH_OMAP16XX)
198 if (cpu_is_omap16xx()) { 202 if (cpu_is_omap16xx()) {
203 omap_irq_flags = INT_1510_IH2_IRQ;
199 irq_banks = omap1610_irq_banks; 204 irq_banks = omap1610_irq_banks;
200 irq_bank_count = ARRAY_SIZE(omap1610_irq_banks); 205 irq_bank_count = ARRAY_SIZE(omap1610_irq_banks);
201 } 206 }
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index 65e20a68671..2910de921c5 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -77,7 +77,7 @@
77/* 77/*
78 * OMAP-1610 specific IRQ numbers for interrupt handler 1 78 * OMAP-1610 specific IRQ numbers for interrupt handler 1
79 */ 79 */
80#define INT_1610_IH2_IRQ 0 80#define INT_1610_IH2_IRQ INT_1510_IH2_IRQ
81#define INT_1610_IH2_FIQ 2 81#define INT_1610_IH2_FIQ 2
82#define INT_1610_McBSP2_TX 4 82#define INT_1610_McBSP2_TX 4
83#define INT_1610_McBSP2_RX 5 83#define INT_1610_McBSP2_RX 5