From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/9] DMA: PL08x: clean up LLI debugging
Date: Thu, 21 Jul 2011 17:12:06 +0100 [thread overview]
Message-ID: <E1Qjvr4-0003MJ-ST@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20110721160800.GR26574@n2100.arm.linux.org.uk>
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>
---
drivers/dma/amba-pl08x.c | 33 ++++++++++++++++-----------------
1 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 6808f7d..1c641bf 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,
/* Set up the bus widths to the maximum */
bd.srcbus.buswidth = bd.srcbus.maxwidth;
bd.dstbus.buswidth = bd.dstbus.maxwidth;
- dev_vdbg(&pl08x->adev->dev,
- "%s source bus is %d bytes wide, dest bus is %d bytes wide\n",
- __func__, bd.srcbus.buswidth, bd.dstbus.buswidth);
-
/*
* Bytes transferred == tsize * MIN(buswidths), not max(buswidths)
*/
max_bytes_per_lli = min(bd.srcbus.buswidth, bd.dstbus.buswidth) *
PL080_CONTROL_TRANSFER_SIZE_MASK;
- dev_vdbg(&pl08x->adev->dev,
- "%s max bytes per lli = %zu\n",
- __func__, max_bytes_per_lli);
/* We need to count this down to zero */
bd.remainder = txd->len;
- dev_vdbg(&pl08x->adev->dev,
- "%s remainder = %zu\n",
- __func__, bd.remainder);
/*
* Choose bus to align to
@@ -644,6 +634,16 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
*/
pl08x_choose_master_bus(&bd, &mbus, &sbus, cctl);
+ dev_vdbg(&pl08x->adev->dev, "src=0x%08x%s/%u dst=0x%08x%s/%u len=%zu llimax=%zu\n",
+ bd.srcbus.addr, cctl & PL080_CONTROL_SRC_INCR ? "+" : "",
+ bd.srcbus.buswidth,
+ bd.dstbus.addr, cctl & PL080_CONTROL_DST_INCR ? "+" : "",
+ bd.dstbus.buswidth,
+ bd.remainder, max_bytes_per_lli);
+ dev_vdbg(&pl08x->adev->dev, "mbus=%s sbus=%s\n",
+ mbus == &bd.srcbus ? "src" : "dst",
+ sbus == &bd.srcbus ? "src" : "dst");
+
if (txd->len < mbus->buswidth) {
/* Less than a bus width available - send as single bytes */
while (bd.remainder) {
@@ -835,15 +835,14 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
{
int i;
+ dev_vdbg(&pl08x->adev->dev,
+ "%-3s %-9s %-10s %-10s %-10s %s\n",
+ "lli", "", "csrc", "cdst", "clli", "cctl");
for (i = 0; i < num_llis; i++) {
dev_vdbg(&pl08x->adev->dev,
- "lli %d @%p: csrc=0x%08x, cdst=0x%08x, cctl=0x%08x, clli=0x%08x\n",
- i,
- &llis_va[i],
- llis_va[i].src,
- llis_va[i].dst,
- llis_va[i].cctl,
- llis_va[i].lli
+ "%3d @%p: 0x%08x 0x%08x 0x%08x 0x%08x\n",
+ i, &llis_va[i], llis_va[i].src,
+ llis_va[i].dst, llis_va[i].lli, llis_va[i].cctl
);
}
}
--
1.7.4.4
next prev parent reply other threads:[~2011-07-21 16:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-05 13:10 [PATCH 0/9] PL08x further cleanups Russell King - ARM Linux
2011-07-05 13:10 ` [PATCH 1/9] DMA: PL08x: remove unused constants Russell King - ARM Linux
2011-07-05 13:11 ` [PATCH 2/9] DMA: PL08x: select LLI bus only once per LLI setup Russell King - ARM Linux
2011-07-05 13:11 ` [PATCH 3/9] DMA: PL08x: clean up LLI debugging Russell King - ARM Linux
2011-07-05 13:11 ` [PATCH 4/9] DMA: PL08x: separately store source/destination slave address Russell King - ARM Linux
2011-07-05 13:12 ` [PATCH 5/9] DMA: PL08x: separately store source/destination cctl Russell King - ARM Linux
2011-07-05 13:12 ` [PATCH 6/9] DMA: PL08x: constify plchan->cd and plat->slave_channels Russell King - ARM Linux
2011-07-05 13:12 ` [PATCH 7/9] DMA: PL08x: cleanup selection of buswidth Russell King - ARM Linux
2011-07-05 13:13 ` [PATCH 8/9] DMA: PL08x: avoid recalculating cctl at each prepare Russell King - ARM Linux
2011-07-05 13:13 ` [PATCH 9/9] DMA: PL08x: cleanup selection of burst size Russell King - ARM Linux
2011-07-07 19:51 ` [PATCH 0/9] PL08x further cleanups Linus Walleij
2011-07-13 23:05 ` Koul, Vinod
2011-07-21 16:08 ` Russell King - ARM Linux
2011-07-21 16:11 ` [PATCH 1/9] DMA: PL08x: remove unused constants Russell King - ARM Linux
2011-07-21 16:11 ` [PATCH 2/9] DMA: PL08x: select LLI bus only once per LLI setup Russell King - ARM Linux
2011-07-21 16:12 ` Russell King - ARM Linux [this message]
2011-07-21 16:12 ` [PATCH 4/9] DMA: PL08x: separately store source/destination slave address Russell King - ARM Linux
2011-07-21 16:12 ` [PATCH 5/9] DMA: PL08x: separately store source/destination cctl Russell King - ARM Linux
2011-07-21 16:13 ` [PATCH 6/9] DMA: PL08x: constify plchan->cd and plat->slave_channels Russell King - ARM Linux
2011-07-21 16:13 ` [PATCH 7/9] DMA: PL08x: cleanup selection of buswidth Russell King - ARM Linux
2011-07-21 16:13 ` [PATCH 8/9] DMA: PL08x: avoid recalculating cctl at each prepare Russell King - ARM Linux
2011-07-21 16:14 ` [PATCH 9/9] DMA: PL08x: cleanup selection of burst size Russell King - ARM Linux
2011-07-25 13:38 ` [PATCH 0/9] PL08x further cleanups Vinod Koul
2011-07-25 13:43 ` Russell King - ARM Linux
2011-07-25 13:51 ` Vinod Koul
2011-07-25 14:22 ` Russell King - ARM Linux
2011-07-25 14:38 ` Vinod Koul
2011-07-25 13:51 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Qjvr4-0003MJ-ST@rmk-PC.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).