mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Sascha Hauer" <s.hauer@pengutronix.de>
To: "Ahmad Fatoum" <a.fatoum@pengutronix.de>
Cc: "Andrei Lalaev" <andrey.lalaev@gmail.com>, barebox@lists.infradead.org
Subject: Re: iMX ddrphy_utils difference with U-boot
Date: Mon, 15 Jun 2026 08:49:27 +0000	[thread overview]
Message-ID: <E1wZ30Z-00000006Gk9-35a3@pty.whiteo.stw.pengutronix.de> (raw)
In-Reply-To: <7d47871b-989a-4ad0-bfb1-4d449fd13ceb@pengutronix.de>

On 2026-06-08 19:26, Ahmad Fatoum wrote:
> Hello Andrei,
> 
> On 6/8/26 16:24, Andrei Lalaev wrote:
> > Hi,
> > 
> > I am moving an iMX8MP module from vendor U-Boot 2024.04 to Barebox 2025.02
> 
> Sidenote: You'll probably want to use one of the still supported
> v2026.04 or v2026.06 releases.
> 
> > and found a strange difference in the DDR training code:
> > 
> >   vim drivers/ddr/imx/ddrphy_utils.c +94
> > 
> > And the corresponding line in U-Boot:
> > 
> >   vim drivers/ddr/imx/phy/ddrphy_utils.c +101
> > 
> > Is there any chance that somebody knows/remembers why "return -1" was replaced with "hang()"?
> 
> I can't speak for Sascha, but having looked at the code, I see no reason
> why not to propagate the error.
> 
> > I couldn't find any explanation in the commits/mailing lists.
> 
> My guess is that it wasn't anticipated that boards would handle
> the error gracefully to fall back to a different DDR init.

That's my guess as well. Note the callers of
imx8m_wait_ddrphy_training_complete() which is only a wrapper around
calling wait_ddrphy_training_complete() do not check the error code, so
when changing it back to return an error code we likely want to add
error checking where missing.

Sascha

-- 
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 |



  parent reply	other threads:[~2026-06-15  8:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 14:24 Andrei Lalaev
2026-06-08 17:26 ` Ahmad Fatoum
2026-06-08 18:15   ` Andrei Lalaev
2026-06-08 19:12     ` Ahmad Fatoum
2026-06-15  8:49   ` Sascha Hauer [this message]
2026-06-11 20:35 ` Ahmad Fatoum
2026-06-11 20:36   ` Ahmad Fatoum

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=E1wZ30Z-00000006Gk9-35a3@pty.whiteo.stw.pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=andrey.lalaev@gmail.com \
    --cc=barebox@lists.infradead.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