aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-12-12 03:45:59 -0500
committerGrant Likely <grant.likely@secretlab.ca>2013-02-05 07:26:57 -0500
commit830379e04858098d65c59f07f68be3d73244ae54 (patch)
treefc54aefda3af27fa7997e67d7f856d31e842b80f /drivers/spi
parent88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7 (diff)
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: Felipe Balbi <balbi@ti.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-omap2-mcspi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index b610f522ca44..68446dbd5545 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -298,10 +298,10 @@ static void omap2_mcspi_rx_callback(void *data)
298 struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master); 298 struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master);
299 struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select]; 299 struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];
300 300
301 complete(&mcspi_dma->dma_rx_completion);
302
303 /* We must disable the DMA RX request */ 301 /* We must disable the DMA RX request */
304 omap2_mcspi_set_dma_req(spi, 1, 0); 302 omap2_mcspi_set_dma_req(spi, 1, 0);
303
304 complete(&mcspi_dma->dma_rx_completion);
305} 305}
306 306
307static void omap2_mcspi_tx_callback(void *data) 307static void omap2_mcspi_tx_callback(void *data)
@@ -310,10 +310,10 @@ static void omap2_mcspi_tx_callback(void *data)
310 struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master); 310 struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master);
311 struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select]; 311 struct omap2_mcspi_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];
312 312
313 complete(&mcspi_dma->dma_tx_completion);
314
315 /* We must disable the DMA TX request */ 313 /* We must disable the DMA TX request */
316 omap2_mcspi_set_dma_req(spi, 0, 0); 314 omap2_mcspi_set_dma_req(spi, 0, 0);
315
316 complete(&mcspi_dma->dma_tx_completion);
317} 317}
318 318
319static void omap2_mcspi_tx_dma(struct spi_device *spi, 319static void omap2_mcspi_tx_dma(struct spi_device *spi,