mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 01:24:12 +08:00
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>
This commit is contained in:
parent
387719c2ec
commit
27504be5c1
@ -837,6 +837,11 @@ static void pch_spi_start_transfer(struct pch_spi_data *data)
|
|||||||
|
|
||||||
dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent,
|
dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent,
|
||||||
DMA_FROM_DEVICE);
|
DMA_FROM_DEVICE);
|
||||||
|
|
||||||
|
dma_sync_sg_for_cpu(&data->master->dev, dma->sg_tx_p, dma->nent,
|
||||||
|
DMA_FROM_DEVICE);
|
||||||
|
memset(data->dma.tx_buf_virt, 0, PAGE_SIZE);
|
||||||
|
|
||||||
async_tx_ack(dma->desc_rx);
|
async_tx_ack(dma->desc_rx);
|
||||||
async_tx_ack(dma->desc_tx);
|
async_tx_ack(dma->desc_tx);
|
||||||
kfree(dma->sg_tx_p);
|
kfree(dma->sg_tx_p);
|
||||||
|
Loading…
Reference in New Issue
Block a user