[14/14] media: sunxi: sun8i-a83t-mipi-csi2: Avoid using the (unsolicited) interrupt
diff mbox series

Message ID 20201023174546.504028-15-paul.kocialkowski@bootlin.com
State New, archived
Headers show
Series
  • Allwinner MIPI CSI-2 support for A31/V3s/A83T
Related show

Commit Message

Paul Kocialkowski Oct. 23, 2020, 5:45 p.m. UTC
The A83T MIPI CSI-2 apparently produces interrupts regardless of the mask
registers, for example when a transmission error occurs.

This generates quite a flood when unsolicited interrupts are received on
each received frame. As a result, disable the interrupt for now since
we are not currently using it for error reporting.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
 .../sun8i_a83t_mipi_csi2.c                    | 40 -------------------
 1 file changed, 40 deletions(-)

Comments

Maxime Ripard Oct. 26, 2020, 4:57 p.m. UTC | #1
On Fri, Oct 23, 2020 at 07:45:46PM +0200, Paul Kocialkowski wrote:
> The A83T MIPI CSI-2 apparently produces interrupts regardless of the mask
> registers, for example when a transmission error occurs.
> 
> This generates quite a flood when unsolicited interrupts are received on
> each received frame. As a result, disable the interrupt for now since
> we are not currently using it for error reporting.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

This should be merged into the driver patch

Maxime

Patch
diff mbox series

diff --git a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
index 1ff6f5dfd81a..26af3e3f5f89 100644
--- a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
+++ b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
@@ -25,34 +25,6 @@ 
 
 /* Core */
 
-static irqreturn_t sun8i_a83t_mipi_csi2_isr(int irq, void *dev_id)
-{
-	struct sun8i_a83t_mipi_csi2_dev *cdev =
-		(struct sun8i_a83t_mipi_csi2_dev *)dev_id;
-	struct regmap *regmap = cdev->regmap;
-	u32 status;
-
-	WARN_ONCE(1, MODULE_NAME
-		  ": Unsolicited interrupt, an error likely occurred!\n");
-
-	regmap_read(regmap, SUN8I_A83T_MIPI_CSI2_INT_STA0_REG, &status);
-	regmap_write(regmap, SUN8I_A83T_MIPI_CSI2_INT_STA0_REG, status);
-
-	regmap_read(regmap, SUN8I_A83T_MIPI_CSI2_INT_STA1_REG, &status);
-	regmap_write(regmap, SUN8I_A83T_MIPI_CSI2_INT_STA1_REG, status);
-
-	regmap_read(regmap, SUN8I_A83T_MIPI_CSI2_INT_MSK0_REG, &status);
-	regmap_read(regmap, SUN8I_A83T_MIPI_CSI2_INT_MSK1_REG, &status);
-
-	/*
-	 * The interrupt can be used to catch transmission errors.
-	 * However, we currently lack plumbing for reporting that to the
-	 * A31 CSI controller driver.
-	 */
-
-	return IRQ_HANDLED;
-}
-
 static void sun8i_a83t_mipi_csi2_init(struct sun8i_a83t_mipi_csi2_dev *cdev)
 {
 	struct regmap *regmap = cdev->regmap;
@@ -587,7 +559,6 @@  static int sun8i_a83t_mipi_csi2_resource_request(struct sun8i_a83t_mipi_csi2_dev
 {
 	struct resource *res;
 	void __iomem *io_base;
-	int irq;
 	int ret;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -626,17 +597,6 @@  static int sun8i_a83t_mipi_csi2_resource_request(struct sun8i_a83t_mipi_csi2_dev
 		return PTR_ERR(cdev->reset);
 	}
 
-	irq = platform_get_irq(pdev, 0);
-	if (irq < 0)
-		return -ENXIO;
-
-	ret = devm_request_irq(&pdev->dev, irq, sun8i_a83t_mipi_csi2_isr, 0,
-			       MODULE_NAME, cdev);
-	if (ret) {
-		dev_err(&pdev->dev, "failed to request MIPI CSI-2 IRQ\n");
-		return ret;
-	}
-
 	ret = sun8i_a83t_dphy_register(cdev);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to init MIPI D-PHY\n");