提交 830379e0 编写于 作者: F Felipe Balbi 提交者: Grant Likely

spi/omap2: disable DMA requests before complete()

No actual errors have been found for completing
before disabling DMA request lines, but it just
looks more semantically correct that on our DMA
callback we quiesce the whole thing before stating
transfer is finished.
Signed-off-by: NFelipe Balbi <balbi@ti.com>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 88b62b91
...@@ -298,10 +298,10 @@ static void omap2_mcspi_rx_callback(void *data) ...@@ -298,10 +298,10 @@ static void omap2_mcspi_rx_callback(void *data)
struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master); struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master);
struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select]; struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];
complete(&mcspi_dma->dma_rx_completion);
/* We must disable the DMA RX request */ /* We must disable the DMA RX request */
omap2_mcspi_set_dma_req(spi, 1, 0); omap2_mcspi_set_dma_req(spi, 1, 0);
complete(&mcspi_dma->dma_rx_completion);
} }
static void omap2_mcspi_tx_callback(void *data) static void omap2_mcspi_tx_callback(void *data)
...@@ -310,10 +310,10 @@ static void omap2_mcspi_tx_callback(void *data) ...@@ -310,10 +310,10 @@ static void omap2_mcspi_tx_callback(void *data)
struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master); struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master);
struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select]; struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];
complete(&mcspi_dma->dma_tx_completion);
/* We must disable the DMA TX request */ /* We must disable the DMA TX request */
omap2_mcspi_set_dma_req(spi, 0, 0); omap2_mcspi_set_dma_req(spi, 0, 0);
complete(&mcspi_dma->dma_tx_completion);
} }
static void omap2_mcspi_tx_dma(struct spi_device *spi, static void omap2_mcspi_tx_dma(struct spi_device *spi,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册