Skip to content

Commit

Permalink
spi-topcliff-pch: add tx-memory clear after complete transmitting
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
  • Loading branch information
Tomoya MORINAGA authored and glikely committed Oct 4, 2011
1 parent 387719c commit 27504be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/spi/spi-topcliff-pch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_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_tx);
kfree(dma->sg_tx_p);
Expand Down

0 comments on commit 27504be

Please sign in to comment.