aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorTomoya MORINAGA <tomoya-linux@dsn.okisemi.com>2011-09-06 04:16:34 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-10-04 12:10:50 -0400
commit27504be5c10bdc61761ec0126b3645428598ad91 (patch)
tree6d1ec938a9bfd9cb80b36f7aefc38aec2f405531 /drivers/spi
parent387719c2ec995019e0af0dc537ca17c9ebd5b64f (diff)
spi-topcliff-pch: add tx-memory clear after complete transmitting
Currently, in case of reading date from SPI flash, command is sent twice. The cause is that tx-memory clear processing is missing . This patch adds the tx-momory clear processing. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-topcliff-pch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index 1d23f3831866..7a98caa3aed2 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -837,6 +837,11 @@ static void pch_spi_start_transfer(struct pch_spi_data *data)
837 837
838 dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent, 838 dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent,
839 DMA_FROM_DEVICE); 839 DMA_FROM_DEVICE);
840
841 dma_sync_sg_for_cpu(&data->master->dev, dma->sg_tx_p, dma->nent,
842 DMA_FROM_DEVICE);
843 memset(data->dma.tx_buf_virt, 0, PAGE_SIZE);
844
840 async_tx_ack(dma->desc_rx); 845 async_tx_ack(dma->desc_rx);
841 async_tx_ack(dma->desc_tx); 846 async_tx_ack(dma->desc_tx);
842 kfree(dma->sg_tx_p); 847 kfree(dma->sg_tx_p);