Dear AKASHI, On 12/10/21 3:49 PM, AKASHI Takahiro wrote: > Every time a mmc bus/port is scanned and a new device is detected, > we want to call device_probe() as it will give us a chance to run > additional post-processings for some purposes. > > In particular, support for creating partitions on a device will be added.
If add me and Peng as Cc when you sent the patches related with mmc, it's more helpful to review. Best Regards, Jaehoon Chung > > Signed-off-by: AKASHI Takahiro <takahiro.aka...@linaro.org> > --- > drivers/mmc/mmc-uclass.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c > index 3ee92d03ca23..6c907b65fde7 100644 > --- a/drivers/mmc/mmc-uclass.c > +++ b/drivers/mmc/mmc-uclass.c > @@ -418,6 +418,7 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const > struct mmc_config *cfg) > bdesc->part_type = cfg->part_type; > mmc->dev = dev; > mmc->user_speed_mode = MMC_MODES_END; > + > return 0; > } > > @@ -467,6 +468,18 @@ static int mmc_blk_probe(struct udevice *dev) > return ret; > } > > + ret = device_probe(dev); > + if (ret) { > + debug("Can't probe\n"); > + > + if (IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || > + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || > + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)) > + mmc_deinit(mmc); > + > + return ret; > + } > + > return 0; > } > >