ARM: mmp: support sparse irq
authorHaojian Zhuang <haojian.zhuang@gmail.com>
Wed, 8 Sep 2010 13:42:42 +0000 (09:42 -0400)
committerEric Miao <eric.y.miao@gmail.com>
Sat, 9 Oct 2010 09:07:25 +0000 (17:07 +0800)
Add sparse IRQ support in ARCH_MMP.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
arch/arm/Kconfig
arch/arm/mach-mmp/aspenite.c
arch/arm/mach-mmp/flint.c
arch/arm/mach-mmp/include/mach/irqs.h
arch/arm/mach-mmp/jasper.c
arch/arm/mach-mmp/ttc_dkb.c

index 95ad5f913a735973bc5dae7216351e0d8be59244..6cae2771bf6647e2b68d1224268c0ee81be26361 100644 (file)
@@ -510,6 +510,7 @@ config ARCH_MMP
        select GENERIC_CLOCKEVENTS
        select TICK_ONESHOT
        select PLAT_PXA
+       select SPARSE_IRQ
        help
          Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line.
 
index f04bae6e4ccf20e1250b9544095d7cf2a6cbb443..4681bedbe788f9f4f920e5576c9ced6ed24f96b3 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/nand.h>
+#include <linux/interrupt.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -239,6 +240,7 @@ MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
        .phys_io        = APB_PHYS_BASE,
        .io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
        .map_io         = mmp_map_io,
+       .nr_irqs        = IRQ_BOARD_START,
        .init_irq       = pxa168_init_irq,
        .timer          = &pxa168_timer,
        .init_machine   = common_init,
@@ -248,6 +250,7 @@ MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
        .phys_io        = APB_PHYS_BASE,
        .io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
        .map_io         = mmp_map_io,
+       .nr_irqs        = IRQ_BOARD_START,
        .init_irq       = pxa168_init_irq,
        .timer          = &pxa168_timer,
        .init_machine   = common_init,
index e4312d238eae3ec4e3a4b9a93564a5a265619549..c558425c36138698edf346e92e6d44015040954b 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/smc91x.h>
 #include <linux/io.h>
 #include <linux/gpio.h>
+#include <linux/interrupt.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -25,6 +26,8 @@
 
 #include "common.h"
 
+#define FLINT_NR_IRQS  (IRQ_BOARD_START + 48)
+
 static unsigned long flint_pin_config[] __initdata = {
        /* UART1 */
        GPIO45_UART1_RXD,
@@ -116,6 +119,7 @@ MACHINE_START(FLINT, "Flint Development Platform")
        .phys_io        = APB_PHYS_BASE,
        .io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
        .map_io         = mmp_map_io,
+       .nr_irqs        = FLINT_NR_IRQS,
        .init_irq       = mmp2_init_irq,
        .timer          = &mmp2_timer,
        .init_machine   = flint_init,
index b379cdec4d38410d9caeedf927b6d8cbae4c9ef6..a09d328e2ddd02087cdd7d08c68d6950b0ff6250 100644 (file)
 #define IRQ_GPIO_NUM                   192
 #define IRQ_GPIO(x)                    (IRQ_GPIO_START + (x))
 
-/* Board IRQ - 64 by default, increase if not enough */
 #define IRQ_BOARD_START                        (IRQ_GPIO_START + IRQ_GPIO_NUM)
-#define IRQ_BOARD_END                  (IRQ_BOARD_START + 64)
 
-#define NR_IRQS                                (IRQ_BOARD_END)
+#define NR_IRQS                                (IRQ_BOARD_START)
 
 #endif /* __ASM_MACH_IRQS_H */
index 80c3e7ab1e1700c2aa96bdb9270b0e5a57004b3f..940ee03e3682909449c3dd4fa36b839144276c08 100644 (file)
 #include <linux/regulator/machine.h>
 #include <linux/regulator/max8649.h>
 #include <linux/mfd/max8925.h>
+#include <linux/interrupt.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <mach/addr-map.h>
 #include <mach/mfp-mmp2.h>
 #include <mach/mmp2.h>
-#include <mach/irqs.h>
 
 #include "common.h"
 
+#define JASPER_NR_IRQS         (IRQ_BOARD_START + 48)
+
 static unsigned long jasper_pin_config[] __initdata = {
        /* UART1 */
        GPIO29_UART1_RXD,
@@ -137,6 +139,7 @@ MACHINE_START(MARVELL_JASPER, "Jasper Development Platform")
        .phys_io        = APB_PHYS_BASE,
        .io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
        .map_io         = mmp_map_io,
+       .nr_irqs        = JASPER_NR_IRQS,
        .init_irq       = mmp2_init_irq,
        .timer          = &mmp2_timer,
        .init_machine   = jasper_init,
index ee65e05f0cf15e0118461ce4a7b277e5038a77c2..54571139dc4b7e737ddfe4d95fd4cadeafe663b9 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/onenand.h>
+#include <linux/interrupt.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -24,6 +25,8 @@
 
 #include "common.h"
 
+#define TTCDKB_NR_IRQS         (IRQ_BOARD_START + 24)
+
 static unsigned long ttc_dkb_pin_config[] __initdata = {
        /* UART2 */
        GPIO47_UART2_RXD,
@@ -125,6 +128,7 @@ MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform")
        .phys_io        = APB_PHYS_BASE,
        .io_pg_offst    = (APB_VIRT_BASE >> 18) & 0xfffc,
        .map_io         = mmp_map_io,
+       .nr_irqs        = TTCDKB_NR_IRQS,
        .init_irq       = pxa910_init_irq,
        .timer          = &pxa910_timer,
        .init_machine   = ttc_dkb_init,