[PATCH v2 13/18] mmc: Add more debugging for SPL

Simon Glass sjg at chromium.org
Sat Dec 7 18:25:45 CET 2024


Hi Tom,

On Thu, 3 Oct 2024 at 15:57, Tom Rini <trini at konsulko.com> wrote:
>
> On Fri, Sep 20, 2024 at 09:24:37AM +0200, Simon Glass wrote:
>
> > When MMC booting fails it is sometimes hard to figure out what went
> > wrong as there is no error code. It isn't even clear which MMC device
> > was chosen, since SPL can have its own numbering.
> >
> > Add some debugging to help with this.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> [snip]
> > @@ -76,6 +77,12 @@ static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev)
> >       int ret;
> >
> >  #if CONFIG_IS_ENABLED(DM_MMC)
> > +     struct udevice *dev;
> > +     struct uclass *uc;
> > +
> > +     log_debug("Selecting MMC dev %d; seqs:\n", mmc_dev);
> > +     uclass_id_foreach_dev(UCLASS_MMC, dev, uc)
> > +             log_debug("%d: %s\n", dev_seq(dev), dev->name);
> >       ret = mmc_init_device(mmc_dev);
> >  #else
> >       ret = mmc_initialize(NULL);
>
> For the record, this change, even with debugging not enabled (and LOG
> not enabled) is not size change free and does not get optimized away by
> the compiler. I'm not sure off-hand if there's a clever way to fix that,
> so I'm not blocking the series on this.

Yes, I can depend on _DEBUG so I'll add that patch to the vbe series.

Regards,
Simon


More information about the U-Boot mailing list