aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/snapgear
diff options
context:
space:
mode:
authorJamie Lenehan <lenehan@twibble.org>2006-10-30 22:35:02 -0500
committerPaul Mundt <lethal@linux-sh.org>2006-10-30 22:53:28 -0500
commitbd71ab88deab3358241f22ed6c035c427aacc4e7 (patch)
tree632aa998acac7feb7df79684f4c382a6d6bf2294 /arch/sh/boards/snapgear
parent1f6c526c409ed7ecdd02469c46ab4b4a50ebec45 (diff)
sh: Fix IPR-IRQ's for IRQ-chip change breakage.
The conversion from IPR-IRQ to IRQ-chip resulted in the ipr data being allocated in a local variable in make_ipr_irq - breaking anything using IPR interrupts. This changes all of the callers of make_ipr_irq to allocate a static structure containing the IPR data which is then passed to make_ipr_irq. This removes the need for make_ipr_irq to allocate any additional space for the IPR information. Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/snapgear')
-rw-r--r--arch/sh/boards/snapgear/setup.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c
index 540d0bf1644..650fb364594 100644
--- a/arch/sh/boards/snapgear/setup.c
+++ b/arch/sh/boards/snapgear/setup.c
@@ -68,6 +68,13 @@ module_init(eraseconfig_init);
68 * IRL3 = crypto 68 * IRL3 = crypto
69 */ 69 */
70 70
71static struct ipr_data snapgear_ipr_map[] = {
72 make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY);
73 make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY);
74 make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY);
75 make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY);
76};
77
71static void __init init_snapgear_IRQ(void) 78static void __init init_snapgear_IRQ(void)
72{ 79{
73 /* enable individual interrupt mode for externals */ 80 /* enable individual interrupt mode for externals */
@@ -75,10 +82,7 @@ static void __init init_snapgear_IRQ(void)
75 82
76 printk("Setup SnapGear IRQ/IPR ...\n"); 83 printk("Setup SnapGear IRQ/IPR ...\n");
77 84
78 make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); 85 make_ipr_irq(snapgear_ipr_map, ARRAY_SIZE(snapgear_ipr_map));
79 make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY);
80 make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY);
81 make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY);
82} 86}
83 87
84/* 88/*