spi: rspi: Fix typo when clearing SPSR_OVRF
authorGeert Uytterhoeven <geert+renesas@linux-m68k.org>
Mon, 23 Dec 2013 18:34:24 +0000 (19:34 +0100)
committerMark Brown <broonie@linaro.org>
Tue, 24 Dec 2013 13:12:07 +0000 (13:12 +0000)
The overrun flag should be cleared in the SPI Status Register, not in the
SPI Control Register, based on the SDK sample code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-rspi.c

index b60862f58534dfce2e0056d42e9dfa87d4c43506..7a185bf431ed2ca6e71358a7a56833cbae65b61c 100644 (file)
@@ -517,7 +517,7 @@ static void rspi_receive_init(struct rspi_data *rspi)
                rspi_read16(rspi, RSPI_SPDR);   /* dummy read */
        if (spsr & SPSR_OVRF)
                rspi_write8(rspi, rspi_read8(rspi, RSPI_SPSR) & ~SPSR_OVRF,
-                           RSPI_SPCR);
+                           RSPI_SPSR);
 }
 
 static int rspi_receive_pio(struct rspi_data *rspi, struct spi_message *mesg,