aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4/setup-sh7760.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/cpu/sh4/setup-sh7760.c')
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7760.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
index 6d3c91897774..3df169755673 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
@@ -109,7 +109,12 @@ static struct intc2_desc intc2_irq_desc __read_mostly = {
109 }, 109 },
110}; 110};
111 111
112static struct ipr_data sh7760_ipr_map[] = { 112void __init init_IRQ_intc2(void)
113{
114 register_intc2_controller(&intc2_irq_desc);
115}
116
117static struct ipr_data ipr_irq_table[] = {
113 /* IRQ, IPR-idx, shift, priority */ 118 /* IRQ, IPR-idx, shift, priority */
114 { 16, 0, 12, 2 }, /* TMU0 TUNI*/ 119 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
115 { 17, 0, 8, 2 }, /* TMU1 TUNI */ 120 { 17, 0, 8, 2 }, /* TMU1 TUNI */
@@ -146,20 +151,19 @@ static unsigned long ipr_offsets[] = {
146 0xffd00010UL, /* 3: IPRD */ 151 0xffd00010UL, /* 3: IPRD */
147}; 152};
148 153
149/* given the IPR index return the address of the IPR register */ 154static struct ipr_desc ipr_irq_desc = {
150unsigned int map_ipridx_to_addr(int idx) 155 .ipr_offsets = ipr_offsets,
151{ 156 .nr_offsets = ARRAY_SIZE(ipr_offsets),
152 if (idx >= ARRAY_SIZE(ipr_offsets))
153 return 0;
154 return ipr_offsets[idx];
155}
156 157
157void __init init_IRQ_intc2(void) 158 .ipr_data = ipr_irq_table,
158{ 159 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
159 register_intc2_controller(&intc2_irq_desc); 160
160} 161 .chip = {
162 .name = "IPR-sh7760",
163 },
164};
161 165
162void __init init_IRQ_ipr(void) 166void __init init_IRQ_ipr(void)
163{ 167{
164 make_ipr_irq(sh7760_ipr_map, ARRAY_SIZE(sh7760_ipr_map)); 168 register_ipr_controller(&ipr_irq_desc);
165} 169}