diff options
author | Jamie Lenehan <lenehan@twibble.org> | 2006-10-30 22:35:02 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-10-30 22:53:28 -0500 |
commit | bd71ab88deab3358241f22ed6c035c427aacc4e7 (patch) | |
tree | 632aa998acac7feb7df79684f4c382a6d6bf2294 /arch/sh/boards/se/770x | |
parent | 1f6c526c409ed7ecdd02469c46ab4b4a50ebec45 (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/se/770x')
-rw-r--r-- | arch/sh/boards/se/770x/irq.c | 80 |
1 files changed, 43 insertions, 37 deletions
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c index cff6700bbafd..fcd7cd7fa05f 100644 --- a/arch/sh/boards/se/770x/irq.c +++ b/arch/sh/boards/se/770x/irq.c | |||
@@ -13,6 +13,48 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/se.h> | 14 | #include <asm/se.h> |
15 | 15 | ||
16 | static struct ipr_data se770x_ipr_map[] = { | ||
17 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
18 | /* This is default value */ | ||
19 | { 0xf-0x2, BCR_ILCRA, 2, 0x2 }, | ||
20 | { 0xf-0xa, BCR_ILCRA, 1, 0xa }, | ||
21 | { 0xf-0x5, BCR_ILCRB, 0, 0x5 }, | ||
22 | { 0xf-0x8, BCR_ILCRC, 1, 0x8 }, | ||
23 | { 0xf-0xc, BCR_ILCRC, 0, 0xc }, | ||
24 | { 0xf-0xe, BCR_ILCRD, 3, 0xe }, | ||
25 | { 0xf-0x3, BCR_ILCRD, 1, 0x3 }, /* LAN */ | ||
26 | { 0xf-0xd, BCR_ILCRE, 2, 0xd }, | ||
27 | { 0xf-0x9, BCR_ILCRE, 1, 0x9 }, | ||
28 | { 0xf-0x1, BCR_ILCRE, 0, 0x1 }, | ||
29 | { 0xf-0xf, BCR_ILCRF, 3, 0xf }, | ||
30 | { 0xf-0xb, BCR_ILCRF, 1, 0xb }, | ||
31 | { 0xf-0x7, BCR_ILCRG, 3, 0x7 }, | ||
32 | { 0xf-0x6, BCR_ILCRG, 2, 0x6 }, | ||
33 | { 0xf-0x4, BCR_ILCRG, 1, 0x4 }, | ||
34 | #else | ||
35 | { 14, BCR_ILCRA, 2, 0x0f-14 }, | ||
36 | { 12, BCR_ILCRA, 1, 0x0f-12 }, | ||
37 | { 8, BCR_ILCRB, 1, 0x0f- 8 }, | ||
38 | { 6, BCR_ILCRC, 3, 0x0f- 6 }, | ||
39 | { 5, BCR_ILCRC, 2, 0x0f- 5 }, | ||
40 | { 4, BCR_ILCRC, 1, 0x0f- 4 }, | ||
41 | { 3, BCR_ILCRC, 0, 0x0f- 3 }, | ||
42 | { 1, BCR_ILCRD, 3, 0x0f- 1 }, | ||
43 | |||
44 | { 10, BCR_ILCRD, 1, 0x0f-10 }, /* LAN */ | ||
45 | |||
46 | { 0, BCR_ILCRE, 3, 0x0f- 0 }, /* PCIRQ3 */ | ||
47 | { 11, BCR_ILCRE, 2, 0x0f-11 }, /* PCIRQ2 */ | ||
48 | { 9, BCR_ILCRE, 1, 0x0f- 9 }, /* PCIRQ1 */ | ||
49 | { 7, BCR_ILCRE, 0, 0x0f- 7 }, /* PCIRQ0 */ | ||
50 | |||
51 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ | ||
52 | /* NOTE: #2 and #13 are not used on PC */ | ||
53 | { 13, BCR_ILCRG, 1, 0x0f-13 }, /* SLOTIRQ2 */ | ||
54 | { 2, BCR_ILCRG, 0, 0x0f- 2 }, /* SLOTIRQ1 */ | ||
55 | #endif | ||
56 | }; | ||
57 | |||
16 | /* | 58 | /* |
17 | * Initialize IRQ setting | 59 | * Initialize IRQ setting |
18 | */ | 60 | */ |
@@ -38,42 +80,6 @@ void __init init_se_IRQ(void) | |||
38 | ctrl_outw(0, BCR_ILCRE); | 80 | ctrl_outw(0, BCR_ILCRE); |
39 | ctrl_outw(0, BCR_ILCRF); | 81 | ctrl_outw(0, BCR_ILCRF); |
40 | ctrl_outw(0, BCR_ILCRG); | 82 | ctrl_outw(0, BCR_ILCRG); |
41 | /* This is default value */ | ||
42 | make_ipr_irq(0xf-0x2, BCR_ILCRA, 2, 0x2); | ||
43 | make_ipr_irq(0xf-0xa, BCR_ILCRA, 1, 0xa); | ||
44 | make_ipr_irq(0xf-0x5, BCR_ILCRB, 0, 0x5); | ||
45 | make_ipr_irq(0xf-0x8, BCR_ILCRC, 1, 0x8); | ||
46 | make_ipr_irq(0xf-0xc, BCR_ILCRC, 0, 0xc); | ||
47 | make_ipr_irq(0xf-0xe, BCR_ILCRD, 3, 0xe); | ||
48 | make_ipr_irq(0xf-0x3, BCR_ILCRD, 1, 0x3); /* LAN */ | ||
49 | make_ipr_irq(0xf-0xd, BCR_ILCRE, 2, 0xd); | ||
50 | make_ipr_irq(0xf-0x9, BCR_ILCRE, 1, 0x9); | ||
51 | make_ipr_irq(0xf-0x1, BCR_ILCRE, 0, 0x1); | ||
52 | make_ipr_irq(0xf-0xf, BCR_ILCRF, 3, 0xf); | ||
53 | make_ipr_irq(0xf-0xb, BCR_ILCRF, 1, 0xb); | ||
54 | make_ipr_irq(0xf-0x7, BCR_ILCRG, 3, 0x7); | ||
55 | make_ipr_irq(0xf-0x6, BCR_ILCRG, 2, 0x6); | ||
56 | make_ipr_irq(0xf-0x4, BCR_ILCRG, 1, 0x4); | ||
57 | #else | ||
58 | make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-14); | ||
59 | make_ipr_irq(12, BCR_ILCRA, 1, 0x0f-12); | ||
60 | make_ipr_irq( 8, BCR_ILCRB, 1, 0x0f- 8); | ||
61 | make_ipr_irq( 6, BCR_ILCRC, 3, 0x0f- 6); | ||
62 | make_ipr_irq( 5, BCR_ILCRC, 2, 0x0f- 5); | ||
63 | make_ipr_irq( 4, BCR_ILCRC, 1, 0x0f- 4); | ||
64 | make_ipr_irq( 3, BCR_ILCRC, 0, 0x0f- 3); | ||
65 | make_ipr_irq( 1, BCR_ILCRD, 3, 0x0f- 1); | ||
66 | |||
67 | make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); /* LAN */ | ||
68 | |||
69 | make_ipr_irq( 0, BCR_ILCRE, 3, 0x0f- 0); /* PCIRQ3 */ | ||
70 | make_ipr_irq(11, BCR_ILCRE, 2, 0x0f-11); /* PCIRQ2 */ | ||
71 | make_ipr_irq( 9, BCR_ILCRE, 1, 0x0f- 9); /* PCIRQ1 */ | ||
72 | make_ipr_irq( 7, BCR_ILCRE, 0, 0x0f- 7); /* PCIRQ0 */ | ||
73 | |||
74 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ | ||
75 | /* NOTE: #2 and #13 are not used on PC */ | ||
76 | make_ipr_irq(13, BCR_ILCRG, 1, 0x0f-13); /* SLOTIRQ2 */ | ||
77 | make_ipr_irq( 2, BCR_ILCRG, 0, 0x0f- 2); /* SLOTIRQ1 */ | ||
78 | #endif | 83 | #endif |
84 | make_ipr_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); | ||
79 | } | 85 | } |