diff options
Diffstat (limited to 'include/asm-arm/arch-omap/irqs.h')
-rw-r--r-- | include/asm-arm/arch-omap/irqs.h | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h index 87973654e625..7464c694859b 100644 --- a/include/asm-arm/arch-omap/irqs.h +++ b/include/asm-arm/arch-omap/irqs.h | |||
@@ -285,7 +285,41 @@ | |||
285 | #define OMAP_MAX_GPIO_LINES 192 | 285 | #define OMAP_MAX_GPIO_LINES 192 |
286 | #define IH_GPIO_BASE (128 + IH2_BASE) | 286 | #define IH_GPIO_BASE (128 + IH2_BASE) |
287 | #define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE) | 287 | #define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE) |
288 | #define IH_BOARD_BASE (16 + IH_MPUIO_BASE) | 288 | #define OMAP_IRQ_END (IH_MPUIO_BASE + 16) |
289 | |||
290 | /* External FPGA handles interrupts on Innovator boards */ | ||
291 | #define OMAP_FPGA_IRQ_BASE (OMAP_IRQ_END) | ||
292 | #ifdef CONFIG_MACH_OMAP_INNOVATOR | ||
293 | #define OMAP_FPGA_NR_IRQS 24 | ||
294 | #else | ||
295 | #define OMAP_FPGA_NR_IRQS 0 | ||
296 | #endif | ||
297 | #define OMAP_FPGA_IRQ_END (OMAP_FPGA_IRQ_BASE + OMAP_FPGA_NR_IRQS) | ||
298 | |||
299 | /* External TWL4030 can handle interrupts on 2430 and 34xx boards */ | ||
300 | #define TWL4030_IRQ_BASE (OMAP_FPGA_IRQ_END) | ||
301 | #ifdef CONFIG_TWL4030_CORE | ||
302 | #define TWL4030_BASE_NR_IRQS 8 | ||
303 | #define TWL4030_PWR_NR_IRQS 8 | ||
304 | #else | ||
305 | #define TWL4030_BASE_NR_IRQS 0 | ||
306 | #define TWL4030_PWR_NR_IRQS 0 | ||
307 | #endif | ||
308 | #define TWL4030_IRQ_END (TWL4030_IRQ_BASE + TWL4030_BASE_NR_IRQS) | ||
309 | #define TWL4030_PWR_IRQ_BASE TWL4030_IRQ_END | ||
310 | #define TWL4030_PWR_IRQ_END (TWL4030_PWR_IRQ_BASE + TWL4030_PWR_NR_IRQS) | ||
311 | |||
312 | /* External TWL4030 gpio interrupts are optional */ | ||
313 | #define TWL4030_GPIO_IRQ_BASE TWL4030_PWR_IRQ_END | ||
314 | #ifdef CONFIG_TWL4030_GPIO | ||
315 | #define TWL4030_GPIO_NR_IRQS 18 | ||
316 | #else | ||
317 | #define TWL4030_GPIO_NR_IRQS 0 | ||
318 | #endif | ||
319 | #define TWL4030_GPIO_IRQ_END (TWL4030_GPIO_IRQ_BASE + TWL4030_GPIO_NR_IRQS) | ||
320 | |||
321 | /* Total number of interrupts depends on the enabled blocks above */ | ||
322 | #define NR_IRQS TWL4030_GPIO_IRQ_END | ||
289 | 323 | ||
290 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) | 324 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) |
291 | 325 | ||
@@ -293,14 +327,6 @@ | |||
293 | extern void omap_init_irq(void); | 327 | extern void omap_init_irq(void); |
294 | #endif | 328 | #endif |
295 | 329 | ||
296 | /* | ||
297 | * The definition of NR_IRQS is in board-specific header file, which is | ||
298 | * included via hardware.h | ||
299 | */ | ||
300 | #include <asm/hardware.h> | 330 | #include <asm/hardware.h> |
301 | 331 | ||
302 | #ifndef NR_IRQS | ||
303 | #define NR_IRQS IH_BOARD_BASE | ||
304 | #endif | ||
305 | |||
306 | #endif | 332 | #endif |