Skip to content

Commit

Permalink
spi/omap2: disable DMA requests before complete()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi authored and Grant Likely committed Feb 5, 2013
1 parent 88b62b9 commit 830379e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/spi/spi-omap2-mcspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];

complete(&mcspi_dma->dma_rx_completion);

/* We must disable the DMA RX request */
omap2_mcspi_set_dma_req(spi, 1, 0);

complete(&mcspi_dma->dma_rx_completion);
}

static void omap2_mcspi_tx_callback(void *data)
Expand All @@ -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_dma *mcspi_dma = &mcspi->dma_channels[spi->chip_select];

complete(&mcspi_dma->dma_tx_completion);

/* We must disable the DMA TX request */
omap2_mcspi_set_dma_req(spi, 0, 0);

complete(&mcspi_dma->dma_tx_completion);
}

static void omap2_mcspi_tx_dma(struct spi_device *spi,
Expand Down

0 comments on commit 830379e

Please sign in to comment.