diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4/setup-sh7760.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7760.c | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c index b7c702821e6..3df16975567 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c | |||
@@ -96,7 +96,25 @@ static struct intc2_data intc2_irq_table[] = { | |||
96 | {109,12, 0, 4, 0, 3}, /* CMTI */ | 96 | {109,12, 0, 4, 0, 3}, /* CMTI */ |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static struct ipr_data sh7760_ipr_map[] = { | 99 | static struct intc2_desc intc2_irq_desc __read_mostly = { |
100 | .prio_base = 0xfe080000, | ||
101 | .msk_base = 0xfe080040, | ||
102 | .mskclr_base = 0xfe080060, | ||
103 | |||
104 | .intc2_data = intc2_irq_table, | ||
105 | .nr_irqs = ARRAY_SIZE(intc2_irq_table), | ||
106 | |||
107 | .chip = { | ||
108 | .name = "INTC2-sh7760", | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | void __init init_IRQ_intc2(void) | ||
113 | { | ||
114 | register_intc2_controller(&intc2_irq_desc); | ||
115 | } | ||
116 | |||
117 | static struct ipr_data ipr_irq_table[] = { | ||
100 | /* IRQ, IPR-idx, shift, priority */ | 118 | /* IRQ, IPR-idx, shift, priority */ |
101 | { 16, 0, 12, 2 }, /* TMU0 TUNI*/ | 119 | { 16, 0, 12, 2 }, /* TMU0 TUNI*/ |
102 | { 17, 0, 8, 2 }, /* TMU1 TUNI */ | 120 | { 17, 0, 8, 2 }, /* TMU1 TUNI */ |
@@ -133,20 +151,19 @@ static unsigned long ipr_offsets[] = { | |||
133 | 0xffd00010UL, /* 3: IPRD */ | 151 | 0xffd00010UL, /* 3: IPRD */ |
134 | }; | 152 | }; |
135 | 153 | ||
136 | /* given the IPR index return the address of the IPR register */ | 154 | static struct ipr_desc ipr_irq_desc = { |
137 | unsigned int map_ipridx_to_addr(int idx) | 155 | .ipr_offsets = ipr_offsets, |
138 | { | 156 | .nr_offsets = ARRAY_SIZE(ipr_offsets), |
139 | if (idx >= ARRAY_SIZE(ipr_offsets)) | ||
140 | return 0; | ||
141 | return ipr_offsets[idx]; | ||
142 | } | ||
143 | 157 | ||
144 | void __init init_IRQ_intc2(void) | 158 | .ipr_data = ipr_irq_table, |
145 | { | 159 | .nr_irqs = ARRAY_SIZE(ipr_irq_table), |
146 | make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); | 160 | |
147 | } | 161 | .chip = { |
162 | .name = "IPR-sh7760", | ||
163 | }, | ||
164 | }; | ||
148 | 165 | ||
149 | void __init init_IRQ_ipr(void) | 166 | void __init init_IRQ_ipr(void) |
150 | { | 167 | { |
151 | make_ipr_irq(sh7760_ipr_map, ARRAY_SIZE(sh7760_ipr_map)); | 168 | register_ipr_controller(&ipr_irq_desc); |
152 | } | 169 | } |