From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sat, 22 Dec 2018 13:51:42 -0700 Subject: [U-Boot] [PATCH] Add support for initializing MMC In-Reply-To: <1545414646.9789.4.camel@intel.com> References: <1544770433-7916-1-git-send-email-tien.fong.chee@intel.com> <1545380723.21117.0.camel@intel.com> <1545414646.9789.4.camel@intel.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tien, On Fri, 21 Dec 2018 at 10:50, Chee, Tien Fong 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 > om> wrote: > > > > > > > > > On Fri, 2018-12-14 at 14:53 +0800, tien.fong.chee at intel.com wrote: > > > > > > > > From: Tien Fong Chee > > > > > > > > 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 > > > > --- > > > > 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