[PATCH v5 1/4] omap: mmc: Avoid using libfdt with of-platdata

Simon Glass sjg at chromium.org
Mon May 4 15:14:15 CEST 2020


Hi Bart,

On Mon, 4 May 2020 at 01:10, Bartosz Golaszewski <brgl at bgdev.pl> wrote:
>
> pt., 1 maj 2020 o 20:32 Tom Rini <trini at konsulko.com> napisał(a):
> >
> > On Thu, Apr 30, 2020 at 01:43:30PM +0200, Bartosz Golaszewski wrote:
> > > wt., 28 kwi 2020 o 09:01 Faiz Abbas <faiz_abbas at ti.com> napisał(a):
> > > >
> > > > +Bartosz
> > > >
> > > > On 28/04/20 9:47 am, Lokesh Vutla wrote:
> > > > > +Faiz,
> > > > >
> > > > > On 28/04/20 12:29 AM, Tom Rini wrote:
> > > > >> On Mon, Apr 27, 2020 at 05:33:41AM +0000, Peng Fan wrote:
> > > > >>>> Subject: [PATCH v5 1/4] omap: mmc: Avoid using libfdt with of-platdata
> > > > >>>>
> > > > >>>> 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>
> > > > >
> > > > > Does this break the boot on omap l138?
> > > > >
> > > >
> > > > I don't have a board at hand to test this out. Bartosz can you help test this with
> > > > omapl138?
> > > >
> > > > Thanks,
> > > > Faiz
> > >
> > > Hi Faiz,
> > >
> > > I can confirm - this *does* break the mmc boot on da850-lcdk.
> >
> > So who is going to fix the driver to unblock Simon's series?
> >
>
> Is this something that will take a lot of work? What exactly needs
> doing? I'm not sure what "use of-platdata properly" means.

This board is defining CONFIG_SPL_OF_PLATDATA which means that device
tree is not available in SPL. Instead you need to use a C structure
created by dtoc. It basically involves creating that struct and
getting the data from that instead of calling the DT functions. I
expect it will take 2-4 hours to figure out, code and test.

See of-plat.rst for full documentation. There are quite a few examples for mmc:

grep PLATDATA drivers/mmc/*.c
drivers/mmc/ftsdc010_mci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/ftsdc010_mci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/ftsdc010_mci.c:#if !CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/ftsdc010_mci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/mxsmmc.c:#if CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/mxsmmc.c:#if CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/mxsmmc.c: debug("OF_PLATDATA: regs: 0x%p bw: %d clkid: %d
non_removable: %d\n",
drivers/mmc/mxsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) &&
!CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/mxsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) &&
!CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/omap_hsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) &&
!CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/omap_hsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) &&
!CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/omap_hsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) &&
!CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/rockchip_dw_mmc.c:#if CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/rockchip_dw_mmc.c:#if !CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/rockchip_dw_mmc.c:#if CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/rockchip_sdhci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/rockchip_sdhci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA)
drivers/mmc/rockchip_sdhci.c:#if !CONFIG_IS_ENABLED(OF_PLATDATA)

Regards,
Simon


More information about the U-Boot mailing list