diff options
| author | J. Bruce Fields <bfields@redhat.com> | 2010-12-17 13:29:07 -0500 |
|---|---|---|
| committer | J. Bruce Fields <bfields@redhat.com> | 2010-12-17 13:29:07 -0500 |
| commit | ec66ee3797e5848356cf593c6ec7aabf30a00cf1 (patch) | |
| tree | 7ed5c84cc914644ffa1cd1b6a2b45db53fc224e8 /drivers/spi | |
| parent | 1205065764f2eda3216ebe213143f69891ee3460 (diff) | |
| parent | b0c3844d8af6b9f3f18f31e1b0502fbefa2166be (diff) | |
| download | linux-ec66ee3797e5848356cf593c6ec7aabf30a00cf1.tar.bz2 | |
Merge commit 'v2.6.37-rc6' into for-2.6.38
Diffstat (limited to 'drivers/spi')
| -rw-r--r-- | drivers/spi/atmel_spi.c | 6 | ||||
| -rw-r--r-- | drivers/spi/dw_spi.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 154529aacc03..a067046c9da2 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -352,8 +352,12 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer) xfer->tx_dma = xfer->rx_dma = INVALID_DMA_ADDRESS; if (xfer->tx_buf) { + /* tx_buf is a const void* where we need a void * for the dma + * mapping */ + void *nonconst_tx = (void *)xfer->tx_buf; + xfer->tx_dma = dma_map_single(dev, - (void *) xfer->tx_buf, xfer->len, + nonconst_tx, xfer->len, DMA_TO_DEVICE); if (dma_mapping_error(dev, xfer->tx_dma)) return -ENOMEM; diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c index 90439314cf67..0838c79861e4 100644 --- a/drivers/spi/dw_spi.c +++ b/drivers/spi/dw_spi.c @@ -413,6 +413,11 @@ static void poll_transfer(struct dw_spi *dws) { while (dws->write(dws)) dws->read(dws); + /* + * There is a possibility that the last word of a transaction + * will be lost if data is not ready. Re-read to solve this issue. + */ + dws->read(dws); transfer_complete(dws); } |