Skip to content

Commit

Permalink
spi: dw-spi: Single Register read to clear IRQs
Browse files Browse the repository at this point in the history
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: Thor Thayer <tthayer@opensource.altera.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Thor Thayer authored and Mark Brown committed Mar 9, 2015
1 parent d744f82 commit 2306509
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/spi/spi-dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,7 @@ static irqreturn_t interrupt_transfer(struct dw_spi *dws)

/* Error handling */
if (irq_status & (SPI_INT_TXOI | SPI_INT_RXOI | SPI_INT_RXUI)) {
dw_readw(dws, DW_SPI_TXOICR);
dw_readw(dws, DW_SPI_RXOICR);
dw_readw(dws, DW_SPI_RXUICR);
dw_readw(dws, DW_SPI_ICR);
int_error_stop(dws, "interrupt_transfer: fifo overrun/underrun");
return IRQ_HANDLED;
}
Expand Down

0 comments on commit 2306509

Please sign in to comment.