[U-Boot] [PATCH v4 2/5] omap: mmc: Avoid using libfdt with of-platdata

Adam Ford aford173 at gmail.com
Sun Nov 10 11:08:52 UTC 2019


On Sun, Nov 10, 2019 at 1:22 AM Peter Howard <pjh at northern-ridge.com.au> wrote:
>
> On Thu, 2019-11-07 at 15:05 -0500, Tom Rini wrote:
> > On Thu, Nov 07, 2019 at 08:53:09AM -0700, Simon Glass wrote:
> >
> > > At present this driver is enabled in SPL on omapl138_lcdk, which
> > > uses
> > > of-platdata. The driver needs to be ported to use of-platdata
> > > properly.
> > > For now, avoid a build error by returning an error.
> > >
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > >
> > > ---
> > >
> > > Changes in v4:
> > > - Add new patch for omap MMC build errors
> > >
> > > Changes in v3: None
> > >
> > >  drivers/mmc/davinci_mmc.c | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> > >
> > > diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
> > > index 0d63279db0..79a7f50d25 100644
> > > --- a/drivers/mmc/davinci_mmc.c
> > > +++ b/drivers/mmc/davinci_mmc.c
> > > @@ -507,6 +507,12 @@ static int davinci_mmc_probe(struct udevice
> > > *dev)
> > >             priv->version = data->version;
> > >     }
> > >
> > > +   /* FIXME: Cannot read from device tree with of-platdata */
> > > +   if (CONFIG_IS_ENABLED(OF_PLATDATA)) {
> > > +           printf("Please fix this driver to use of-platdata");
> > > +           return -ENOSYS;
> > > +   }
> > > +
> > >     priv->reg_base = (struct davinci_mmc_regs *)dev_read_addr(dev);
> > >     priv->input_clk = clk_get(DAVINCI_MMCSD_CLKID);
> >
> > Let me add the board maintainer here.
>
> Re-replying (and not from %&$! Outlook)  after having a look at the
> situation.
>
> >   Peter, are we even using MMC in SPL on the omapl138_lcdk?
>
> The OMAP L138 LCDK can boot from MMC - so the MMC driver is used inthe
> SPL. However, going back over the patches from this year, MMC usage was
> broken back in July - refer https://patchwork.ozlabs.org/patch/1138200/
>
> Bartosz is working on this but has hit problems.
>
> Given that MMC access in the SPL is effectively broken right now, I
> don't see that _this_ patch makes things any worse, so if this is the
> only problem with the series I'd let it go through.  Bartosz, Adam:
> Given you were discussing this at almost the same time Tom sent his
> email, do you have any problem with this patch being applied.  If we
> solve the overall problem with the davinci driver, adding the platdata
> is trivial.

I don't have an issue on the surface, but if we have a known
regression (ie, the converstion to DM in SPL) that breaks
functionality, I think it should be reverted until it's addressed.
I know the da850-0evm can boot using the device tree, but it doesn't
use OF_PLATDATA.  It also doesn't use MMC as a boot source, because it
doesn't have the ability to select the proper boot pin combination.  I
can also see that by not using OF_PLATDATA, the SPL code is too large
for the use on the LCDK.

When I look at the source for the lcdk, it looks like it has manual
driver info in the board file instead of using the auto-generated
stuff that should be produced as part of using OF_PLATDATA. I wonder
if the FIXME should be applied to more than just the MMC driver.

adam
>
> Peter
>
> > If so, I believe we need to add platdata ala
> > other platforms like board/ti/am335x/board.c for example.  Thanks!
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list