diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh2/setup-sh7619.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh2/setup-sh7619.c | 62 |
1 files changed, 29 insertions, 33 deletions
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c index 79283e6c1d8f..f83ff8a68f35 100644 --- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c | |||
@@ -52,42 +52,38 @@ static int __init sh7619_devices_setup(void) | |||
52 | } | 52 | } |
53 | __initcall(sh7619_devices_setup); | 53 | __initcall(sh7619_devices_setup); |
54 | 54 | ||
55 | #define INTC_IPRC 0xf8080000UL | ||
56 | #define INTC_IPRD 0xf8080002UL | ||
57 | |||
58 | #define CMI0_IRQ 86 | ||
59 | |||
60 | #define SCIF0_ERI_IRQ 88 | ||
61 | #define SCIF0_RXI_IRQ 89 | ||
62 | #define SCIF0_BRI_IRQ 90 | ||
63 | #define SCIF0_TXI_IRQ 91 | ||
64 | |||
65 | #define SCIF1_ERI_IRQ 92 | ||
66 | #define SCIF1_RXI_IRQ 93 | ||
67 | #define SCIF1_BRI_IRQ 94 | ||
68 | #define SCIF1_TXI_IRQ 95 | ||
69 | |||
70 | #define SCIF2_BRI_IRQ 96 | ||
71 | #define SCIF2_ERI_IRQ 97 | ||
72 | #define SCIF2_RXI_IRQ 98 | ||
73 | #define SCIF2_TXI_IRQ 99 | ||
74 | |||
75 | static struct ipr_data sh7619_ipr_map[] = { | 55 | static struct ipr_data sh7619_ipr_map[] = { |
76 | { CMI0_IRQ, INTC_IPRC, 1, 2 }, | 56 | { 86, 0, 4, 2 }, /* CMI0 */ |
77 | { SCIF0_ERI_IRQ, INTC_IPRD, 3, 3 }, | 57 | { 88, 1, 12, 3 }, /* SCIF0_ERI */ |
78 | { SCIF0_RXI_IRQ, INTC_IPRD, 3, 3 }, | 58 | { 89, 1, 12, 3 }, /* SCIF0_RXI */ |
79 | { SCIF0_BRI_IRQ, INTC_IPRD, 3, 3 }, | 59 | { 90, 1, 12, 3 }, /* SCIF0_BRI */ |
80 | { SCIF0_TXI_IRQ, INTC_IPRD, 3, 3 }, | 60 | { 91, 1, 12, 3 }, /* SCIF0_TXI */ |
81 | { SCIF1_ERI_IRQ, INTC_IPRD, 2, 3 }, | 61 | { 92, 1, 8, 3 }, /* SCIF1_ERI */ |
82 | { SCIF1_RXI_IRQ, INTC_IPRD, 2, 3 }, | 62 | { 93, 1, 8, 3 }, /* SCIF1_RXI */ |
83 | { SCIF1_BRI_IRQ, INTC_IPRD, 2, 3 }, | 63 | { 94, 1, 8, 3 }, /* SCIF1_BRI */ |
84 | { SCIF1_TXI_IRQ, INTC_IPRD, 2, 3 }, | 64 | { 95, 1, 8, 3 }, /* SCIF1_TXI */ |
85 | { SCIF2_ERI_IRQ, INTC_IPRD, 1, 3 }, | 65 | { 96, 1, 4, 3 }, /* SCIF2_ERI */ |
86 | { SCIF2_RXI_IRQ, INTC_IPRD, 1, 3 }, | 66 | { 97, 1, 4, 3 }, /* SCIF2_RXI */ |
87 | { SCIF2_BRI_IRQ, INTC_IPRD, 1, 3 }, | 67 | { 98, 1, 4, 3 }, /* SCIF2_BRI */ |
88 | { SCIF2_TXI_IRQ, INTC_IPRD, 1, 3 }, | 68 | { 99, 1, 4, 3 }, /* SCIF2_TXI */ |
89 | }; | 69 | }; |
90 | 70 | ||
71 | static unsigned int ipr_offsets[] = { | ||
72 | 0xf8080000, /* IPRC */ | ||
73 | 0xf8080002, /* IPRD */ | ||
74 | 0xf8080004, /* IPRE */ | ||
75 | 0xf8080006, /* IPRF */ | ||
76 | 0xf8080008, /* IPRG */ | ||
77 | }; | ||
78 | |||
79 | /* given the IPR index return the address of the IPR register */ | ||
80 | unsigned int map_ipridx_to_addr(int idx) | ||
81 | { | ||
82 | if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) | ||
83 | return 0; | ||
84 | return ipr_offsets[idx]; | ||
85 | } | ||
86 | |||
91 | void __init init_IRQ_ipr(void) | 87 | void __init init_IRQ_ipr(void) |
92 | { | 88 | { |
93 | make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map)); | 89 | make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map)); |