aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/platforms
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-01-19 12:48:15 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-01-21 05:55:29 -0500
commit883c0ccde1e12e7721966626983d61ccdbd0ae99 (patch)
tree044e91f213068bfc3d7177e7d137ca936ec3445c /arch/m32r/platforms
parentce1104ce67ea186bf5c23de66a2eeaf65823e1ce (diff)
m32r: Convert opsput 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/opsput/setup.c58
1 files changed, 27 insertions, 31 deletions
diff --git a/arch/m32r/platforms/opsput/setup.c b/arch/m32r/platforms/opsput/setup.c
index a16a7fe0e6f9..8c0907dd771b 100644
--- a/arch/m32r/platforms/opsput/setup.c
+++ b/arch/m32r/platforms/opsput/setup.c
@@ -46,39 +46,30 @@ static void enable_opsput_irq(unsigned int irq)
46 outl(data, port); 46 outl(data, port);
47} 47}
48 48
49static void mask_and_ack_opsput(unsigned int irq) 49static void mask_opsput(struct irq_data *data)
50{ 50{
51 disable_opsput_irq(irq); 51 disable_opsput_irq(data->irq);
52} 52}
53 53
54static void end_opsput_irq(unsigned int irq) 54static void unmask_opsput(struct irq_data *data)
55{ 55{
56 enable_opsput_irq(irq); 56 enable_opsput_irq(data->irq);
57} 57}
58 58
59static unsigned int startup_opsput_irq(unsigned int irq) 59static void shutdown_opsput(struct irq_data *data)
60{
61 enable_opsput_irq(irq);
62 return (0);
63}
64
65static void shutdown_opsput_irq(unsigned int irq)
66{ 60{
67 unsigned long port; 61 unsigned long port;
68 62
69 port = irq2port(irq); 63 port = irq2port(data->irq);
70 outl(M32R_ICUCR_ILEVEL7, port); 64 outl(M32R_ICUCR_ILEVEL7, port);
71} 65}
72 66
73static struct irq_chip opsput_irq_type = 67static struct irq_chip opsput_irq_type =
74{ 68{
75 .name = "OPSPUT-IRQ", 69 .name = "OPSPUT-IRQ",
76 .startup = startup_opsput_irq, 70 .irq_shutdown = shutdown_opsput,
77 .shutdown = shutdown_opsput_irq, 71 .irq_mask = mask_opsput,
78 .enable = enable_opsput_irq, 72 .irq_unmask = unmask_opsput,
79 .disable = disable_opsput_irq,
80 .ack = mask_and_ack_opsput,
81 .end = end_opsput_irq
82}; 73};
83 74
84/* 75/*
@@ -100,7 +91,6 @@ static void disable_opsput_pld_irq(unsigned int irq)
100 unsigned int pldirq; 91 unsigned int pldirq;
101 92
102 pldirq = irq2pldirq(irq); 93 pldirq = irq2pldirq(irq);
103// disable_opsput_irq(M32R_IRQ_INT1);
104 port = pldirq2port(pldirq); 94 port = pldirq2port(pldirq);
105 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; 95 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
106 outw(data, port); 96 outw(data, port);
@@ -112,7 +102,6 @@ static void enable_opsput_pld_irq(unsigned int irq)
112 unsigned int pldirq; 102 unsigned int pldirq;
113 103
114 pldirq = irq2pldirq(irq); 104 pldirq = irq2pldirq(irq);
115// enable_opsput_irq(M32R_IRQ_INT1);
116 port = pldirq2port(pldirq); 105 port = pldirq2port(pldirq);
117 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; 106 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
118 outw(data, port); 107 outw(data, port);
@@ -127,7 +116,7 @@ static void mask_and_ack_opsput_pld(unsigned int irq)
127static void end_opsput_pld_irq(unsigned int irq) 116static void end_opsput_pld_irq(unsigned int irq)
128{ 117{
129 enable_opsput_pld_irq(irq); 118 enable_opsput_pld_irq(irq);
130 end_opsput_irq(M32R_IRQ_INT1); 119 enable_opsput_irq(M32R_IRQ_INT1);
131} 120}
132 121
133static unsigned int startup_opsput_pld_irq(unsigned int irq) 122static unsigned int startup_opsput_pld_irq(unsigned int irq)
@@ -197,7 +186,7 @@ static void mask_and_ack_opsput_lanpld(unsigned int irq)
197static void end_opsput_lanpld_irq(unsigned int irq) 186static void end_opsput_lanpld_irq(unsigned int irq)
198{ 187{
199 enable_opsput_lanpld_irq(irq); 188 enable_opsput_lanpld_irq(irq);
200 end_opsput_irq(M32R_IRQ_INT0); 189 enable_opsput_irq(M32R_IRQ_INT0);
201} 190}
202 191
203static unsigned int startup_opsput_lanpld_irq(unsigned int irq) 192static unsigned int startup_opsput_lanpld_irq(unsigned int irq)
@@ -266,7 +255,7 @@ static void mask_and_ack_opsput_lcdpld(unsigned int irq)
266static void end_opsput_lcdpld_irq(unsigned int irq) 255static void end_opsput_lcdpld_irq(unsigned int irq)
267{ 256{
268 enable_opsput_lcdpld_irq(irq); 257 enable_opsput_lcdpld_irq(irq);
269 end_opsput_irq(M32R_IRQ_INT2); 258 enable_opsput_irq(M32R_IRQ_INT2);
270} 259}
271 260
272static unsigned int startup_opsput_lcdpld_irq(unsigned int irq) 261static unsigned int startup_opsput_lcdpld_irq(unsigned int irq)
@@ -306,32 +295,38 @@ void __init init_IRQ(void)
306#endif /* CONFIG_SMC91X */ 295#endif /* CONFIG_SMC91X */
307 296
308 /* MFT2 : system timer */ 297 /* MFT2 : system timer */
309 set_irq_chip(M32R_IRQ_MFT2, &opsput_irq_type); 298 set_irq_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type,
299 handle_level_irq);
310 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 300 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
311 disable_opsput_irq(M32R_IRQ_MFT2); 301 disable_opsput_irq(M32R_IRQ_MFT2);
312 302
313 /* SIO0 : receive */ 303 /* SIO0 : receive */
314 set_irq_chip(M32R_IRQ_SIO0_R, &opsput_irq_type); 304 set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type,
305 handle_level_irq);
315 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 306 icu_data[M32R_IRQ_SIO0_R].icucr = 0;
316 disable_opsput_irq(M32R_IRQ_SIO0_R); 307 disable_opsput_irq(M32R_IRQ_SIO0_R);
317 308
318 /* SIO0 : send */ 309 /* SIO0 : send */
319 set_irq_chip(M32R_IRQ_SIO0_S, &opsput_irq_type); 310 set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type,
311 handle_level_irq);
320 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 312 icu_data[M32R_IRQ_SIO0_S].icucr = 0;
321 disable_opsput_irq(M32R_IRQ_SIO0_S); 313 disable_opsput_irq(M32R_IRQ_SIO0_S);
322 314
323 /* SIO1 : receive */ 315 /* SIO1 : receive */
324 set_irq_chip(M32R_IRQ_SIO1_R, &opsput_irq_type); 316 set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type,
317 handle_level_irq);
325 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 318 icu_data[M32R_IRQ_SIO1_R].icucr = 0;
326 disable_opsput_irq(M32R_IRQ_SIO1_R); 319 disable_opsput_irq(M32R_IRQ_SIO1_R);
327 320
328 /* SIO1 : send */ 321 /* SIO1 : send */
329 set_irq_chip(M32R_IRQ_SIO1_S, &opsput_irq_type); 322 set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type,
323 handle_level_irq);
330 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 324 icu_data[M32R_IRQ_SIO1_S].icucr = 0;
331 disable_opsput_irq(M32R_IRQ_SIO1_S); 325 disable_opsput_irq(M32R_IRQ_SIO1_S);
332 326
333 /* DMA1 : */ 327 /* DMA1 : */
334 set_irq_chip(M32R_IRQ_DMA1, &opsput_irq_type); 328 set_irq_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type,
329 handle_level_irq);
335 icu_data[M32R_IRQ_DMA1].icucr = 0; 330 icu_data[M32R_IRQ_DMA1].icucr = 0;
336 disable_opsput_irq(M32R_IRQ_DMA1); 331 disable_opsput_irq(M32R_IRQ_DMA1);
337 332
@@ -394,7 +389,8 @@ void __init init_IRQ(void)
394 /* 389 /*
395 * INT3# is used for AR 390 * INT3# is used for AR
396 */ 391 */
397 set_irq_chip(M32R_IRQ_INT3, &opsput_irq_type); 392 set_irq_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type,
393 handle_level_irq);
398 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 394 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
399 disable_opsput_irq(M32R_IRQ_INT3); 395 disable_opsput_irq(M32R_IRQ_INT3);
400#endif /* CONFIG_VIDEO_M32R_AR */ 396#endif /* CONFIG_VIDEO_M32R_AR */