ARM: SAMSUNG: Move timer irq numbers to end of linux irq space
authorThomas Abraham <thomas.abraham@linaro.org>
Wed, 2 Nov 2011 10:13:25 +0000 (19:13 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Fri, 23 Dec 2011 01:04:39 +0000 (10:04 +0900)
The timer irqs statically mapped from linux irq numbers 11 to 15 are
moved to the end of the statically mapped linux irq space. The GIC PPI
and SPI interrupts are relocated to start from 16 and 32 of the linux
irq space. This is a required to add device tree support for GIC and
Interrupt combiner for EXYNOS4.

A new macro 'IRQ_TIMER_BASE' specifies a platform specific base of the
linux virq number for the timer interrupts. For exynos4, this base is
set to end of the linux virq space.  For the other S5P platforms, the
existing base '11' is retained.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos/include/mach/entry-macro.S
arch/arm/mach-exynos/include/mach/irqs.h
arch/arm/mach-s5p64x0/include/mach/irqs.h
arch/arm/mach-s5pc100/include/mach/irqs.h
arch/arm/mach-s5pv210/include/mach/irqs.h
arch/arm/plat-samsung/include/plat/irqs.h

index f5e9fd8e37b4fc0d4e2657ba3739ea2d78aa7151..d7dfcd7eb9219cb68e944c2b4996737d9bb48355 100644 (file)
@@ -72,7 +72,6 @@
                cmpcc   \irqnr, \irqnr
                cmpne   \irqnr, \tmp
                cmpcs   \irqnr, \irqnr
-               addne   \irqnr, \irqnr, #32
 
                .endm
 
index dfd4b7eecb9076f8d00716f4a41223acae094b92..713dd5251c64d7aa1303b1bb034ddd773943476d 100644 (file)
 
 /* PPI: Private Peripheral Interrupt */
 
-#define IRQ_PPI(x)             S5P_IRQ(x+16)
+#define IRQ_PPI(x)             (x+16)
 
 #define IRQ_MCT_LOCALTIMER     IRQ_PPI(12)
 
 /* SPI: Shared Peripheral Interrupt */
 
-#define IRQ_SPI(x)             S5P_IRQ(x+32)
+#define IRQ_SPI(x)             (x+32)
 
 #define IRQ_EINT0              IRQ_SPI(16)
 #define IRQ_EINT1              IRQ_SPI(17)
 #define IRQ_GPIO2_NR_GROUPS    9
 #define IRQ_GPIO_END           (S5P_GPIOINT_BASE + S5P_GPIOINT_COUNT)
 
+#define IRQ_TIMER_BASE         (IRQ_GPIO_END + 64)
+
 /* Set the default NR_IRQS */
-#define NR_IRQS                        (IRQ_GPIO_END + 64)
+#define NR_IRQS                        (IRQ_TIMER_BASE + IRQ_TIMER_COUNT)
 
 #endif /* __ASM_ARCH_IRQS_H */
index 53982db9d25989d27c09d822b0c595a061c41874..5b845e849b300da0f1e4a3dd55cd859103ab053f 100644 (file)
 
 #define IRQ_EINT_GROUP(grp, x) (IRQ_EINT_GROUP##grp##_BASE + (x))
 
+#define IRQ_TIMER_BASE         (11)
+
 /* Set the default NR_IRQS */
 
 #define NR_IRQS                        (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR + 1)
index d2eb4757381f30b5464f061ad6e9d9a4771cffe5..2870f12c7926d5967727d08fbfb11aef46df1cc1 100644 (file)
@@ -97,6 +97,8 @@
 #define IRQ_SDMFIQ             S5P_IRQ_VIC2(31)
 #define IRQ_VIC_END            S5P_IRQ_VIC2(31)
 
+#define IRQ_TIMER_BASE         (11)
+
 #define S5P_EINT_BASE1         (S5P_IRQ_VIC0(0))
 #define S5P_EINT_BASE2         (IRQ_VIC_END + 1)
 
index 5e0de3a31f3d7f621f32eba0d6e5a448ccdad559..e777e010ed2e4e55da635479487c1af1cb9c8da9 100644 (file)
 #define IRQ_MDNIE3             S5P_IRQ_VIC3(8)
 #define IRQ_VIC_END            S5P_IRQ_VIC3(31)
 
+#define IRQ_TIMER_BASE         (11)
+
 #define S5P_EINT_BASE1         (S5P_IRQ_VIC0(0))
 #define S5P_EINT_BASE2         (IRQ_VIC_END + 1)
 
index 08d1a7ef97b7e4a634e197893dc51cff29dd246a..df46b776976aca73c186226cfa505e01ae05eec3 100644 (file)
 #define S5P_IRQ_VIC2(x)                (S5P_VIC2_BASE + (x))
 #define S5P_IRQ_VIC3(x)                (S5P_VIC3_BASE + (x))
 
-#define S5P_TIMER_IRQ(x)       (11 + (x))
+#define S5P_TIMER_IRQ(x)       (IRQ_TIMER_BASE + (x))
 
 #define IRQ_TIMER0             S5P_TIMER_IRQ(0)
 #define IRQ_TIMER1             S5P_TIMER_IRQ(1)
 #define IRQ_TIMER2             S5P_TIMER_IRQ(2)
 #define IRQ_TIMER3             S5P_TIMER_IRQ(3)
 #define IRQ_TIMER4             S5P_TIMER_IRQ(4)
+#define IRQ_TIMER_COUNT                (5)
 
 #define IRQ_EINT(x)            ((x) < 16 ? ((x) + S5P_EINT_BASE1) \
                                        : ((x) - 16 + S5P_EINT_BASE2))