diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-11 10:14:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-11 10:14:01 -0400 |
commit | c7a19c795b4b0a3232c157ed29eea85077e95da6 (patch) | |
tree | d3916dcdea74b55453694c9f31b95b6d906e3202 /drivers/dma/fsl-edma.c | |
parent | 5fd41f2a10b38ab84b4c2436140ce490d34291fa (diff) | |
parent | a0bbe990c161ddf56444efe80d9d6e15fdc47aca (diff) |
Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dma updates from Vinod Koul:
"Some notable changes are:
- new driver for AMBA AXI NBPF by Guennadi
- new driver for sun6i controller by Maxime
- pl330 drivers fixes from Lar's
- sh-dma updates and fixes from Laurent, Geert and Kuninori
- Documentation updates from Geert
- drivers fixes and updates spread over dw, edma, freescale, mpc512x
etc.."
* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (72 commits)
dmaengine: sun6i: depends on RESET_CONTROLLER
dma: at_hdmac: fix invalid remaining bytes detection
dmaengine: nbpfaxi: don't build this driver where it cannot be used
dmaengine: nbpf_error_get_channel() can be static
dma: pl08x: Use correct specifier for size_t values
dmaengine: Remove the context argument to the prep_dma_cyclic operation
dmaengine: nbpfaxi: convert to tasklet
dmaengine: nbpfaxi: fix a theoretical race
dmaengine: add a driver for AMBA AXI NBPF DMAC IP cores
dmaengine: add device tree binding documentation for the nbpfaxi driver
dmaengine: edma: Do not register second device when booted with DT
dmaengine: edma: Do not change the error code returned from edma_alloc_slot
dmaengine: rcar-dmac: Add device tree bindings documentation
dmaengine: shdma: Allocate cyclic sg list dynamically
dmaengine: shdma: Make channel filter ignore unrelated devices
dmaengine: sh: Rework Kconfig and Makefile
dmaengine: sun6i: Fix memory leaks
dmaengine: sun6i: Free the interrupt before killing the tasklet
dmaengine: sun6i: Remove switch statement from buswidth convertion routine
dmaengine: of: kconfig: select DMA_ENGINE when DMA_OF is selected
...
Diffstat (limited to 'drivers/dma/fsl-edma.c')
-rw-r--r-- | drivers/dma/fsl-edma.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c index b396a7fb53ab..3c5711d5fe97 100644 --- a/drivers/dma/fsl-edma.c +++ b/drivers/dma/fsl-edma.c | |||
@@ -248,11 +248,12 @@ static void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan, | |||
248 | unsigned int slot, bool enable) | 248 | unsigned int slot, bool enable) |
249 | { | 249 | { |
250 | u32 ch = fsl_chan->vchan.chan.chan_id; | 250 | u32 ch = fsl_chan->vchan.chan.chan_id; |
251 | void __iomem *muxaddr = fsl_chan->edma->muxbase[ch / DMAMUX_NR]; | 251 | void __iomem *muxaddr; |
252 | unsigned chans_per_mux, ch_off; | 252 | unsigned chans_per_mux, ch_off; |
253 | 253 | ||
254 | chans_per_mux = fsl_chan->edma->n_chans / DMAMUX_NR; | 254 | chans_per_mux = fsl_chan->edma->n_chans / DMAMUX_NR; |
255 | ch_off = fsl_chan->vchan.chan.chan_id % chans_per_mux; | 255 | ch_off = fsl_chan->vchan.chan.chan_id % chans_per_mux; |
256 | muxaddr = fsl_chan->edma->muxbase[ch / chans_per_mux]; | ||
256 | 257 | ||
257 | if (enable) | 258 | if (enable) |
258 | edma_writeb(fsl_chan->edma, | 259 | edma_writeb(fsl_chan->edma, |
@@ -516,7 +517,7 @@ err: | |||
516 | static struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( | 517 | static struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( |
517 | struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len, | 518 | struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len, |
518 | size_t period_len, enum dma_transfer_direction direction, | 519 | size_t period_len, enum dma_transfer_direction direction, |
519 | unsigned long flags, void *context) | 520 | unsigned long flags) |
520 | { | 521 | { |
521 | struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan); | 522 | struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan); |
522 | struct fsl_edma_desc *fsl_desc; | 523 | struct fsl_edma_desc *fsl_desc; |
@@ -724,6 +725,7 @@ static struct dma_chan *fsl_edma_xlate(struct of_phandle_args *dma_spec, | |||
724 | { | 725 | { |
725 | struct fsl_edma_engine *fsl_edma = ofdma->of_dma_data; | 726 | struct fsl_edma_engine *fsl_edma = ofdma->of_dma_data; |
726 | struct dma_chan *chan, *_chan; | 727 | struct dma_chan *chan, *_chan; |
728 | unsigned long chans_per_mux = fsl_edma->n_chans / DMAMUX_NR; | ||
727 | 729 | ||
728 | if (dma_spec->args_count != 2) | 730 | if (dma_spec->args_count != 2) |
729 | return NULL; | 731 | return NULL; |
@@ -732,7 +734,7 @@ static struct dma_chan *fsl_edma_xlate(struct of_phandle_args *dma_spec, | |||
732 | list_for_each_entry_safe(chan, _chan, &fsl_edma->dma_dev.channels, device_node) { | 734 | list_for_each_entry_safe(chan, _chan, &fsl_edma->dma_dev.channels, device_node) { |
733 | if (chan->client_count) | 735 | if (chan->client_count) |
734 | continue; | 736 | continue; |
735 | if ((chan->chan_id / DMAMUX_NR) == dma_spec->args[0]) { | 737 | if ((chan->chan_id / chans_per_mux) == dma_spec->args[0]) { |
736 | chan = dma_get_slave_channel(chan); | 738 | chan = dma_get_slave_channel(chan); |
737 | if (chan) { | 739 | if (chan) { |
738 | chan->device->privatecnt++; | 740 | chan->device->privatecnt++; |