mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09: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. Change-Id: Ib215d63d8572e3fc8d843652687e1ebfb7ff531e Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -290,8 +290,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