| From f6e4e54e9b72195a1a6e84e2e3a779db164c8f60 Mon Sep 17 00:00:00 2001 |
| From: Rob Herring <rob.herring@calxeda.com> |
| Date: Tue, 17 Jan 2012 13:10:25 -0600 |
| Subject: sh: intc: remove dependency on NR_IRQS |
| |
| 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> |
| (cherry picked from commit 0f55239348aa85021d8bf8b63d84a796fcc142a4) |
| |
| Signed-off-by: Simon Horman <horms@verge.net.au> |
| --- |
| drivers/sh/intc/balancing.c | 2 +- |
| drivers/sh/intc/core.c | 2 +- |
| drivers/sh/intc/handle.c | 2 +- |
| drivers/sh/intc/virq.c | 2 +- |
| include/linux/sh_intc.h | 6 ++++++ |
| 5 files changed, 10 insertions(+), 4 deletions(-) |
| |
| diff --git a/drivers/sh/intc/balancing.c b/drivers/sh/intc/balancing.c |
| index cec7a96..bc78080 100644 |
| --- a/drivers/sh/intc/balancing.c |
| +++ b/drivers/sh/intc/balancing.c |
| @@ -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) |
| { |
| diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c |
| index 8e1fcd5..7e562cc 100644 |
| --- a/drivers/sh/intc/core.c |
| +++ b/drivers/sh/intc/core.c |
| @@ -43,7 +43,7 @@ static 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) |
| { |
| diff --git a/drivers/sh/intc/handle.c b/drivers/sh/intc/handle.c |
| index 057ce56..f461d53 100644 |
| --- a/drivers/sh/intc/handle.c |
| +++ b/drivers/sh/intc/handle.c |
| @@ -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) |
| diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c |
| index c7ec49f..93cec21 100644 |
| --- a/drivers/sh/intc/virq.c |
| +++ b/drivers/sh/intc/virq.c |
| @@ -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; |
| diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h |
| index e1a2ac5..6aed080 100644 |
| --- a/include/linux/sh_intc.h |
| +++ b/include/linux/sh_intc.h |
| @@ -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. |
| */ |
| -- |
| 1.7.10 |
| |