diff options
author | Magnus Damm <damm@igel.co.jp> | 2007-08-03 01:24:29 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-09-20 22:57:47 -0400 |
commit | 2635e8558a7ec0002724e3da8c0a221d2c08af33 (patch) | |
tree | 42b3c10234b64cff8cddea080ec553a4d24160f8 /arch/sh | |
parent | d59645d6ba67337ff09369d9da4fc47f7dc361cc (diff) |
sh: intc - remove redundant irq code for shmin
This patch removes redundant interrupt code for the shmin board which
is using a sh770x processor and 4 IRQ lines as individual interrupts
(IRQ-mode).
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/shmin/setup.c | 26 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh770x.c | 4 |
2 files changed, 5 insertions, 25 deletions
diff --git a/arch/sh/boards/shmin/setup.c b/arch/sh/boards/shmin/setup.c index dfd124509f42..16e5dae8ecfb 100644 --- a/arch/sh/boards/shmin/setup.c +++ b/arch/sh/boards/shmin/setup.c | |||
@@ -14,36 +14,12 @@ | |||
14 | 14 | ||
15 | #define PFC_PHCR 0xa400010eUL | 15 | #define PFC_PHCR 0xa400010eUL |
16 | #define INTC_ICR1 0xa4000010UL | 16 | #define INTC_ICR1 0xa4000010UL |
17 | #define INTC_IPRC 0xa4000016UL | ||
18 | |||
19 | static struct ipr_data ipr_irq_table[] = { | ||
20 | { 32, 0, 0, 0 }, | ||
21 | { 33, 0, 4, 0 }, | ||
22 | { 34, 0, 8, 8 }, | ||
23 | { 35, 0, 12, 0 }, | ||
24 | }; | ||
25 | |||
26 | static unsigned long ipr_offsets[] = { | ||
27 | INTC_IPRC, | ||
28 | }; | ||
29 | |||
30 | static struct ipr_desc ipr_irq_desc = { | ||
31 | .ipr_offsets = ipr_offsets, | ||
32 | .nr_offsets = ARRAY_SIZE(ipr_offsets), | ||
33 | |||
34 | .ipr_data = ipr_irq_table, | ||
35 | .nr_irqs = ARRAY_SIZE(ipr_irq_table), | ||
36 | |||
37 | .chip = { | ||
38 | .name = "IPR-shmin", | ||
39 | }, | ||
40 | }; | ||
41 | 17 | ||
42 | static void __init init_shmin_irq(void) | 18 | static void __init init_shmin_irq(void) |
43 | { | 19 | { |
44 | ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ | 20 | ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ |
45 | ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active. | 21 | ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active. |
46 | register_ipr_controller(&ipr_irq_desc); | 22 | plat_irq_setup_pins(IRQ_MODE_IRQ); |
47 | } | 23 | } |
48 | 24 | ||
49 | static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size) | 25 | static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size) |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c index 97570c7fd780..eef505b43f0c 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c | |||
@@ -201,12 +201,16 @@ static int __init sh770x_devices_setup(void) | |||
201 | } | 201 | } |
202 | __initcall(sh770x_devices_setup); | 202 | __initcall(sh770x_devices_setup); |
203 | 203 | ||
204 | #define INTC_ICR1 0xa4000010UL | ||
205 | #define INTC_ICR1_IRQLVL (1<<14) | ||
206 | |||
204 | void __init plat_irq_setup_pins(int mode) | 207 | void __init plat_irq_setup_pins(int mode) |
205 | { | 208 | { |
206 | if (mode == IRQ_MODE_IRQ) { | 209 | if (mode == IRQ_MODE_IRQ) { |
207 | #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | 210 | #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \ |
208 | defined(CONFIG_CPU_SUBTYPE_SH7707) || \ | 211 | defined(CONFIG_CPU_SUBTYPE_SH7707) || \ |
209 | defined(CONFIG_CPU_SUBTYPE_SH7709) | 212 | defined(CONFIG_CPU_SUBTYPE_SH7709) |
213 | ctrl_outw(ctrl_inw(INTC_ICR1) & ~INTC_ICR1_IRQLVL, INTC_ICR1); | ||
210 | register_intc_controller(&intc_desc_irq); | 214 | register_intc_controller(&intc_desc_irq); |
211 | return; | 215 | return; |
212 | #endif | 216 | #endif |