Lines Matching full:ipu

15 #include <linux/dma/ipu-dma.h>
22 static u32 ipu_read_reg(struct ipu *ipu, unsigned long reg) in ipu_read_reg() argument
24 return __raw_readl(ipu->reg_ipu + reg); in ipu_read_reg()
27 static void ipu_write_reg(struct ipu *ipu, u32 value, unsigned long reg) in ipu_write_reg() argument
29 __raw_writel(value, ipu->reg_ipu + reg); in ipu_write_reg()
34 * IPU IRQ chip driver
44 struct ipu *ipu; member
73 struct ipu *ipu; member
105 pr_err("IPU: %s(%u) - unmapped!\n", __func__, d->irq); in ipu_irq_unmask()
109 reg = ipu_read_reg(bank->ipu, bank->control); in ipu_irq_unmask()
111 ipu_write_reg(bank->ipu, reg, bank->control); in ipu_irq_unmask()
128 pr_err("IPU: %s(%u) - unmapped!\n", __func__, d->irq); in ipu_irq_mask()
132 reg = ipu_read_reg(bank->ipu, bank->control); in ipu_irq_mask()
134 ipu_write_reg(bank->ipu, reg, bank->control); in ipu_irq_mask()
150 pr_err("IPU: %s(%u) - unmapped!\n", __func__, d->irq); in ipu_irq_ack()
154 ipu_write_reg(bank->ipu, 1UL << (map->source & 31), bank->status); in ipu_irq_ack()
173 ret = bank && ipu_read_reg(bank->ipu, bank->status) & in ipu_irq_status()
181 * ipu_irq_map() - map an IPU interrupt source to an IRQ number
185 * The source parameter has to be explained further. On i.MX31 IPU has 137 IRQ
190 * and also provides forward compatibility with any future IPU implementations
203 pr_err("IPU: Source %u already mapped to IRQ %u\n", source, map->irq); in ipu_irq_map()
218 pr_debug("IPU: mapped source %u to IRQ %u\n", in ipu_irq_map()
227 pr_err("IPU: couldn't map source %u: %d\n", source, ret); in ipu_irq_map()
233 * ipu_irq_unmap() - unmap an IPU interrupt source
248 pr_debug("IPU: unmapped source %u from IRQ %u\n", in ipu_irq_unmap()
265 /* Chained IRQ handler for IPU function and error interrupt */
268 struct ipu *ipu = irq_desc_get_handler_data(desc); in ipu_irq_handler() local
276 status = ipu_read_reg(ipu, bank->status); in ipu_irq_handler()
282 status &= ipu_read_reg(ipu, bank->control); in ipu_irq_handler()
295 pr_err("IPU: Interrupt on unmapped source %u bank %d\n", in ipu_irq_handler()
314 int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev) in ipu_irq_attach_irq() argument
324 irq_bank[i].ipu = ipu; in ipu_irq_attach_irq()
336 irq_map[i].ipu = ipu; in ipu_irq_attach_irq()
343 irq_set_chained_handler_and_data(ipu->irq_fn, ipu_irq_handler, ipu); in ipu_irq_attach_irq()
345 irq_set_chained_handler_and_data(ipu->irq_err, ipu_irq_handler, ipu); in ipu_irq_attach_irq()
347 ipu->irq_base = irq_base; in ipu_irq_attach_irq()
352 void ipu_irq_detach_irq(struct ipu *ipu, struct platform_device *dev) in ipu_irq_detach_irq() argument
356 irq_base = ipu->irq_base; in ipu_irq_detach_irq()
358 irq_set_chained_handler_and_data(ipu->irq_fn, NULL, NULL); in ipu_irq_detach_irq()
360 irq_set_chained_handler_and_data(ipu->irq_err, NULL, NULL); in ipu_irq_detach_irq()