mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
spi: rockchip: clear interrupt status in error handler
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]>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user