[U-Boot] [PATCH v2] mmc: uniphier-sd: Fix a compile error relevant to unused-function

Jaehoon Chung jh80.chung at samsung.com
Fri Feb 23 10:36:08 UTC 2018


During disabled MMC_HS200_SUPPORT, some functions don't use anywhere.

Signed-off-by: Jaehoon Chung <jh80.chung at samsung.com>
---
Chnagelog on V2
- Remove functions in uniphier-sd.h

 drivers/mmc/uniphier-sd-rcar.c | 4 ++++
 drivers/mmc/uniphier-sd.h      | 9 ---------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/mmc/uniphier-sd-rcar.c b/drivers/mmc/uniphier-sd-rcar.c
index 8baa2a9b46..894decd04d 100644
--- a/drivers/mmc/uniphier-sd-rcar.c
+++ b/drivers/mmc/uniphier-sd-rcar.c
@@ -80,6 +80,7 @@ static unsigned int uniphier_sd_init_tuning(struct uniphier_sd_priv *priv)
 		SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_MASK;
 }
 
+#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
 void rcar_gen3_sd_reset_tuning(struct uniphier_sd_priv *priv)
 {
 	u32 reg;
@@ -105,6 +106,7 @@ void rcar_gen3_sd_reset_tuning(struct uniphier_sd_priv *priv)
 	reg &= ~SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN;
 	uniphier_sd_writel(priv, reg, SH_MOBILE_SDHI_SCC_RVSCNTL);
 }
+#endif
 
 static void uniphier_sd_prepare_tuning(struct uniphier_sd_priv *priv,
 				       unsigned long tap)
@@ -223,6 +225,7 @@ static int uniphier_sd_select_tuning(struct uniphier_sd_priv *priv,
 	return 0;
 }
 
+#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
 int rcar_gen3_sd_execute_tuning(struct udevice *dev, uint opcode)
 {
 	struct uniphier_sd_priv *priv = dev_get_priv(dev);
@@ -286,3 +289,4 @@ out:
 
 	return ret;
 }
+#endif
diff --git a/drivers/mmc/uniphier-sd.h b/drivers/mmc/uniphier-sd.h
index 38d104296f..6192e5973c 100644
--- a/drivers/mmc/uniphier-sd.h
+++ b/drivers/mmc/uniphier-sd.h
@@ -141,15 +141,6 @@ void uniphier_sd_writel(struct uniphier_sd_priv *priv,
 #if CONFIG_IS_ENABLED(MMC_RENESAS_TUNING)
 void rcar_gen3_sd_reset_tuning(struct uniphier_sd_priv *priv);
 int rcar_gen3_sd_execute_tuning(struct udevice *dev, uint opcode);
-#else
-static void rcar_gen3_sd_reset_tuning(struct uniphier_sd_priv *priv)
-{
-}
-
-static int rcar_gen3_sd_execute_tuning(struct udevice *dev, uint opcode)
-{
-	return -EINVAL;
-}
 #endif
 
 #endif /* __MMC_UNIPHIER_SD_H__ */
-- 
2.16.1



More information about the U-Boot mailing list