From 13cb7ecffb6f686344aea13d4eb7ddc8b7033a02 Mon Sep 17 00:00:00 2001 From: "Bao D. Nguyen" Date: Wed, 6 May 2020 18:00:03 -0700 Subject: [PATCH] mmc: Add MMC clock scaling support for sdhci-msm layer Add the clock scaling support for SD card in the sdhci-msm layger. Change-Id: I17a279bea4ee589121785006e1887a6f39e3ce6a Signed-off-by: Bao D. Nguyen --- drivers/mmc/host/Kconfig | 8 ++++++++ drivers/mmc/host/sdhci-msm.c | 3 +++ 2 files changed, 11 insertions(+) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 49ea02c467bf..028d92f11a54 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -1019,3 +1019,11 @@ config MMC_SDHCI_AM654 If you have a controller with this interface, say Y or M here. If unsure, say N. + +config SDC_QTI + tristate "Enable QTI specific code in MMC upstream driver" + depends on QGKI && MMC_SDHCI_MSM + default n + help + This configuration flag allows adding QTI code in + MMC upstream driver. diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index e8ccfe414ab7..8f29d6d15a94 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -3217,6 +3217,9 @@ static int sdhci_msm_probe(struct platform_device *pdev) msm_host->pltfm_init_done = true; +#if defined(CONFIG_SDC_QTI) + msm_host->mmc->caps2 |= MMC_CAP2_CLK_SCALE; +#endif pm_runtime_get_noresume(&pdev->dev); pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev);