diff options
Diffstat (limited to 'arch/m32r/platforms/m32700ut/setup.c')
-rw-r--r-- | arch/m32r/platforms/m32700ut/setup.c | 214 |
1 files changed, 73 insertions, 141 deletions
diff --git a/arch/m32r/platforms/m32700ut/setup.c b/arch/m32r/platforms/m32700ut/setup.c index 80b1a026795a..2074bcc841eb 100644 --- a/arch/m32r/platforms/m32700ut/setup.c +++ b/arch/m32r/platforms/m32700ut/setup.c | |||
@@ -45,39 +45,30 @@ static void enable_m32700ut_irq(unsigned int irq) | |||
45 | outl(data, port); | 45 | outl(data, port); |
46 | } | 46 | } |
47 | 47 | ||
48 | static void mask_and_ack_m32700ut(unsigned int irq) | 48 | static void mask_m32700ut(struct irq_data *data) |
49 | { | 49 | { |
50 | disable_m32700ut_irq(irq); | 50 | disable_m32700ut_irq(data->irq); |
51 | } | 51 | } |
52 | 52 | ||
53 | static void end_m32700ut_irq(unsigned int irq) | 53 | static void unmask_m32700ut(struct irq_data *data) |
54 | { | 54 | { |
55 | enable_m32700ut_irq(irq); | 55 | enable_m32700ut_irq(data->irq); |
56 | } | 56 | } |
57 | 57 | ||
58 | static unsigned int startup_m32700ut_irq(unsigned int irq) | 58 | static void shutdown_m32700ut(struct irq_data *data) |
59 | { | ||
60 | enable_m32700ut_irq(irq); | ||
61 | return (0); | ||
62 | } | ||
63 | |||
64 | static void shutdown_m32700ut_irq(unsigned int irq) | ||
65 | { | 59 | { |
66 | unsigned long port; | 60 | unsigned long port; |
67 | 61 | ||
68 | port = irq2port(irq); | 62 | port = irq2port(data->irq); |
69 | outl(M32R_ICUCR_ILEVEL7, port); | 63 | outl(M32R_ICUCR_ILEVEL7, port); |
70 | } | 64 | } |
71 | 65 | ||
72 | static struct irq_chip m32700ut_irq_type = | 66 | static struct irq_chip m32700ut_irq_type = |
73 | { | 67 | { |
74 | .name = "M32700UT-IRQ", | 68 | .name = "M32700UT-IRQ", |
75 | .startup = startup_m32700ut_irq, | 69 | .irq_shutdown = shutdown_m32700ut, |
76 | .shutdown = shutdown_m32700ut_irq, | 70 | .irq_mask = mask_m32700ut, |
77 | .enable = enable_m32700ut_irq, | 71 | .irq_unmask = unmask_m32700ut |
78 | .disable = disable_m32700ut_irq, | ||
79 | .ack = mask_and_ack_m32700ut, | ||
80 | .end = end_m32700ut_irq | ||
81 | }; | 72 | }; |
82 | 73 | ||
83 | /* | 74 | /* |
@@ -99,7 +90,6 @@ static void disable_m32700ut_pld_irq(unsigned int irq) | |||
99 | unsigned int pldirq; | 90 | unsigned int pldirq; |
100 | 91 | ||
101 | pldirq = irq2pldirq(irq); | 92 | pldirq = irq2pldirq(irq); |
102 | // disable_m32700ut_irq(M32R_IRQ_INT1); | ||
103 | port = pldirq2port(pldirq); | 93 | port = pldirq2port(pldirq); |
104 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; | 94 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; |
105 | outw(data, port); | 95 | outw(data, port); |
@@ -111,50 +101,38 @@ static void enable_m32700ut_pld_irq(unsigned int irq) | |||
111 | unsigned int pldirq; | 101 | unsigned int pldirq; |
112 | 102 | ||
113 | pldirq = irq2pldirq(irq); | 103 | pldirq = irq2pldirq(irq); |
114 | // enable_m32700ut_irq(M32R_IRQ_INT1); | ||
115 | port = pldirq2port(pldirq); | 104 | port = pldirq2port(pldirq); |
116 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; | 105 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; |
117 | outw(data, port); | 106 | outw(data, port); |
118 | } | 107 | } |
119 | 108 | ||
120 | static void mask_and_ack_m32700ut_pld(unsigned int irq) | 109 | static void mask_m32700ut_pld(struct irq_data *data) |
121 | { | ||
122 | disable_m32700ut_pld_irq(irq); | ||
123 | // mask_and_ack_m32700ut(M32R_IRQ_INT1); | ||
124 | } | ||
125 | |||
126 | static void end_m32700ut_pld_irq(unsigned int irq) | ||
127 | { | 110 | { |
128 | enable_m32700ut_pld_irq(irq); | 111 | disable_m32700ut_pld_irq(data->irq); |
129 | end_m32700ut_irq(M32R_IRQ_INT1); | ||
130 | } | 112 | } |
131 | 113 | ||
132 | static unsigned int startup_m32700ut_pld_irq(unsigned int irq) | 114 | static void unmask_m32700ut_pld(struct irq_data *data) |
133 | { | 115 | { |
134 | enable_m32700ut_pld_irq(irq); | 116 | enable_m32700ut_pld_irq(data->irq); |
135 | return (0); | 117 | enable_m32700ut_irq(M32R_IRQ_INT1); |
136 | } | 118 | } |
137 | 119 | ||
138 | static void shutdown_m32700ut_pld_irq(unsigned int irq) | 120 | static void shutdown_m32700ut_pld_irq(struct irq_data *data) |
139 | { | 121 | { |
140 | unsigned long port; | 122 | unsigned long port; |
141 | unsigned int pldirq; | 123 | unsigned int pldirq; |
142 | 124 | ||
143 | pldirq = irq2pldirq(irq); | 125 | pldirq = irq2pldirq(data->irq); |
144 | // shutdown_m32700ut_irq(M32R_IRQ_INT1); | ||
145 | port = pldirq2port(pldirq); | 126 | port = pldirq2port(pldirq); |
146 | outw(PLD_ICUCR_ILEVEL7, port); | 127 | outw(PLD_ICUCR_ILEVEL7, port); |
147 | } | 128 | } |
148 | 129 | ||
149 | static struct irq_chip m32700ut_pld_irq_type = | 130 | static struct irq_chip m32700ut_pld_irq_type = |
150 | { | 131 | { |
151 | .name = "M32700UT-PLD-IRQ", | 132 | .name = "M32700UT-PLD-IRQ", |
152 | .startup = startup_m32700ut_pld_irq, | 133 | .irq_shutdown = shutdown_m32700ut_pld_irq, |
153 | .shutdown = shutdown_m32700ut_pld_irq, | 134 | .irq_mask = mask_m32700ut_pld, |
154 | .enable = enable_m32700ut_pld_irq, | 135 | .irq_unmask = unmask_m32700ut_pld, |
155 | .disable = disable_m32700ut_pld_irq, | ||
156 | .ack = mask_and_ack_m32700ut_pld, | ||
157 | .end = end_m32700ut_pld_irq | ||
158 | }; | 136 | }; |
159 | 137 | ||
160 | /* | 138 | /* |
@@ -188,42 +166,33 @@ static void enable_m32700ut_lanpld_irq(unsigned int irq) | |||
188 | outw(data, port); | 166 | outw(data, port); |
189 | } | 167 | } |
190 | 168 | ||
191 | static void mask_and_ack_m32700ut_lanpld(unsigned int irq) | 169 | static void mask_m32700ut_lanpld(struct irq_data *data) |
192 | { | 170 | { |
193 | disable_m32700ut_lanpld_irq(irq); | 171 | disable_m32700ut_lanpld_irq(data->irq); |
194 | } | 172 | } |
195 | 173 | ||
196 | static void end_m32700ut_lanpld_irq(unsigned int irq) | 174 | static void unmask_m32700ut_lanpld(struct irq_data *data) |
197 | { | 175 | { |
198 | enable_m32700ut_lanpld_irq(irq); | 176 | enable_m32700ut_lanpld_irq(data->irq); |
199 | end_m32700ut_irq(M32R_IRQ_INT0); | 177 | enable_m32700ut_irq(M32R_IRQ_INT0); |
200 | } | ||
201 | |||
202 | static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq) | ||
203 | { | ||
204 | enable_m32700ut_lanpld_irq(irq); | ||
205 | return (0); | ||
206 | } | 178 | } |
207 | 179 | ||
208 | static void shutdown_m32700ut_lanpld_irq(unsigned int irq) | 180 | static void shutdown_m32700ut_lanpld(struct irq_data *data) |
209 | { | 181 | { |
210 | unsigned long port; | 182 | unsigned long port; |
211 | unsigned int pldirq; | 183 | unsigned int pldirq; |
212 | 184 | ||
213 | pldirq = irq2lanpldirq(irq); | 185 | pldirq = irq2lanpldirq(data->irq); |
214 | port = lanpldirq2port(pldirq); | 186 | port = lanpldirq2port(pldirq); |
215 | outw(PLD_ICUCR_ILEVEL7, port); | 187 | outw(PLD_ICUCR_ILEVEL7, port); |
216 | } | 188 | } |
217 | 189 | ||
218 | static struct irq_chip m32700ut_lanpld_irq_type = | 190 | static struct irq_chip m32700ut_lanpld_irq_type = |
219 | { | 191 | { |
220 | .name = "M32700UT-PLD-LAN-IRQ", | 192 | .name = "M32700UT-PLD-LAN-IRQ", |
221 | .startup = startup_m32700ut_lanpld_irq, | 193 | .irq_shutdown = shutdown_m32700ut_lanpld, |
222 | .shutdown = shutdown_m32700ut_lanpld_irq, | 194 | .irq_mask = mask_m32700ut_lanpld, |
223 | .enable = enable_m32700ut_lanpld_irq, | 195 | .irq_unmask = unmask_m32700ut_lanpld, |
224 | .disable = disable_m32700ut_lanpld_irq, | ||
225 | .ack = mask_and_ack_m32700ut_lanpld, | ||
226 | .end = end_m32700ut_lanpld_irq | ||
227 | }; | 196 | }; |
228 | 197 | ||
229 | /* | 198 | /* |
@@ -257,143 +226,110 @@ static void enable_m32700ut_lcdpld_irq(unsigned int irq) | |||
257 | outw(data, port); | 226 | outw(data, port); |
258 | } | 227 | } |
259 | 228 | ||
260 | static void mask_and_ack_m32700ut_lcdpld(unsigned int irq) | 229 | static void mask_m32700ut_lcdpld(struct irq_data *data) |
261 | { | 230 | { |
262 | disable_m32700ut_lcdpld_irq(irq); | 231 | disable_m32700ut_lcdpld_irq(data->irq); |
263 | } | 232 | } |
264 | 233 | ||
265 | static void end_m32700ut_lcdpld_irq(unsigned int irq) | 234 | static void unmask_m32700ut_lcdpld(struct irq_data *data) |
266 | { | 235 | { |
267 | enable_m32700ut_lcdpld_irq(irq); | 236 | enable_m32700ut_lcdpld_irq(data->irq); |
268 | end_m32700ut_irq(M32R_IRQ_INT2); | 237 | enable_m32700ut_irq(M32R_IRQ_INT2); |
269 | } | ||
270 | |||
271 | static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq) | ||
272 | { | ||
273 | enable_m32700ut_lcdpld_irq(irq); | ||
274 | return (0); | ||
275 | } | 238 | } |
276 | 239 | ||
277 | static void shutdown_m32700ut_lcdpld_irq(unsigned int irq) | 240 | static void shutdown_m32700ut_lcdpld(struct irq_data *data) |
278 | { | 241 | { |
279 | unsigned long port; | 242 | unsigned long port; |
280 | unsigned int pldirq; | 243 | unsigned int pldirq; |
281 | 244 | ||
282 | pldirq = irq2lcdpldirq(irq); | 245 | pldirq = irq2lcdpldirq(data->irq); |
283 | port = lcdpldirq2port(pldirq); | 246 | port = lcdpldirq2port(pldirq); |
284 | outw(PLD_ICUCR_ILEVEL7, port); | 247 | outw(PLD_ICUCR_ILEVEL7, port); |
285 | } | 248 | } |
286 | 249 | ||
287 | static struct irq_chip m32700ut_lcdpld_irq_type = | 250 | static struct irq_chip m32700ut_lcdpld_irq_type = |
288 | { | 251 | { |
289 | .name = "M32700UT-PLD-LCD-IRQ", | 252 | .name = "M32700UT-PLD-LCD-IRQ", |
290 | .startup = startup_m32700ut_lcdpld_irq, | 253 | .irq_shutdown = shutdown_m32700ut_lcdpld, |
291 | .shutdown = shutdown_m32700ut_lcdpld_irq, | 254 | .irq_mask = mask_m32700ut_lcdpld, |
292 | .enable = enable_m32700ut_lcdpld_irq, | 255 | .irq_unmask = unmask_m32700ut_lcdpld, |
293 | .disable = disable_m32700ut_lcdpld_irq, | ||
294 | .ack = mask_and_ack_m32700ut_lcdpld, | ||
295 | .end = end_m32700ut_lcdpld_irq | ||
296 | }; | 256 | }; |
297 | 257 | ||
298 | void __init init_IRQ(void) | 258 | void __init init_IRQ(void) |
299 | { | 259 | { |
300 | #if defined(CONFIG_SMC91X) | 260 | #if defined(CONFIG_SMC91X) |
301 | /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ | 261 | /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ |
302 | irq_desc[M32700UT_LAN_IRQ_LAN].status = IRQ_DISABLED; | 262 | set_irq_chip_and_handler(M32700UT_LAN_IRQ_LAN, |
303 | irq_desc[M32700UT_LAN_IRQ_LAN].chip = &m32700ut_lanpld_irq_type; | 263 | &m32700ut_lanpld_irq_type, handle_level_irq); |
304 | irq_desc[M32700UT_LAN_IRQ_LAN].action = 0; | ||
305 | irq_desc[M32700UT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ | ||
306 | lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ | 264 | lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ |
307 | disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); | 265 | disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); |
308 | #endif /* CONFIG_SMC91X */ | 266 | #endif /* CONFIG_SMC91X */ |
309 | 267 | ||
310 | /* MFT2 : system timer */ | 268 | /* MFT2 : system timer */ |
311 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 269 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32700ut_irq_type, |
312 | irq_desc[M32R_IRQ_MFT2].chip = &m32700ut_irq_type; | 270 | handle_level_irq); |
313 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
314 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
315 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 271 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
316 | disable_m32700ut_irq(M32R_IRQ_MFT2); | 272 | disable_m32700ut_irq(M32R_IRQ_MFT2); |
317 | 273 | ||
318 | /* SIO0 : receive */ | 274 | /* SIO0 : receive */ |
319 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 275 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32700ut_irq_type, |
320 | irq_desc[M32R_IRQ_SIO0_R].chip = &m32700ut_irq_type; | 276 | handle_level_irq); |
321 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
322 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
323 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 277 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
324 | disable_m32700ut_irq(M32R_IRQ_SIO0_R); | 278 | disable_m32700ut_irq(M32R_IRQ_SIO0_R); |
325 | 279 | ||
326 | /* SIO0 : send */ | 280 | /* SIO0 : send */ |
327 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 281 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32700ut_irq_type, |
328 | irq_desc[M32R_IRQ_SIO0_S].chip = &m32700ut_irq_type; | 282 | handle_level_irq); |
329 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
330 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
331 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 283 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
332 | disable_m32700ut_irq(M32R_IRQ_SIO0_S); | 284 | disable_m32700ut_irq(M32R_IRQ_SIO0_S); |
333 | 285 | ||
334 | /* SIO1 : receive */ | 286 | /* SIO1 : receive */ |
335 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 287 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &m32700ut_irq_type, |
336 | irq_desc[M32R_IRQ_SIO1_R].chip = &m32700ut_irq_type; | 288 | handle_level_irq); |
337 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | ||
338 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
339 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 289 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
340 | disable_m32700ut_irq(M32R_IRQ_SIO1_R); | 290 | disable_m32700ut_irq(M32R_IRQ_SIO1_R); |
341 | 291 | ||
342 | /* SIO1 : send */ | 292 | /* SIO1 : send */ |
343 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 293 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &m32700ut_irq_type, |
344 | irq_desc[M32R_IRQ_SIO1_S].chip = &m32700ut_irq_type; | 294 | handle_level_irq); |
345 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | ||
346 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
347 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 295 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
348 | disable_m32700ut_irq(M32R_IRQ_SIO1_S); | 296 | disable_m32700ut_irq(M32R_IRQ_SIO1_S); |
349 | 297 | ||
350 | /* DMA1 : */ | 298 | /* DMA1 : */ |
351 | irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; | 299 | set_irq_chip_and_handler(M32R_IRQ_DMA1, &m32700ut_irq_type, |
352 | irq_desc[M32R_IRQ_DMA1].chip = &m32700ut_irq_type; | 300 | handle_level_irq); |
353 | irq_desc[M32R_IRQ_DMA1].action = 0; | ||
354 | irq_desc[M32R_IRQ_DMA1].depth = 1; | ||
355 | icu_data[M32R_IRQ_DMA1].icucr = 0; | 301 | icu_data[M32R_IRQ_DMA1].icucr = 0; |
356 | disable_m32700ut_irq(M32R_IRQ_DMA1); | 302 | disable_m32700ut_irq(M32R_IRQ_DMA1); |
357 | 303 | ||
358 | #ifdef CONFIG_SERIAL_M32R_PLDSIO | 304 | #ifdef CONFIG_SERIAL_M32R_PLDSIO |
359 | /* INT#1: SIO0 Receive on PLD */ | 305 | /* INT#1: SIO0 Receive on PLD */ |
360 | irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; | 306 | set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &m32700ut_pld_irq_type, |
361 | irq_desc[PLD_IRQ_SIO0_RCV].chip = &m32700ut_pld_irq_type; | 307 | handle_level_irq); |
362 | irq_desc[PLD_IRQ_SIO0_RCV].action = 0; | ||
363 | irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ | ||
364 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 308 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
365 | disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV); | 309 | disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV); |
366 | 310 | ||
367 | /* INT#1: SIO0 Send on PLD */ | 311 | /* INT#1: SIO0 Send on PLD */ |
368 | irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; | 312 | set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &m32700ut_pld_irq_type, |
369 | irq_desc[PLD_IRQ_SIO0_SND].chip = &m32700ut_pld_irq_type; | 313 | handle_level_irq); |
370 | irq_desc[PLD_IRQ_SIO0_SND].action = 0; | ||
371 | irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ | ||
372 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 314 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
373 | disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND); | 315 | disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND); |
374 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ | 316 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ |
375 | 317 | ||
376 | /* INT#1: CFC IREQ on PLD */ | 318 | /* INT#1: CFC IREQ on PLD */ |
377 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | 319 | set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &m32700ut_pld_irq_type, |
378 | irq_desc[PLD_IRQ_CFIREQ].chip = &m32700ut_pld_irq_type; | 320 | handle_level_irq); |
379 | irq_desc[PLD_IRQ_CFIREQ].action = 0; | ||
380 | irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ | ||
381 | pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ | 321 | pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ |
382 | disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ); | 322 | disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ); |
383 | 323 | ||
384 | /* INT#1: CFC Insert on PLD */ | 324 | /* INT#1: CFC Insert on PLD */ |
385 | irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; | 325 | set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &m32700ut_pld_irq_type, |
386 | irq_desc[PLD_IRQ_CFC_INSERT].chip = &m32700ut_pld_irq_type; | 326 | handle_level_irq); |
387 | irq_desc[PLD_IRQ_CFC_INSERT].action = 0; | ||
388 | irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ | ||
389 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ | 327 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ |
390 | disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT); | 328 | disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT); |
391 | 329 | ||
392 | /* INT#1: CFC Eject on PLD */ | 330 | /* INT#1: CFC Eject on PLD */ |
393 | irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; | 331 | set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &m32700ut_pld_irq_type, |
394 | irq_desc[PLD_IRQ_CFC_EJECT].chip = &m32700ut_pld_irq_type; | 332 | handle_level_irq); |
395 | irq_desc[PLD_IRQ_CFC_EJECT].action = 0; | ||
396 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ | ||
397 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ | 333 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ |
398 | disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT); | 334 | disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT); |
399 | 335 | ||
@@ -413,13 +349,11 @@ void __init init_IRQ(void) | |||
413 | 349 | ||
414 | #if defined(CONFIG_USB) | 350 | #if defined(CONFIG_USB) |
415 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ | 351 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ |
352 | set_irq_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1, | ||
353 | &m32700ut_lcdpld_irq_type, handle_level_irq); | ||
416 | 354 | ||
417 | irq_desc[M32700UT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; | 355 | lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ |
418 | irq_desc[M32700UT_LCD_IRQ_USB_INT1].chip = &m32700ut_lcdpld_irq_type; | 356 | disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); |
419 | irq_desc[M32700UT_LCD_IRQ_USB_INT1].action = 0; | ||
420 | irq_desc[M32700UT_LCD_IRQ_USB_INT1].depth = 1; | ||
421 | lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ | ||
422 | disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); | ||
423 | #endif | 357 | #endif |
424 | /* | 358 | /* |
425 | * INT2# is used for BAT, USB, AUDIO | 359 | * INT2# is used for BAT, USB, AUDIO |
@@ -432,10 +366,8 @@ void __init init_IRQ(void) | |||
432 | /* | 366 | /* |
433 | * INT3# is used for AR | 367 | * INT3# is used for AR |
434 | */ | 368 | */ |
435 | irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; | 369 | set_irq_chip_and_handler(M32R_IRQ_INT3, &m32700ut_irq_type, |
436 | irq_desc[M32R_IRQ_INT3].chip = &m32700ut_irq_type; | 370 | handle_level_irq); |
437 | irq_desc[M32R_IRQ_INT3].action = 0; | ||
438 | irq_desc[M32R_IRQ_INT3].depth = 1; | ||
439 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 371 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
440 | disable_m32700ut_irq(M32R_IRQ_INT3); | 372 | disable_m32700ut_irq(M32R_IRQ_INT3); |
441 | #endif /* CONFIG_VIDEO_M32R_AR */ | 373 | #endif /* CONFIG_VIDEO_M32R_AR */ |