| Submitter | Sonic Zhang |
|---|---|
| Date | March 4, 2013, 7:20 a.m. |
| Message ID | <1362381609-23716-2-git-send-email-sonic.adi@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/224603/ |
| State | Accepted |
| Delegated to: | Sonic Zhang |
| Headers | show |
Comments
Patch
diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c index fff384a..1845e4f 100644 --- a/drivers/spi/bfin_spi.c +++ b/drivers/spi/bfin_spi.c @@ -250,6 +250,8 @@ void spi_release_bus(struct spi_slave *slave) static int spi_pio_xfer(struct bfin_spi_slave *bss, const u8 *tx, u8 *rx, uint bytes) { + /* discard invalid data and clear RXS */ + read_SPI_RDBR(bss); /* todo: take advantage of hardware fifos */ while (bytes--) { u8 value = (tx ? *tx++ : CONFIG_BFIN_SPI_IDLE_VAL);