public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@sifive.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org, Eugeniy.Paltsev@synopsys.com,
	linux-kernel@vger.kernel.org,
	Sudip Mukherjee <sudip.mukherjee@sifive.com>,
	Jude Onyenegecha <jude.onyenegecha@sifive.com>
Subject: Re: [PATCH 1/3] dmaengine: dw-axi-dmac: dump channel registers on error
Date: Thu, 21 Jul 2022 23:16:26 +0100	[thread overview]
Message-ID: <97c24824-d487-e377-3ef6-287bc5e0c0d6@sifive.com> (raw)
In-Reply-To: <YtlG6hdTJPIDBk9Y@matsya>

On 21/07/2022 13:30, Vinod Koul wrote:
> On 08-07-22, 18:01, Ben Dooks wrote:
>> On channel error, dump the channel register state before
>> the channel's LLI entries to see what the controller was
>> actually doing when the error happend.
>>
>> Signed-off-by: Ben Dooks <ben.dooks@sifive.com>
>> ---
>>   .../dma/dw-axi-dmac/dw-axi-dmac-platform.c    | 28 +++++++++++++++++++
>>   1 file changed, 28 insertions(+)
>>
>> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
>> index e9c9bcb1f5c2..75c537153e92 100644
>> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
>> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
>> @@ -79,6 +79,20 @@ axi_chan_iowrite64(struct axi_dma_chan *chan, u32 reg, u64 val)
>>   	iowrite32(upper_32_bits(val), chan->chan_regs + reg + 4);
>>   }
>>   
>> +static inline u64
>> +axi_chan_ioread64(struct axi_dma_chan *chan, u32 reg)
>> +{
>> +	u32 high, low;
>> +	u64 result;
>> +
>> +	low = ioread32(chan->chan_regs + reg);
>> +	high = ioread32(chan->chan_regs + reg + 4);
>> +
>> +	result = low;
>> +	result |= (u64)high << 32;
>> +	return result;
>> +}
> 
> Better to use helpers like lo_hi_readq()?

Will go check on those, thanks.

  reply	other threads:[~2022-07-21 22:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 17:01 dw-axi-dmac updates (debug, minor bugfixes) Ben Dooks
2022-07-08 17:01 ` [PATCH 1/3] dmaengine: dw-axi-dmac: dump channel registers on error Ben Dooks
2022-07-21 12:30   ` Vinod Koul
2022-07-21 22:16     ` Ben Dooks [this message]
2022-07-08 17:01 ` [PATCH 2/3] dmaengine: dw-axi-dmac: do not print NULL LLI during error Ben Dooks
2022-07-21 12:33   ` Vinod Koul
2022-07-08 17:01 ` [PATCH 3/3] dmaengine: dw-axi-dmac: ignore interrupt if no descriptor Ben Dooks
2022-07-21 12:33   ` 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=97c24824-d487-e377-3ef6-287bc5e0c0d6@sifive.com \
    --to=ben.dooks@sifive.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jude.onyenegecha@sifive.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudip.mukherjee@sifive.com \
    --cc=vkoul@kernel.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