[PATCH 1/2] imx6-mmdc: Work around ERR050070
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Jan 24 03:58:13 PST 2023
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 |
More information about the barebox
mailing list