The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: sdhci-spear: Initialize sdhci clk to 50 MHz
@ 2012-11-08 15:09 Viresh Kumar
  2012-11-08 15:09 ` [PATCH 2/2] mmc: sdhci-spear: Don't call clk_{un}prepare() in suspend resume Viresh Kumar
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Viresh Kumar @ 2012-11-08 15:09 UTC (permalink / raw)
  To: cjb; +Cc: linux-mmc, linux-kernel, spear-devel, Vipul Kumar Samar,
	Viresh Kumar

From: Vipul Kumar Samar <vipulkumar.samar@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.samar@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-11-26 15:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 15:09 [PATCH 1/2] mmc: sdhci-spear: Initialize sdhci clk to 50 MHz Viresh Kumar
2012-11-08 15:09 ` [PATCH 2/2] mmc: sdhci-spear: Don't call clk_{un}prepare() in suspend resume Viresh Kumar
2012-11-26 15:45   ` Chris Ball
2012-11-20  6:41 ` [PATCH 1/2] mmc: sdhci-spear: Initialize sdhci clk to 50 MHz Viresh Kumar
2012-11-26 15:04   ` Viresh Kumar
2012-11-26 15:09 ` Chris Ball
2012-11-26 15:10   ` Viresh Kumar
2012-11-26 15:44 ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox