aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-25 07:21:38 -0400
committerThomas Gleixner <tglx@linutronix.de>2011-03-25 17:09:00 -0400
commit6a03513825db4db57fa93821a0c04dbbb39a68e6 (patch)
treecddcf6a74ee0022d62218bf4a6caf6f4fe952b0c
parentab7798ffcf98b11a9525cf65bacdae3fd58d357f (diff)
dma: Ipu: Convert interupt code
Convert to the new irq chip functions and cleanup the name space. [ Guennadi reported: irq_data_get_chip_data is undefined. Yes, I screwed up. it needs to be irq_data_get_irq_chip_data ] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Dan Williams <dan.j.williams@intel.com> LKML-Reference: <alpine.LFD.2.00.1103251220000.31464@localhost6.localdomain6>
-rw-r--r--drivers/dma/ipu/ipu_irq.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index dd8ebc75b667..ab8a4eff072a 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -94,9 +94,9 @@ static struct ipu_irq_map *src2map(unsigned int src)
94 return NULL; 94 return NULL;
95} 95}
96 96
97static void ipu_irq_unmask(unsigned int irq) 97static void ipu_irq_unmask(struct irq_data *d)
98{ 98{
99 struct ipu_irq_map *map = get_irq_chip_data(irq); 99 struct ipu_irq_map *map = irq_data_get_irq_chip_data(d);
100 struct ipu_irq_bank *bank; 100 struct ipu_irq_bank *bank;
101 uint32_t reg; 101 uint32_t reg;
102 unsigned long lock_flags; 102 unsigned long lock_flags;
@@ -106,7 +106,7 @@ static void ipu_irq_unmask(unsigned int irq)
106 bank = map->bank; 106 bank = map->bank;
107 if (!bank) { 107 if (!bank) {
108 spin_unlock_irqrestore(&bank_lock, lock_flags); 108 spin_unlock_irqrestore(&bank_lock, lock_flags);
109 pr_err("IPU: %s(%u) - unmapped!\n", __func__, irq); 109 pr_err("IPU: %s(%u) - unmapped!\n", __func__, d->irq);
110 return; 110 return;
111 } 111 }
112 112
@@ -117,9 +117,9 @@ static void ipu_irq_unmask(unsigned int irq)
117 spin_unlock_irqrestore(&bank_lock, lock_flags); 117 spin_unlock_irqrestore(&bank_lock, lock_flags);
118} 118}
119 119
120static void ipu_irq_mask(unsigned int irq) 120static void ipu_irq_mask(struct irq_data *d)
121{ 121{
122 struct ipu_irq_map *map = get_irq_chip_data(irq); 122 struct ipu_irq_map *map = irq_data_get_irq_chip_data(d);
123 struct ipu_irq_bank *bank; 123 struct ipu_irq_bank *bank;
124 uint32_t reg; 124 uint32_t reg;
125 unsigned long lock_flags; 125 unsigned long lock_flags;
@@ -129,7 +129,7 @@ static void ipu_irq_mask(unsigned int irq)
129 bank = map->bank; 129 bank = map->bank;
130 if (!bank) { 130 if (!bank) {
131 spin_unlock_irqrestore(&bank_lock, lock_flags); 131 spin_unlock_irqrestore(&bank_lock, lock_flags);
132 pr_err("IPU: %s(%u) - unmapped!\n", __func__, irq); 132 pr_err("IPU: %s(%u) - unmapped!\n", __func__, d->irq);
133 return; 133 return;
134 } 134 }
135 135
@@ -140,9 +140,9 @@ static void ipu_irq_mask(unsigned int irq)
140 spin_unlock_irqrestore(&bank_lock, lock_flags); 140 spin_unlock_irqrestore(&bank_lock, lock_flags);
141} 141}
142 142
143static void ipu_irq_ack(unsigned int irq) 143static void ipu_irq_ack(struct irq_data *d)
144{ 144{
145 struct ipu_irq_map *map = get_irq_chip_data(irq); 145 struct ipu_irq_map *map = irq_data_get_irq_chip_data(d);
146 struct ipu_irq_bank *bank; 146 struct ipu_irq_bank *bank;
147 unsigned long lock_flags; 147 unsigned long lock_flags;
148 148
@@ -151,7 +151,7 @@ static void ipu_irq_ack(unsigned int irq)
151 bank = map->bank; 151 bank = map->bank;
152 if (!bank) { 152 if (!bank) {
153 spin_unlock_irqrestore(&bank_lock, lock_flags); 153 spin_unlock_irqrestore(&bank_lock, lock_flags);
154 pr_err("IPU: %s(%u) - unmapped!\n", __func__, irq); 154 pr_err("IPU: %s(%u) - unmapped!\n", __func__, d->irq);
155 return; 155 return;
156 } 156 }
157 157
@@ -167,7 +167,7 @@ static void ipu_irq_ack(unsigned int irq)
167 */ 167 */
168bool ipu_irq_status(unsigned int irq) 168bool ipu_irq_status(unsigned int irq)
169{ 169{
170 struct ipu_irq_map *map = get_irq_chip_data(irq); 170 struct ipu_irq_map *map = irq_get_chip_data(irq);
171 struct ipu_irq_bank *bank; 171 struct ipu_irq_bank *bank;
172 unsigned long lock_flags; 172 unsigned long lock_flags;
173 bool ret; 173 bool ret;
@@ -269,7 +269,7 @@ int ipu_irq_unmap(unsigned int source)
269/* Chained IRQ handler for IPU error interrupt */ 269/* Chained IRQ handler for IPU error interrupt */
270static void ipu_irq_err(unsigned int irq, struct irq_desc *desc) 270static void ipu_irq_err(unsigned int irq, struct irq_desc *desc)
271{ 271{
272 struct ipu *ipu = get_irq_data(irq); 272 struct ipu *ipu = irq_get_handler_data(irq);
273 u32 status; 273 u32 status;
274 int i, line; 274 int i, line;
275 275
@@ -310,7 +310,7 @@ static void ipu_irq_err(unsigned int irq, struct irq_desc *desc)
310/* Chained IRQ handler for IPU function interrupt */ 310/* Chained IRQ handler for IPU function interrupt */
311static void ipu_irq_fn(unsigned int irq, struct irq_desc *desc) 311static void ipu_irq_fn(unsigned int irq, struct irq_desc *desc)
312{ 312{
313 struct ipu *ipu = get_irq_data(irq); 313 struct ipu *ipu = irq_desc_get_handler_data(desc);
314 u32 status; 314 u32 status;
315 int i, line; 315 int i, line;
316 316
@@ -345,10 +345,10 @@ static void ipu_irq_fn(unsigned int irq, struct irq_desc *desc)
345} 345}
346 346
347static struct irq_chip ipu_irq_chip = { 347static struct irq_chip ipu_irq_chip = {
348 .name = "ipu_irq", 348 .name = "ipu_irq",
349 .ack = ipu_irq_ack, 349 .irq_ack = ipu_irq_ack,
350 .mask = ipu_irq_mask, 350 .irq_mask = ipu_irq_mask,
351 .unmask = ipu_irq_unmask, 351 .irq_unmask = ipu_irq_unmask,
352}; 352};
353 353
354/* Install the IRQ handler */ 354/* Install the IRQ handler */
@@ -366,26 +366,26 @@ int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev)
366 int ret; 366 int ret;
367 367
368 irq = irq_base + i; 368 irq = irq_base + i;
369 ret = set_irq_chip(irq, &ipu_irq_chip); 369 ret = irq_set_chip(irq, &ipu_irq_chip);
370 if (ret < 0) 370 if (ret < 0)
371 return ret; 371 return ret;
372 ret = set_irq_chip_data(irq, irq_map + i); 372 ret = irq_set_chip_data(irq, irq_map + i);
373 if (ret < 0) 373 if (ret < 0)
374 return ret; 374 return ret;
375 irq_map[i].ipu = ipu; 375 irq_map[i].ipu = ipu;
376 irq_map[i].irq = irq; 376 irq_map[i].irq = irq;
377 irq_map[i].source = -EINVAL; 377 irq_map[i].source = -EINVAL;
378 set_irq_handler(irq, handle_level_irq); 378 irq_set_handler(irq, handle_level_irq);
379#ifdef CONFIG_ARM 379#ifdef CONFIG_ARM
380 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 380 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
381#endif 381#endif
382 } 382 }
383 383
384 set_irq_data(ipu->irq_fn, ipu); 384 irq_set_handler_data(ipu->irq_fn, ipu);
385 set_irq_chained_handler(ipu->irq_fn, ipu_irq_fn); 385 irq_set_chained_handler(ipu->irq_fn, ipu_irq_fn);
386 386
387 set_irq_data(ipu->irq_err, ipu); 387 irq_set_handler_data(ipu->irq_err, ipu);
388 set_irq_chained_handler(ipu->irq_err, ipu_irq_err); 388 irq_set_chained_handler(ipu->irq_err, ipu_irq_err);
389 389
390 return 0; 390 return 0;
391} 391}
@@ -397,17 +397,17 @@ void ipu_irq_detach_irq(struct ipu *ipu, struct platform_device *dev)
397 397
398 irq_base = pdata->irq_base; 398 irq_base = pdata->irq_base;
399 399
400 set_irq_chained_handler(ipu->irq_fn, NULL); 400 irq_set_chained_handler(ipu->irq_fn, NULL);
401 set_irq_data(ipu->irq_fn, NULL); 401 irq_set_handler_data(ipu->irq_fn, NULL);
402 402
403 set_irq_chained_handler(ipu->irq_err, NULL); 403 irq_set_chained_handler(ipu->irq_err, NULL);
404 set_irq_data(ipu->irq_err, NULL); 404 irq_set_handler_data(ipu->irq_err, NULL);
405 405
406 for (irq = irq_base; irq < irq_base + CONFIG_MX3_IPU_IRQS; irq++) { 406 for (irq = irq_base; irq < irq_base + CONFIG_MX3_IPU_IRQS; irq++) {
407#ifdef CONFIG_ARM 407#ifdef CONFIG_ARM
408 set_irq_flags(irq, 0); 408 set_irq_flags(irq, 0);
409#endif 409#endif
410 set_irq_chip(irq, NULL); 410 irq_set_chip(irq, NULL);
411 set_irq_chip_data(irq, NULL); 411 irq_set_chip_data(irq, NULL);
412 } 412 }
413} 413}