aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/m32r/platforms/m32700ut/setup.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/arch/m32r/platforms/m32700ut/setup.c b/arch/m32r/platforms/m32700ut/setup.c
index 99d92411e84f..bce70e1eb9e3 100644
--- a/arch/m32r/platforms/m32700ut/setup.c
+++ b/arch/m32r/platforms/m32700ut/setup.c
@@ -166,42 +166,33 @@ static void enable_m32700ut_lanpld_irq(unsigned int irq)
166 outw(data, port); 166 outw(data, port);
167} 167}
168 168
169static void mask_and_ack_m32700ut_lanpld(unsigned int irq) 169static void mask_m32700ut_lanpld(struct irq_data *data)
170{ 170{
171 disable_m32700ut_lanpld_irq(irq); 171 disable_m32700ut_lanpld_irq(data->irq);
172} 172}
173 173
174static void end_m32700ut_lanpld_irq(unsigned int irq) 174static void unmask_m32700ut_lanpld(struct irq_data *data)
175{ 175{
176 enable_m32700ut_lanpld_irq(irq); 176 enable_m32700ut_lanpld_irq(data->irq);
177 enable_m32700ut_irq(M32R_IRQ_INT0); 177 enable_m32700ut_irq(M32R_IRQ_INT0);
178} 178}
179 179
180static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq) 180static void shutdown_m32700ut_lanpld(struct irq_data *data)
181{
182 enable_m32700ut_lanpld_irq(irq);
183 return (0);
184}
185
186static void shutdown_m32700ut_lanpld_irq(unsigned int irq)
187{ 181{
188 unsigned long port; 182 unsigned long port;
189 unsigned int pldirq; 183 unsigned int pldirq;
190 184
191 pldirq = irq2lanpldirq(irq); 185 pldirq = irq2lanpldirq(data->irq);
192 port = lanpldirq2port(pldirq); 186 port = lanpldirq2port(pldirq);
193 outw(PLD_ICUCR_ILEVEL7, port); 187 outw(PLD_ICUCR_ILEVEL7, port);
194} 188}
195 189
196static struct irq_chip m32700ut_lanpld_irq_type = 190static struct irq_chip m32700ut_lanpld_irq_type =
197{ 191{
198 .name = "M32700UT-PLD-LAN-IRQ", 192 .name = "M32700UT-PLD-LAN-IRQ",
199 .startup = startup_m32700ut_lanpld_irq, 193 .irq_shutdown = shutdown_m32700ut_lanpld,
200 .shutdown = shutdown_m32700ut_lanpld_irq, 194 .irq_mask = mask_m32700ut_lanpld,
201 .enable = enable_m32700ut_lanpld_irq, 195 .irq_unmask = unmask_m32700ut_lanpld,
202 .disable = disable_m32700ut_lanpld_irq,
203 .ack = mask_and_ack_m32700ut_lanpld,
204 .end = end_m32700ut_lanpld_irq
205}; 196};
206 197
207/* 198/*
@@ -277,7 +268,8 @@ void __init init_IRQ(void)
277{ 268{
278#if defined(CONFIG_SMC91X) 269#if defined(CONFIG_SMC91X)
279 /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ 270 /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/
280 set_irq_chip(M32700UT_LAN_IRQ_LAN, &m32700ut_lanpld_irq_type); 271 set_irq_chip_and_handler(M32700UT_LAN_IRQ_LAN,
272 &m32700ut_lanpld_irq_type, handle_level_irq);
281 lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ 273 lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */
282 disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); 274 disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN);
283#endif /* CONFIG_SMC91X */ 275#endif /* CONFIG_SMC91X */