提交 d6eb25e9 编写于 作者: S Simon Glass 提交者: Jaehoon Chung

dm: mmc: fsl_esdhc: Drop mmc_init() call from fsl_esdhc_init()

We want to use fsl_esdhc_init() with driver model. Move the mmc_init() out
of this function so that we can use it for our common init.
Signed-off-by: NSimon Glass <sjg@chromium.org>
上级 e88e1d9c
......@@ -765,7 +765,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv,
{
struct mmc_config *cfg;
struct fsl_esdhc *regs;
struct mmc *mmc;
u32 caps, voltage_caps;
int ret;
......@@ -856,12 +855,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv,
cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
mmc = mmc_create(cfg, priv);
if (mmc == NULL)
return -1;
priv->mmc = mmc;
return 0;
}
......@@ -885,6 +878,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
{
struct fsl_esdhc_plat *plat;
struct fsl_esdhc_priv *priv;
struct mmc *mmc;
int ret;
if (!cfg)
......@@ -915,6 +909,12 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
return ret;
}
mmc = mmc_create(&plat->cfg, priv);
if (!mmc)
return -EIO;
priv->mmc = mmc;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册