mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge commit 'v2.6.37-rc7' into spi/next
This commit is contained in:
commit
752a4a95e3
1739 changed files with 31773 additions and 14852 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue