浏览代码

mmc: sdhci-spear: Initialize sdhci clk to 50 MHz

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>
Vipul Kumar Samar 13 年之前
父节点
当前提交
257f9df123
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      drivers/mmc/host/sdhci-spear.c

+ 5 - 0
drivers/mmc/host/sdhci-spear.c

@@ -146,6 +146,11 @@ static int __devinit sdhci_probe(struct platform_device *pdev)
 		goto put_clk;
 		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) {
 	if (np) {
 		sdhci->data = sdhci_probe_config_dt(pdev);
 		sdhci->data = sdhci_probe_config_dt(pdev);
 		if (IS_ERR(sdhci->data)) {
 		if (IS_ERR(sdhci->data)) {