public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@openedev.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/9] mmc: fsl_esdhc: Move non DM_MMC code in #ifndef CONFIG_DM_MMC
Date: Fri, 12 May 2017 17:18:20 +0530	[thread overview]
Message-ID: <1494589708-15276-2-git-send-email-jagan@openedev.com> (raw)
In-Reply-To: <1494589708-15276-1-git-send-email-jagan@openedev.com>

From: Jagan Teki <jagan@amarulasolutions.com>

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>
---
 drivers/mmc/fsl_esdhc.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index f3c6358..87c96ad 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -723,20 +723,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;
@@ -833,6 +819,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;
@@ -871,6 +872,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)
-- 
1.9.1

  reply	other threads:[~2017-05-12 11:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 11:48 [U-Boot] [PATCH 0/9] i.MX6: Engicam: Move common config code Jagan Teki
2017-05-12 11:48 ` Jagan Teki [this message]
2017-05-12 11:48 ` [U-Boot] [PATCH 2/9] engicam: Move SPL mmc configs under CONFIG_SPL_BUILD Jagan Teki
2017-05-12 11:48 ` [U-Boot] [PATCH 3/9] icorem6: Recover missing nand defconfig Jagan Teki
2017-05-12 11:48 ` [U-Boot] [PATCH 4/9] drivers: net: Kconfig: Add PHY_MICREL_KSZ9021 entry Jagan Teki
2017-05-12 11:48 ` [U-Boot] [PATCH 5/9] engicam: Move PHY configs to defconfig Jagan Teki
2017-05-12 11:48 ` [U-Boot] [PATCH 6/9] icorem6: Remove unused FEC configs Jagan Teki
2017-05-12 11:48 ` [U-Boot] [PATCH 7/9] engicam: Set console env on board_late_init Jagan Teki
2017-05-12 11:48 ` [U-Boot] [PATCH 8/9] engicam: Add fdt_addr env value based on cpu_type Jagan Teki
2017-05-12 11:48 ` [U-Boot] [PATCH 9/9] engicam: Generate single config file Jagan Teki
2017-05-22 10:35 ` [U-Boot] [PATCH 0/9] i.MX6: Engicam: Move common config code Jagan Teki
2017-05-31  8:48 ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494589708-15276-2-git-send-email-jagan@openedev.com \
    --to=jagan@openedev.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox