From: Vipul Kumar Samar <vipulkumar.sa...@st.com>

SPEAr sdhci driver expects the clock to be set to 50 MHz for proper functioning.
This patch sets clk to 50 MHz in probe.

Signed-off-by: Vipul Kumar Samar <vipulkumar.sa...@st.com>
Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org>
---
 drivers/mmc/host/sdhci-spear.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 6be89c0..fea8bf9 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -146,6 +146,11 @@ static int __devinit sdhci_probe(struct platform_device 
*pdev)
                goto put_clk;
        }
 
+       ret = clk_set_rate(sdhci->clk, 50000000);
+       if (ret)
+               dev_dbg(&pdev->dev, "Error setting desired clk, clk=%lu\n",
+                               clk_get_rate(sdhci->clk));
+
        if (np) {
                sdhci->data = sdhci_probe_config_dt(pdev);
                if (IS_ERR(sdhci->data)) {
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to