From a15de5977c3233d671fc9e5d4150ad1e3d4b6df9 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 11 Oct 2009 00:33:51 +0200 Subject: s3c24xx: Add support for board IRQs Some boards have a need for a set of extra IRQ numbers, for example some multifunction devices which do irq demultiplexing require them. This patch adds S3C2410_BOARD_NR_IRQS which specifies the number of extra board IRQs. Board specific code would use S3C2410_BOARD_IRQ_START to get the number of it's first irq. Since it is possible to support a multiple boards with a single kernel and there is no easy way to set a CONFIG option to multiple values and only use the maximum each board which needs board IRQs has do be explicitly added to irqs.h Signed-off-by: Lars-Peter Clausen --- arch/arm/mach-s3c2410/include/mach/irqs.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-s3c2410/include/mach/irqs.h b/arch/arm/mach-s3c2410/include/mach/irqs.h index 6c12c6312ad..ceb1733a709 100644 --- a/arch/arm/mach-s3c2410/include/mach/irqs.h +++ b/arch/arm/mach-s3c2410/include/mach/irqs.h @@ -153,9 +153,9 @@ #define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28) #ifdef CONFIG_CPU_S3C2443 -#define NR_IRQS (IRQ_S3C2443_AC97+1) +#define S3C2410_NR_INTERNAL_IRQS (IRQ_S3C2443_AC97+1) #else -#define NR_IRQS (IRQ_S3C2440_AC97+1) +#define S3C2410_NR_INTERNAL_IRQS (IRQ_S3C2440_AC97+1) #endif /* compatibility define. */ @@ -173,4 +173,22 @@ /* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */ #define FIQ_START IRQ_EINT0 +/* Board specific IRQs + * If your board needs a extra set of IRQ numbers add it to the list here. + * Make sure that the numbers are kept in descending, so if multiple boards are + * selected the maximum will be used and there are enough IRQ numbers available + * for each board. + */ + +#if 0 +/* Number of board specific irqs go here */ +#else +#define S3C2410_NR_BOARD_IRQS 0 +#endif + +#define S3C2410_BOARD_IRQ_START S3C2410_NR_INTERNAL_IRQS +#define S3C2410_BOARD_IRQ_END (S3C2410_BOARD_IRQ_START + S3C2410_NR_BOARD_IRQS) + +#define NR_IRQS S3C2410_BOARD_IRQ_END + #endif /* __ASM_ARCH_IRQ_H */ -- cgit v1.2.3