[U-Boot] [PATCH v1 04/10] mmc: compile out more code if support for UHS and HS200 is not enabled

Jean-Jacques Hiblot jjhiblot at ti.com
Thu Dec 21 11:53:50 UTC 2017


Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
---

 drivers/mmc/mmc.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 7a92718..d006893 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -796,9 +796,11 @@ static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode)
 	case MMC_DDR_52:
 		speed_bits = EXT_CSD_TIMING_HS;
 		break;
+#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
 	case MMC_HS_200:
 		speed_bits = EXT_CSD_TIMING_HS200;
 		break;
+#endif
 	case MMC_LEGACY:
 		speed_bits = EXT_CSD_TIMING_LEGACY;
 		break;
@@ -1291,10 +1293,15 @@ static int sd_set_card_speed(struct mmc *mmc, enum bus_mode mode)
 
 	switch (mode) {
 	case SD_LEGACY:
-	case UHS_SDR12:
 		speed = UHS_SDR12_BUS_SPEED;
 		break;
 	case SD_HS:
+		speed = HIGH_SPEED_BUS_SPEED;
+		break;
+#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
+	case UHS_SDR12:
+		speed = UHS_SDR12_BUS_SPEED;
+		break;
 	case UHS_SDR25:
 		speed = UHS_SDR25_BUS_SPEED;
 		break;
@@ -1307,6 +1314,7 @@ static int sd_set_card_speed(struct mmc *mmc, enum bus_mode mode)
 	case UHS_SDR104:
 		speed = UHS_SDR104_BUS_SPEED;
 		break;
+#endif
 	default:
 		return -EINVAL;
 	}
-- 
1.9.1



More information about the U-Boot mailing list