mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: John Watts <contact@jookia.org>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] imx6-mmdc: Work around ERR050070
Date: Tue, 24 Jan 2023 12:58:13 +0100	[thread overview]
Message-ID: <d4107732-a5e6-e4f9-797b-21a9fbb3b7e0@pengutronix.de> (raw)
In-Reply-To: <Y8/FeZWD4ce50TTx@novena-choice-citizen>

On 24.01.23 12:48, John Watts wrote:
> On Tue, Jan 24, 2023 at 09:27:42AM +0100, Ahmad Fatoum wrote:
>>> +static bool wlcalib_failed(void __iomem *ips)
>>> +{
>>> +	int i;
>>> +
>>> +	for (i = 0; i < 4; ++i) {
>>> +		if (readb(P0_IPS + MPWLHWERR + i) == 0)
>>
>> s/P0_OPS/ips/ ?
> 
> Oops, good catch! Will fix in V2.
> 
>>
>> Also does it need to be bytewise reads? If not, you could rewrite
>> as return readl(ips + MPWLHWERR) == 0;
> 
> The MPWHLHWERR register contains 4 bytes giving some status for each lane,
> that would only fail if all lanes fail which is different behaviour to
> the existing behaviour fails if any lanes fail at calibrating.

Yes. readl() would've only made sense if 0 was the success, not the
error indicator.

> 
>>
>>> +			return true;
>>
>> Write level calibration has failed when MPWLHWERR == 0 and succeeded
>> when there is some other value? That sounds odd.
> 
> It is odd, but that's what the data sheet says, the errata says and what
> and what seem. Maybe I should note it down?

Yes, a comment would be good.

> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2023-01-24 12:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 20:18 John Watts
2023-01-23 20:18 ` [PATCH 2/2] imx6-mmdc: Revert calibration configuration on failure John Watts
2023-01-24  8:29   ` Ahmad Fatoum
2023-01-24 12:01     ` John Watts
2023-01-24 12:07       ` Ahmad Fatoum
2023-01-24  8:27 ` [PATCH 1/2] imx6-mmdc: Work around ERR050070 Ahmad Fatoum
2023-01-24 11:48   ` John Watts
2023-01-24 11:58     ` Ahmad Fatoum [this message]
2023-01-24 17:41 ` [PATCH v2 " John Watts
2023-01-25 15:48   ` Sascha Hauer
2023-01-24 17:41 ` [PATCH v2 2/2] imx6-mmdc: Revert calibration configuration on failure John Watts

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=d4107732-a5e6-e4f9-797b-21a9fbb3b7e0@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=contact@jookia.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