[PATCH 2/2] imx6-mmdc: Revert calibration configuration on failure
John Watts
contact at jookia.org
Tue Jan 24 04:01:47 PST 2023
On Tue, Jan 24, 2023 at 09:29:02AM +0100, Ahmad Fatoum wrote:
> > int mmdc_do_write_level_calibration(void)
> > {
> > + u32 ldectrl[4] = {0};
>
> Initial value never read back.
>
Remove the = {0}?
> > /* check for any errors on both PHYs */
> > - if (wlcalib_failed(P0_IPS) || wlcalib_failed(P1_IPS))
> > + if (wlcalib_failed(P0_IPS) || wlcalib_failed(P1_IPS)) {
> > + pr_debug("Calibration failed, rolling back calibration data\n");
>
> Still you only restore P0 calibration data, even if it succeeded,
> but P1 failed. Is this intended?
Not quite sure what you mean. I restore both P0 and P1 calibration data I
think?
If you're asking whether it is correct behaviour to REVERT all calibration
data, instead of for each channel, I'm not sure. It seems like the safest
thing to do to me since it's unclear why the calibration process has failed.
This is the behaviour U-Boot does and seems to work in the wild.
John.
More information about the barebox
mailing list