[U-Boot] [PATCH] Add support for initializing MMC

Simon Glass sjg at chromium.org
Sat Dec 22 20:51:42 UTC 2018


Hi Tien,

On Fri, 21 Dec 2018 at 10:50, Chee, Tien Fong <tien.fong.chee at intel.com> wrote:
>
> On Fri, 2018-12-21 at 10:16 -0700, Simon Glass wrote:
> > Hi,
> >
> > On Fri, 21 Dec 2018 at 01:25, Chee, Tien Fong <tien.fong.chee at intel.c
> > om> wrote:
> > >
> > >
> > > On Fri, 2018-12-14 at 14:53 +0800, tien.fong.chee at intel.com wrote:
> > > >
> > > > From: Tien Fong Chee <tien.fong.chee at intel.com>
> > > >
> > > > Firmware loader would encounter problem if the MMC is accessed
> > > > before
> > > > initializing it. This patch would adding the support of
> > > > initializing
> > > > MMC before the MMC is accessed by firmware loader.
> > > >
> > > > Signed-off-by: Tien Fong Chee <tien.fong.chee at intel.com>
> > > > ---
> > > >  drivers/misc/fs_loader.c |   31 +++++++++++++++++++++++++++++++
> > > >  1 files changed, 31 insertions(+), 0 deletions(-)
> > > >
> > > Any comment for this patch?
> > This should not be needed with CONFIG_DM_MMC enabled as it should be
> > enough to probe the mmc device. Is that right?
> No, CONFIG_DM_MMC is required, otherwise compiler would tell you error.
> This whole mechanism is always developed in DM context.
> What's your concern? You want me to add CONFIG_DM_MMC or replace with
> CONFIG_MMC? or You want to improve the document?

Well, mmc_blk_probe() calls mmc_init() on the device. So instead of
the code you have, would it be possible to probe the blk device? You
can use device_find_first_child() for that. Perhaps write a function
in blk.h which probes the first block device for a parent?

Regards,
Simon


More information about the U-Boot mailing list