imx-drm: ipu-common: add ipu_map_irq to request non-IDMAC interrupts
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 14 Apr 2014 21:53:16 +0000 (23:53 +0200)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 26 Apr 2014 10:24:13 +0000 (11:24 +0100)
This allows to request the DC related interrupts.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h
drivers/staging/imx-drm/ipu-v3/ipu-common.c

index c4d14ead5837ce85b0b6fb5064cdca13e9023ab7..2966e425990e436471d763035817121f5bb35585 100644 (file)
@@ -76,6 +76,7 @@ enum ipu_channel_irq {
        IPU_IRQ_EOS = 192,
 };
 
+int ipu_map_irq(struct ipu_soc *ipu, int irq);
 int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel,
                enum ipu_channel_irq irq);
 
index ca85d3d70ae3f454cb019844590183af58356ce9..0585517956779e439a104013423e18d920c6e8a0 100644 (file)
@@ -933,15 +933,22 @@ static void ipu_err_irq_handler(unsigned int irq, struct irq_desc *desc)
        chained_irq_exit(chip, desc);
 }
 
-int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel,
-               enum ipu_channel_irq irq_type)
+int ipu_map_irq(struct ipu_soc *ipu, int irq)
 {
-       int irq = irq_linear_revmap(ipu->domain, irq_type + channel->num);
+       int virq;
 
-       if (!irq)
-               irq = irq_create_mapping(ipu->domain, irq_type + channel->num);
+       virq = irq_linear_revmap(ipu->domain, irq);
+       if (!virq)
+               virq = irq_create_mapping(ipu->domain, irq);
+
+       return virq;
+}
+EXPORT_SYMBOL_GPL(ipu_map_irq);
 
-       return irq;
+int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel,
+               enum ipu_channel_irq irq_type)
+{
+       return ipu_map_irq(ipu, irq_type + channel->num);
 }
 EXPORT_SYMBOL_GPL(ipu_idmac_channel_irq);