]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: intc: remove dependency on NR_IRQS
authorRob Herring <rob.herring@calxeda.com>
Tue, 17 Jan 2012 19:10:25 +0000 (13:10 -0600)
committerRob Herring <rob.herring@calxeda.com>
Thu, 26 Jan 2012 02:37:48 +0000 (20:37 -0600)
SH intc has a compile time dependency on NR_IRQS. Make this dependency a
local define so that shmobile (and ARM in general) can have run-time
NR_IRQS setting.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
drivers/sh/intc/balancing.c
drivers/sh/intc/core.c
drivers/sh/intc/handle.c
drivers/sh/intc/virq.c
include/linux/sh_intc.h

index cec7a96f2c098f632d3a50865b7cece306007f92..bc780807ccb0febf460bc5de45517a8c26b82bd2 100644 (file)
@@ -9,7 +9,7 @@
  */
 #include "internals.h"
 
-static unsigned long dist_handle[NR_IRQS];
+static unsigned long dist_handle[INTC_NR_IRQS];
 
 void intc_balancing_enable(unsigned int irq)
 {
index e53e449b4ecab0b83ab6fe110cb0df4ff8dff963..2fde8970dfd0716dda4fcf69395da9be7bf80214 100644 (file)
@@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;
  * - this needs to be at least 2 for 5-bit priorities on 7780
  */
 static unsigned int default_prio_level = 2;    /* 2 - 16 */
-static unsigned int intc_prio_level[NR_IRQS];  /* for now */
+static unsigned int intc_prio_level[INTC_NR_IRQS];     /* for now */
 
 unsigned int intc_get_dfl_prio_level(void)
 {
index 057ce56829bf37b1c57093eb0734ed80b2dad36a..f461d5300b81d77fcc06915669c3eb9b56ea8e91 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/spinlock.h>
 #include "internals.h"
 
-static unsigned long ack_handle[NR_IRQS];
+static unsigned long ack_handle[INTC_NR_IRQS];
 
 static intc_enum __init intc_grp_id(struct intc_desc *desc,
                                    intc_enum enum_id)
index c7ec49ffd9f63806a73b14e39ec6bbedbf6de8cf..93cec21e788bdb7b4024fa5237b9d7a8801c1333 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/export.h>
 #include "internals.h"
 
-static struct intc_map_entry intc_irq_xlate[NR_IRQS];
+static struct intc_map_entry intc_irq_xlate[INTC_NR_IRQS];
 
 struct intc_virq_list {
        unsigned int irq;
index e1a2ac5c931b1991115fe938d7bf8181b9171557..6aed0805927f8ea608e3bce754974d53a9bc372f 100644 (file)
@@ -3,6 +3,12 @@
 
 #include <linux/ioport.h>
 
+#ifdef CONFIG_SUPERH
+#define INTC_NR_IRQS   512
+#else
+#define INTC_NR_IRQS   1024
+#endif
+
 /*
  * Convert back and forth between INTEVT and IRQ values.
  */