diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-01-11 04:43:49 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-01-21 05:55:26 -0500 |
commit | 364a9ba07b0341c7e16809d810a19e06b6e64b05 (patch) | |
tree | 15dbeef3f90f6fad62eca1171ec15789d3147bdd /arch/m32r/platforms | |
parent | 8afb53b9ac0ac196d58b741d7bdfba8702ae7945 (diff) |
m32r: Convert m32104ut irq chip
Convert the irq chips to the new functions and use proper flow
handlers. handle_level_irq is appropriate.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/m32r/platforms')
-rw-r--r-- | arch/m32r/platforms/m32700ut/setup.c | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/arch/m32r/platforms/m32700ut/setup.c b/arch/m32r/platforms/m32700ut/setup.c index 433bcbca2c3a..812cea993585 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 | /* |
@@ -126,7 +117,7 @@ static void mask_and_ack_m32700ut_pld(unsigned int irq) | |||
126 | static void end_m32700ut_pld_irq(unsigned int irq) | 117 | static void end_m32700ut_pld_irq(unsigned int irq) |
127 | { | 118 | { |
128 | enable_m32700ut_pld_irq(irq); | 119 | enable_m32700ut_pld_irq(irq); |
129 | end_m32700ut_irq(M32R_IRQ_INT1); | 120 | enable_m32700ut_irq(M32R_IRQ_INT1); |
130 | } | 121 | } |
131 | 122 | ||
132 | static unsigned int startup_m32700ut_pld_irq(unsigned int irq) | 123 | static unsigned int startup_m32700ut_pld_irq(unsigned int irq) |
@@ -196,7 +187,7 @@ static void mask_and_ack_m32700ut_lanpld(unsigned int irq) | |||
196 | static void end_m32700ut_lanpld_irq(unsigned int irq) | 187 | static void end_m32700ut_lanpld_irq(unsigned int irq) |
197 | { | 188 | { |
198 | enable_m32700ut_lanpld_irq(irq); | 189 | enable_m32700ut_lanpld_irq(irq); |
199 | end_m32700ut_irq(M32R_IRQ_INT0); | 190 | enable_m32700ut_irq(M32R_IRQ_INT0); |
200 | } | 191 | } |
201 | 192 | ||
202 | static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq) | 193 | static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq) |
@@ -265,7 +256,7 @@ static void mask_and_ack_m32700ut_lcdpld(unsigned int irq) | |||
265 | static void end_m32700ut_lcdpld_irq(unsigned int irq) | 256 | static void end_m32700ut_lcdpld_irq(unsigned int irq) |
266 | { | 257 | { |
267 | enable_m32700ut_lcdpld_irq(irq); | 258 | enable_m32700ut_lcdpld_irq(irq); |
268 | end_m32700ut_irq(M32R_IRQ_INT2); | 259 | enable_m32700ut_irq(M32R_IRQ_INT2); |
269 | } | 260 | } |
270 | 261 | ||
271 | static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq) | 262 | static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq) |
@@ -305,32 +296,38 @@ void __init init_IRQ(void) | |||
305 | #endif /* CONFIG_SMC91X */ | 296 | #endif /* CONFIG_SMC91X */ |
306 | 297 | ||
307 | /* MFT2 : system timer */ | 298 | /* MFT2 : system timer */ |
308 | set_irq_chip(M32R_IRQ_MFT2, &m32700ut_irq_type); | 299 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32700ut_irq_type, |
300 | handle_level_irq); | ||
309 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 301 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
310 | disable_m32700ut_irq(M32R_IRQ_MFT2); | 302 | disable_m32700ut_irq(M32R_IRQ_MFT2); |
311 | 303 | ||
312 | /* SIO0 : receive */ | 304 | /* SIO0 : receive */ |
313 | set_irq_chip(M32R_IRQ_SIO0_R, &m32700ut_irq_type); | 305 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32700ut_irq_type, |
306 | handle_level_irq); | ||
314 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 307 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
315 | disable_m32700ut_irq(M32R_IRQ_SIO0_R); | 308 | disable_m32700ut_irq(M32R_IRQ_SIO0_R); |
316 | 309 | ||
317 | /* SIO0 : send */ | 310 | /* SIO0 : send */ |
318 | set_irq_chip(M32R_IRQ_SIO0_S, &m32700ut_irq_type); | 311 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32700ut_irq_type, |
312 | handle_level_irq); | ||
319 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 313 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
320 | disable_m32700ut_irq(M32R_IRQ_SIO0_S); | 314 | disable_m32700ut_irq(M32R_IRQ_SIO0_S); |
321 | 315 | ||
322 | /* SIO1 : receive */ | 316 | /* SIO1 : receive */ |
323 | set_irq_chip(M32R_IRQ_SIO1_R, &m32700ut_irq_type); | 317 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &m32700ut_irq_type, |
318 | handle_level_irq); | ||
324 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 319 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
325 | disable_m32700ut_irq(M32R_IRQ_SIO1_R); | 320 | disable_m32700ut_irq(M32R_IRQ_SIO1_R); |
326 | 321 | ||
327 | /* SIO1 : send */ | 322 | /* SIO1 : send */ |
328 | set_irq_chip(M32R_IRQ_SIO1_S, &m32700ut_irq_type); | 323 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &m32700ut_irq_type, |
324 | handle_level_irq); | ||
329 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 325 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
330 | disable_m32700ut_irq(M32R_IRQ_SIO1_S); | 326 | disable_m32700ut_irq(M32R_IRQ_SIO1_S); |
331 | 327 | ||
332 | /* DMA1 : */ | 328 | /* DMA1 : */ |
333 | set_irq_chip(M32R_IRQ_DMA1, &m32700ut_irq_type); | 329 | set_irq_chip_and_handler(M32R_IRQ_DMA1, &m32700ut_irq_type, |
330 | handle_level_irq); | ||
334 | icu_data[M32R_IRQ_DMA1].icucr = 0; | 331 | icu_data[M32R_IRQ_DMA1].icucr = 0; |
335 | disable_m32700ut_irq(M32R_IRQ_DMA1); | 332 | disable_m32700ut_irq(M32R_IRQ_DMA1); |
336 | 333 | ||
@@ -393,7 +390,8 @@ void __init init_IRQ(void) | |||
393 | /* | 390 | /* |
394 | * INT3# is used for AR | 391 | * INT3# is used for AR |
395 | */ | 392 | */ |
396 | set_irq_chip(M32R_IRQ_INT3, &m32700ut_irq_type); | 393 | set_irq_chip_and_handler(M32R_IRQ_INT3, &m32700ut_irq_type, |
394 | handle_level_irq); | ||
397 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 395 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
398 | disable_m32700ut_irq(M32R_IRQ_INT3); | 396 | disable_m32700ut_irq(M32R_IRQ_INT3); |
399 | #endif /* CONFIG_VIDEO_M32R_AR */ | 397 | #endif /* CONFIG_VIDEO_M32R_AR */ |