Commit 23065096 authored by Thor Thayer's avatar Thor Thayer Committed by Mark Brown

spi: dw-spi: Single Register read to clear IRQs

Instead of clearing the RxU, RxO, and TxO IRQs individually with
3 register reads, a single read of the ICR register will do the
same thing.
Signed-off-by: default avatarThor Thayer <tthayer@opensource.altera.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d744f826
...@@ -232,9 +232,7 @@ static irqreturn_t interrupt_transfer(struct dw_spi *dws) ...@@ -232,9 +232,7 @@ static irqreturn_t interrupt_transfer(struct dw_spi *dws)
/* Error handling */ /* Error handling */
if (irq_status & (SPI_INT_TXOI | SPI_INT_RXOI | SPI_INT_RXUI)) { if (irq_status & (SPI_INT_TXOI | SPI_INT_RXOI | SPI_INT_RXUI)) {
dw_readw(dws, DW_SPI_TXOICR); dw_readw(dws, DW_SPI_ICR);
dw_readw(dws, DW_SPI_RXOICR);
dw_readw(dws, DW_SPI_RXUICR);
int_error_stop(dws, "interrupt_transfer: fifo overrun/underrun"); int_error_stop(dws, "interrupt_transfer: fifo overrun/underrun");
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment