diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2011-07-21 12:11:46 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-07-26 06:03:28 -0400 |
commit | 25c94f7fcf70d94e12401b9c957ddf1d303061a3 (patch) | |
tree | 8d0f926b6bbb2272dce7c506bd55f037d94a8b82 /drivers/dma | |
parent | f44bd191404841e44a914b2760a16ad328f406a8 (diff) |
DMA: PL08x: select LLI bus only once per LLI setup
Avoid re-selecting the LLI bus each time we create an LLI. Move it out
of the LLI setup loops.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/amba-pl08x.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 90db51f2d00..6808f7dc52c 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
@@ -491,10 +491,10 @@ static inline u32 pl08x_cctl_bits(u32 cctl, u8 srcwidth, u8 dstwidth, | |||
491 | 491 | ||
492 | struct pl08x_lli_build_data { | 492 | struct pl08x_lli_build_data { |
493 | struct pl08x_txd *txd; | 493 | struct pl08x_txd *txd; |
494 | struct pl08x_driver_data *pl08x; | ||
495 | struct pl08x_bus_data srcbus; | 494 | struct pl08x_bus_data srcbus; |
496 | struct pl08x_bus_data dstbus; | 495 | struct pl08x_bus_data dstbus; |
497 | size_t remainder; | 496 | size_t remainder; |
497 | u32 lli_bus; | ||
498 | }; | 498 | }; |
499 | 499 | ||
500 | /* | 500 | /* |
@@ -547,8 +547,7 @@ static void pl08x_fill_lli_for_desc(struct pl08x_lli_build_data *bd, | |||
547 | llis_va[num_llis].src = bd->srcbus.addr; | 547 | llis_va[num_llis].src = bd->srcbus.addr; |
548 | llis_va[num_llis].dst = bd->dstbus.addr; | 548 | llis_va[num_llis].dst = bd->dstbus.addr; |
549 | llis_va[num_llis].lli = llis_bus + (num_llis + 1) * sizeof(struct pl08x_lli); | 549 | llis_va[num_llis].lli = llis_bus + (num_llis + 1) * sizeof(struct pl08x_lli); |
550 | if (bd->pl08x->lli_buses & PL08X_AHB2) | 550 | llis_va[num_llis].lli |= bd->lli_bus; |
551 | llis_va[num_llis].lli |= PL080_LLI_LM_AHB2; | ||
552 | 551 | ||
553 | if (cctl & PL080_CONTROL_SRC_INCR) | 552 | if (cctl & PL080_CONTROL_SRC_INCR) |
554 | bd->srcbus.addr += len; | 553 | bd->srcbus.addr += len; |
@@ -601,9 +600,9 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, | |||
601 | cctl = txd->cctl; | 600 | cctl = txd->cctl; |
602 | 601 | ||
603 | bd.txd = txd; | 602 | bd.txd = txd; |
604 | bd.pl08x = pl08x; | ||
605 | bd.srcbus.addr = txd->src_addr; | 603 | bd.srcbus.addr = txd->src_addr; |
606 | bd.dstbus.addr = txd->dst_addr; | 604 | bd.dstbus.addr = txd->dst_addr; |
605 | bd.lli_bus = (pl08x->lli_buses & PL08X_AHB2) ? PL080_LLI_LM_AHB2 : 0; | ||
607 | 606 | ||
608 | /* Find maximum width of the source bus */ | 607 | /* Find maximum width of the source bus */ |
609 | bd.srcbus.maxwidth = | 608 | bd.srcbus.maxwidth = |