aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2011-07-21 12:12:06 -0400
committerVinod Koul <vinod.koul@intel.com>2011-07-26 06:03:28 -0400
commitfc74eb791590e624ca6915ae76a04808e03bffb0 (patch)
tree2513ce08260e547137d67b108c254b101d3c8df2 /drivers/dma
parent25c94f7fcf70d94e12401b9c957ddf1d303061a3 (diff)
DMA: PL08x: clean up LLI debugging
Clean up debugging when setting up the LLI list. This reduces the amount of output while preserving the information, and makes it easier to read. 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.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 6808f7dc52c7..1c641bfd1826 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -617,25 +617,15 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
617 /* Set up the bus widths to the maximum */ 617 /* Set up the bus widths to the maximum */
618 bd.srcbus.buswidth = bd.srcbus.maxwidth; 618 bd.srcbus.buswidth = bd.srcbus.maxwidth;
619 bd.dstbus.buswidth = bd.dstbus.maxwidth; 619 bd.dstbus.buswidth = bd.dstbus.maxwidth;
620 dev_vdbg(&pl08x->adev->dev,
621 "%s source bus is %d bytes wide, dest bus is %d bytes wide\n",
622 __func__, bd.srcbus.buswidth, bd.dstbus.buswidth);
623
624 620
625 /* 621 /*
626 * Bytes transferred == tsize * MIN(buswidths), not max(buswidths) 622 * Bytes transferred == tsize * MIN(buswidths), not max(buswidths)
627 */ 623 */
628 max_bytes_per_lli = min(bd.srcbus.buswidth, bd.dstbus.buswidth) * 624 max_bytes_per_lli = min(bd.srcbus.buswidth, bd.dstbus.buswidth) *
629 PL080_CONTROL_TRANSFER_SIZE_MASK; 625 PL080_CONTROL_TRANSFER_SIZE_MASK;
630 dev_vdbg(&pl08x->adev->dev,
631 "%s max bytes per lli = %zu\n",
632 __func__, max_bytes_per_lli);
633 626
634 /* We need to count this down to zero */ 627 /* We need to count this down to zero */
635 bd.remainder = txd->len; 628 bd.remainder = txd->len;
636 dev_vdbg(&pl08x->adev->dev,
637 "%s remainder = %zu\n",
638 __func__, bd.remainder);
639 629
640 /* 630 /*
641 * Choose bus to align to 631 * Choose bus to align to
@@ -644,6 +634,16 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
644 */ 634 */
645 pl08x_choose_master_bus(&bd, &mbus, &sbus, cctl); 635 pl08x_choose_master_bus(&bd, &mbus, &sbus, cctl);
646 636
637 dev_vdbg(&pl08x->adev->dev, "src=0x%08x%s/%u dst=0x%08x%s/%u len=%zu llimax=%zu\n",
638 bd.srcbus.addr, cctl & PL080_CONTROL_SRC_INCR ? "+" : "",
639 bd.srcbus.buswidth,
640 bd.dstbus.addr, cctl & PL080_CONTROL_DST_INCR ? "+" : "",
641 bd.dstbus.buswidth,
642 bd.remainder, max_bytes_per_lli);
643 dev_vdbg(&pl08x->adev->dev, "mbus=%s sbus=%s\n",
644 mbus == &bd.srcbus ? "src" : "dst",
645 sbus == &bd.srcbus ? "src" : "dst");
646
647 if (txd->len < mbus->buswidth) { 647 if (txd->len < mbus->buswidth) {
648 /* Less than a bus width available - send as single bytes */ 648 /* Less than a bus width available - send as single bytes */
649 while (bd.remainder) { 649 while (bd.remainder) {
@@ -835,15 +835,14 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
835 { 835 {
836 int i; 836 int i;
837 837
838 dev_vdbg(&pl08x->adev->dev,
839 "%-3s %-9s %-10s %-10s %-10s %s\n",
840 "lli", "", "csrc", "cdst", "clli", "cctl");
838 for (i = 0; i < num_llis; i++) { 841 for (i = 0; i < num_llis; i++) {
839 dev_vdbg(&pl08x->adev->dev, 842 dev_vdbg(&pl08x->adev->dev,
840 "lli %d @%p: csrc=0x%08x, cdst=0x%08x, cctl=0x%08x, clli=0x%08x\n", 843 "%3d @%p: 0x%08x 0x%08x 0x%08x 0x%08x\n",
841 i, 844 i, &llis_va[i], llis_va[i].src,
842 &llis_va[i], 845 llis_va[i].dst, llis_va[i].lli, llis_va[i].cctl
843 llis_va[i].src,
844 llis_va[i].dst,
845 llis_va[i].cctl,
846 llis_va[i].lli
847 ); 846 );
848 } 847 }
849 } 848 }