aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2011-01-25 05:18:24 -0500
committerDan Williams <dan.j.williams@intel.com>2011-01-31 01:27:19 -0500
commit1c4b0927feab41346b0be971e0287aaf46eba8e0 (patch)
treecae12aed8e600fa0fe70b54f34f31b3c8a0b9496 /drivers/dma/ste_dma40.c
parentcade1d30b2e071a687011c2a38c03ed7187ec501 (diff)
dma40: move lli_load to main source file
These register writes are better placed in the main source file rather than ll.c. Acked-by: Per Forlin <per.forlin@stericsson.com> Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r--drivers/dma/ste_dma40.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 4e9d6c5a7134..6a7a00d5d682 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -504,15 +504,29 @@ static void d40_desc_submit(struct d40_chan *d40c, struct d40_desc *desc)
504 list_add_tail(&desc->node, &d40c->active); 504 list_add_tail(&desc->node, &d40c->active);
505} 505}
506 506
507static void d40_phy_lli_load(struct d40_chan *chan, struct d40_desc *desc)
508{
509 struct d40_phy_lli *lli_dst = desc->lli_phy.dst;
510 struct d40_phy_lli *lli_src = desc->lli_phy.src;
511 void __iomem *base = chan_base(chan);
512
513 writel(lli_src->reg_cfg, base + D40_CHAN_REG_SSCFG);
514 writel(lli_src->reg_elt, base + D40_CHAN_REG_SSELT);
515 writel(lli_src->reg_ptr, base + D40_CHAN_REG_SSPTR);
516 writel(lli_src->reg_lnk, base + D40_CHAN_REG_SSLNK);
517
518 writel(lli_dst->reg_cfg, base + D40_CHAN_REG_SDCFG);
519 writel(lli_dst->reg_elt, base + D40_CHAN_REG_SDELT);
520 writel(lli_dst->reg_ptr, base + D40_CHAN_REG_SDPTR);
521 writel(lli_dst->reg_lnk, base + D40_CHAN_REG_SDLNK);
522}
523
507static void d40_desc_load(struct d40_chan *d40c, struct d40_desc *d40d) 524static void d40_desc_load(struct d40_chan *d40c, struct d40_desc *d40d)
508{ 525{
509 int curr_lcla = -EINVAL, next_lcla; 526 int curr_lcla = -EINVAL, next_lcla;
510 527
511 if (chan_is_physical(d40c)) { 528 if (chan_is_physical(d40c)) {
512 d40_phy_lli_write(d40c->base->virtbase, 529 d40_phy_lli_load(d40c, d40d);
513 d40c->phy_chan->num,
514 d40d->lli_phy.dst,
515 d40d->lli_phy.src);
516 d40d->lli_current = d40d->lli_len; 530 d40d->lli_current = d40d->lli_len;
517 } else { 531 } else {
518 532