summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2017-05-12 11:48:20 (GMT)
committerStefano Babic <sbabic@denx.de>2017-05-31 08:21:24 (GMT)
commit2e87c440f610ca99d5103c39b370e5b5d2481720 (patch)
tree0649c34ed446c7746ad7bd5de7db658972094413 /drivers/mmc
parentfcdb5319ceae7c55450053defc031749d6a7da57 (diff)
downloadu-boot-fsl-qoriq-2e87c440f610ca99d5103c39b370e5b5d2481720.tar.xz
mmc: fsl_esdhc: Move non DM_MMC code in #ifndef CONFIG_DM_MMC
Don't build non DM_MMC code when DM_MMC defined so move them into #ifndef CONFIG_DM_MMC Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/fsl_esdhc.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index ca72627..6f08a2d 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -724,20 +724,6 @@ static const struct mmc_ops esdhc_ops = {
.getcd = esdhc_getcd,
};
-static int fsl_esdhc_cfg_to_priv(struct fsl_esdhc_cfg *cfg,
- struct fsl_esdhc_priv *priv)
-{
- if (!cfg || !priv)
- return -EINVAL;
-
- priv->esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);
- priv->bus_width = cfg->max_bus_width;
- priv->sdhc_clk = cfg->sdhc_clk;
- priv->wp_enable = cfg->wp_enable;
-
- return 0;
-};
-
static int fsl_esdhc_init(struct fsl_esdhc_priv *priv)
{
struct fsl_esdhc *regs;
@@ -834,6 +820,21 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv)
return 0;
}
+#ifndef CONFIG_DM_MMC
+static int fsl_esdhc_cfg_to_priv(struct fsl_esdhc_cfg *cfg,
+ struct fsl_esdhc_priv *priv)
+{
+ if (!cfg || !priv)
+ return -EINVAL;
+
+ priv->esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);
+ priv->bus_width = cfg->max_bus_width;
+ priv->sdhc_clk = cfg->sdhc_clk;
+ priv->wp_enable = cfg->wp_enable;
+
+ return 0;
+};
+
int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
{
struct fsl_esdhc_priv *priv;
@@ -872,6 +873,7 @@ int fsl_esdhc_mmc_init(bd_t *bis)
cfg->sdhc_clk = gd->arch.sdhc_clk;
return fsl_esdhc_initialize(bis, cfg);
}
+#endif
#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT
void mmc_adapter_card_type_ident(void)