diff options
author | Cyril Chemparathy <cyril@ti.com> | 2010-03-25 17:43:46 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-05-06 18:02:04 -0400 |
commit | 449ef7f6a9c732657938b222f8804d3e34a3603e (patch) | |
tree | e51b0deae656c28dc77215c1ccd4466202ed98ab /arch/arm/mach-davinci/cp_intc.c | |
parent | 8ca2e597fc8f3337cef1f8febab482fe8c52b004 (diff) |
Davinci: cpintc host map configuration
Host map configuration instructs the interrupt controller to route interrupt
channels to FIQ or IRQ lines. Currently, DA8xx family of devices leave these
registers at their reset-default values.
TNETV107X however does not have sane reset defaults, and therefore this
architecture needs to reconfigure the host-map such that channels 0 and 1
go to FIQ, and the remaining channels raise IRQs.
This patch adds an optional host map argument to cp_intc_init() for this.
Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/cp_intc.c')
-rw-r--r-- | arch/arm/mach-davinci/cp_intc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c index 37311d1830eb..2a8d26ee4bbf 100644 --- a/arch/arm/mach-davinci/cp_intc.c +++ b/arch/arm/mach-davinci/cp_intc.c | |||
@@ -101,7 +101,7 @@ static struct irq_chip cp_intc_irq_chip = { | |||
101 | }; | 101 | }; |
102 | 102 | ||
103 | void __init cp_intc_init(void __iomem *base, unsigned short num_irq, | 103 | void __init cp_intc_init(void __iomem *base, unsigned short num_irq, |
104 | u8 *irq_prio) | 104 | u8 *irq_prio, u32 *host_map) |
105 | { | 105 | { |
106 | unsigned num_reg = BITS_TO_LONGS(num_irq); | 106 | unsigned num_reg = BITS_TO_LONGS(num_irq); |
107 | int i; | 107 | int i; |
@@ -157,6 +157,10 @@ void __init cp_intc_init(void __iomem *base, unsigned short num_irq, | |||
157 | cp_intc_write(0x0f0f0f0f, CP_INTC_CHAN_MAP(i)); | 157 | cp_intc_write(0x0f0f0f0f, CP_INTC_CHAN_MAP(i)); |
158 | } | 158 | } |
159 | 159 | ||
160 | if (host_map) | ||
161 | for (i = 0; host_map[i] != -1; i++) | ||
162 | cp_intc_write(host_map[i], CP_INTC_HOST_MAP(i)); | ||
163 | |||
160 | /* Set up genirq dispatching for cp_intc */ | 164 | /* Set up genirq dispatching for cp_intc */ |
161 | for (i = 0; i < num_irq; i++) { | 165 | for (i = 0; i < num_irq; i++) { |
162 | set_irq_chip(i, &cp_intc_irq_chip); | 166 | set_irq_chip(i, &cp_intc_irq_chip); |