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. > > > + 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?