aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-05-15 05:51:26 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-05-23 15:13:22 -0400
commit9b233f9b2e927a93b3dc8b8e9c1d59f79be13dcc (patch)
tree6fa47f114b45863b1c76a6dc0358d1f0ecbda8f3
parent57e65ad77fef1b026f5bdf1cd417bb6346b24fdf (diff)
dmaengine: ste_dma40: Don't configure runtime configurable setup during allocate
Using the dmaengine API for slave transfers, allocating and configuring a channel are two separate actions. Here we're removing logical channel configuration from the channel allocation routine for slave transfers, as the same config is already done in the runtime config function, and put the corresponding call into d40_config_memcpy() for the memcpy code path. Cc: Dan Williams <djbw@fb.com> Cc: Per Forlin <per.forlin@stericsson.com> Cc: Rabin Vincent <rabin@rab.in> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> [Edited the commit message] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/dma/ste_dma40.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index b7fe46bd6a8e..ba84df8fc9d8 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -2040,6 +2040,9 @@ static int d40_config_memcpy(struct d40_chan *d40c)
2040 d40c->dma_cfg = dma40_memcpy_conf_log; 2040 d40c->dma_cfg = dma40_memcpy_conf_log;
2041 d40c->dma_cfg.dev_type = dma40_memcpy_channels[d40c->chan.chan_id]; 2041 d40c->dma_cfg.dev_type = dma40_memcpy_channels[d40c->chan.chan_id];
2042 2042
2043 d40_log_cfg(&d40c->dma_cfg,
2044 &d40c->log_def.lcsp1, &d40c->log_def.lcsp3);
2045
2043 } else if (dma_has_cap(DMA_MEMCPY, cap) && 2046 } else if (dma_has_cap(DMA_MEMCPY, cap) &&
2044 dma_has_cap(DMA_SLAVE, cap)) { 2047 dma_has_cap(DMA_SLAVE, cap)) {
2045 d40c->dma_cfg = dma40_memcpy_conf_phy; 2048 d40c->dma_cfg = dma40_memcpy_conf_phy;
@@ -2508,9 +2511,6 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
2508 d40_set_prio_realtime(d40c); 2511 d40_set_prio_realtime(d40c);
2509 2512
2510 if (chan_is_logical(d40c)) { 2513 if (chan_is_logical(d40c)) {
2511 d40_log_cfg(&d40c->dma_cfg,
2512 &d40c->log_def.lcsp1, &d40c->log_def.lcsp3);
2513
2514 if (d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_MEM) 2514 if (d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_MEM)
2515 d40c->lcpa = d40c->base->lcpa_base + 2515 d40c->lcpa = d40c->base->lcpa_base +
2516 d40c->dma_cfg.dev_type * D40_LCPA_CHAN_SIZE; 2516 d40c->dma_cfg.dev_type * D40_LCPA_CHAN_SIZE;