mmc: sdhci-msm: Boost controller core clock
authorIvan T. Ivanov <ivan.ivanov@linaro.org>
Mon, 6 Jul 2015 11:53:38 +0000 (14:53 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 17 Aug 2015 09:32:43 +0000 (11:32 +0200)
Ensure SDCC is working with maximum clock otherwise card
detection could be extremely slow, up to 7 seconds.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Reviewed-by: Georgi Djakov <georgi.djakov@linaro.org>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-msm.c

index 4a09f7608c66affcede7565ea7c75c41bb10f6ba..4bcee033fedaf520d95433f03e652f0d7a786924 100644 (file)
@@ -489,6 +489,11 @@ static int sdhci_msm_probe(struct platform_device *pdev)
                goto pclk_disable;
        }
 
+       /* Vote for maximum clock rate for maximum performance */
+       ret = clk_set_rate(msm_host->clk, INT_MAX);
+       if (ret)
+               dev_warn(&pdev->dev, "core clock boost failed\n");
+
        ret = clk_prepare_enable(msm_host->clk);
        if (ret)
                goto pclk_disable;