From ef59869dfe1af7ddf0f43e4923f0bb4f5fc84641 Mon Sep 17 00:00:00 2001 From: "Bao D. Nguyen" Date: Fri, 22 May 2020 15:50:56 -0700 Subject: [PATCH] mmc: Enable SD card clock scaling The SD card clock scaling feature has a dependency on the MMC_SDHCI_MSM which is not defined. Remove this dependency so that the SD card clock scaling feature can be enabled. In addition, fix the SD cards 2.0 initialization caused by the incorrect clock settings. Change-Id: I3eaec3546f89b86643b1937764288b3f39578c0e Signed-off-by: Bao D. Nguyen --- drivers/mmc/core/Kconfig | 2 +- drivers/mmc/core/sd.c | 4 ++-- drivers/mmc/host/Kconfig | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/Kconfig b/drivers/mmc/core/Kconfig index 79b0084a97cd..ddd11f7cdf74 100644 --- a/drivers/mmc/core/Kconfig +++ b/drivers/mmc/core/Kconfig @@ -83,7 +83,7 @@ config MMC_TEST config SDC_QTI tristate "Enable QTI specific code in MMC upstream driver" - depends on QGKI && MMC_SDHCI_MSM + depends on QGKI default n help This configuration flag allows adding QTI code in diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 0ac29310524a..6ed916fff4aa 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -978,8 +978,8 @@ unsigned mmc_sd_get_max_clock(struct mmc_card *card) } #else if (mmc_card_hs(card)) { - if (max_dtr > card->sw_caps.uhs_max_dtr) - max_dtr = card->sw_caps.uhs_max_dtr; + if (max_dtr > card->sw_caps.hs_max_dtr) + max_dtr = card->sw_caps.hs_max_dtr; } else if (max_dtr > card->csd.max_dtr) { max_dtr = card->csd.max_dtr; } diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 028d92f11a54..13fc52516906 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -1022,7 +1022,7 @@ config MMC_SDHCI_AM654 config SDC_QTI tristate "Enable QTI specific code in MMC upstream driver" - depends on QGKI && MMC_SDHCI_MSM + depends on QGKI default n help This configuration flag allows adding QTI code in