mmc: sdhci-spear: Initialize sdhci clk to 50 MHz
authorVipul Kumar Samar <vipulkumar.samar@st.com>
Thu, 8 Nov 2012 15:09:09 +0000 (20:39 +0530)
committerChris Ball <cjb@laptop.org>
Thu, 6 Dec 2012 18:55:02 +0000 (13:55 -0500)
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.samar@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-spear.c

index 6be89c032debe32f16ad978730b70695a2512aab..fea8bf92efabcd57e2f059bc766cce97eff50b8f 100644 (file)
@@ -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)) {