]> Git Repo - J-linux.git/commitdiff
spi: rockchip: clear interrupt status in error handler
authorJon Lin <[email protected]>
Wed, 16 Feb 2022 01:40:28 +0000 (09:40 +0800)
committerMark Brown <[email protected]>
Thu, 17 Feb 2022 17:15:11 +0000 (17:15 +0000)
The interrupt status bit of the previous error data transmition will
affect the next operation and cause continuous SPI transmission failure.

Signed-off-by: Jon Lin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
drivers/spi/spi-rockchip.c

index 8b4d56ee21938387cd72394fdb8c743d73c564d6..cdc16eecaf6b581ec11735d33bd5de6a6f11b3b8 100644 (file)
@@ -278,8 +278,9 @@ static void rockchip_spi_handle_err(struct spi_controller *ctlr,
         */
        spi_enable_chip(rs, false);
 
-       /* make sure all interrupts are masked */
+       /* make sure all interrupts are masked and status cleared */
        writel_relaxed(0, rs->regs + ROCKCHIP_SPI_IMR);
+       writel_relaxed(0xffffffff, rs->regs + ROCKCHIP_SPI_ICR);
 
        if (atomic_read(&rs->state) & TXDMA)
                dmaengine_terminate_async(ctlr->dma_tx);
This page took 0.059775 seconds and 4 git commands to generate.