ARM: 7343/1: sa11x0: convert to sparse IRQ
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 23 Feb 2012 13:29:33 +0000 (14:29 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 25 Mar 2012 22:57:22 +0000 (23:57 +0100)
Now that Neponset, UCB1x00 and SA1111 are all converted to use the IRQ
allocation interfaces, we can enable sparse IRQ support for SA11x0
platforms.

arch/arm/Kconfig
arch/arm/mach-sa1100/badge4.c
arch/arm/mach-sa1100/include/mach/irqs.h
arch/arm/mach-sa1100/jornada720.c
arch/arm/mach-sa1100/neponset.c

index a48aecc17eacc2e3d3f5cf4b0ff4183f29b33440..34aed718faed9348f6d5e264169de83405b9e652 100644 (file)
@@ -760,6 +760,7 @@ config ARCH_SA1100
        select ARCH_REQUIRE_GPIOLIB
        select HAVE_IDE
        select NEED_MACH_MEMORY_H
+       select SPARSE_IRQ
        help
          Support for StrongARM 11x0 based boards.
 
index 8c805425b6846fc13462c942dce98d92452db122..e0f0c030258c5614bedf2abc8bd5d05e946e4233 100644 (file)
@@ -57,7 +57,6 @@ static void badge4_sa1111_disable(void *data, unsigned devid)
 }
 
 static struct sa1111_platform_data sa1111_info = {
-       .irq_base       = IRQ_BOARD_END,
        .disable_devs   = SA1111_DEVID_PS2_MSE,
        .enable         = badge4_sa1111_enable,
        .disable        = badge4_sa1111_disable,
index 0ad78218c9f31224963956fbbbcde3d371576b83..3790298b7142abcadd36f7103c462966e1f62e68 100644 (file)
 /*
  * Figure out the MAX IRQ number.
  *
- * If we have an SA1111, the max IRQ is S1_BVD1_STSCHG+1.
- * If we have an LoCoMo, the max IRQ is IRQ_BOARD_START + 4
- * Otherwise, we have the standard IRQs only.
+ * Neponset, SA1111 and UCB1x00 are sparse IRQ aware, so can dynamically
+ * allocate their IRQs above NR_IRQS.
+ *
+ * LoCoMo has 4 additional IRQs, but is not sparse IRQ aware, and so has
+ * to be included in the NR_IRQS calculation.
  */
-#ifdef CONFIG_SA1111
-#define NR_IRQS                        (IRQ_BOARD_END + 55)
-#elif defined(CONFIG_SHARP_LOCOMO)
-#define NR_IRQS                        (IRQ_BOARD_START + 4)
+#ifdef CONFIG_SHARP_LOCOMO
+#define NR_IRQS_LOCOMO         4
 #else
-#define NR_IRQS                        (IRQ_BOARD_START)
+#define NR_IRQS_LOCOMO         0
 #endif
 
-#define SA1100_NR_IRQS NR_IRQS
+#ifndef NR_IRQS
+#define NR_IRQS (IRQ_BOARD_START + NR_IRQS_LOCOMO)
+#endif
+#define SA1100_NR_IRQS (IRQ_BOARD_START + NR_IRQS_LOCOMO)
index b7dcb1887aca38b149e8054aa83758db6ae1d7b8..ca7a7e834720a1cb3ef692f35f1d1b09ec2cf5f0 100644 (file)
@@ -195,7 +195,6 @@ static struct resource sa1111_resources[] = {
 };
 
 static struct sa1111_platform_data sa1111_info = {
-       .irq_base       = IRQ_BOARD_END,
        .disable_devs   = SA1111_DEVID_PS2_MSE,
 };
 
index b04a8f1928fc1709605c27c6a766eacbb6fb7aad..6c58f01b358a1064db6a869ee2cbac52b4b8ba0a 100644 (file)
@@ -229,7 +229,6 @@ static struct irq_chip nochip = {
 };
 
 static struct sa1111_platform_data sa1111_info = {
-       .irq_base       = IRQ_BOARD_END,
        .disable_devs   = SA1111_DEVID_PS2_MSE,
 };