diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2014-06-02 09:38:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-02 10:49:32 -0400 |
commit | 32c64261c6f50a4e71ec7546f7e2f48eba91c985 (patch) | |
tree | f18b47b743b7f867d581743278beee578e4ba044 /drivers/spi | |
parent | 5f684c34fc82be84ece158aa5c5c7c5072daa9a0 (diff) |
spi: rspi: Do not call rspi_receive_init() for TX-only
Since commit 8449fd76deb9ac67a15a6fb8ead7bb4595d019d2 ("spi: rspi: Merge
rspi_send_pio() and rspi_receive_pio()"), rspi_receive_init() is called
for transmit-only transfers too, while this is not needed.
Only call rspi_receive_init() when receiving, to preserve behavior on
RSPI on SH.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-rspi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index d04a4acce231..57beda209599 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c | |||
@@ -726,13 +726,13 @@ static int rspi_transfer_out_in(struct rspi_data *rspi, | |||
726 | u8 *rx_buf = xfer->rx_buf; | 726 | u8 *rx_buf = xfer->rx_buf; |
727 | u8 spcr, data; | 727 | u8 spcr, data; |
728 | 728 | ||
729 | rspi_receive_init(rspi); | ||
730 | |||
731 | spcr = rspi_read8(rspi, RSPI_SPCR); | 729 | spcr = rspi_read8(rspi, RSPI_SPCR); |
732 | if (rx_buf) | 730 | if (rx_buf) { |
731 | rspi_receive_init(rspi); | ||
733 | spcr &= ~SPCR_TXMD; | 732 | spcr &= ~SPCR_TXMD; |
734 | else | 733 | } else { |
735 | spcr |= SPCR_TXMD; | 734 | spcr |= SPCR_TXMD; |
735 | } | ||
736 | rspi_write8(rspi, spcr, RSPI_SPCR); | 736 | rspi_write8(rspi, spcr, RSPI_SPCR); |
737 | 737 | ||
738 | while (remain > 0) { | 738 | while (remain > 0) { |