linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: pata_arasan: Initialize cf clock to 166MHz
@ 2012-11-08 15:09 Viresh Kumar
  2012-11-16  4:40 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Viresh Kumar @ 2012-11-08 15:09 UTC (permalink / raw)
  To: jgarzik
  Cc: linux-ide, linux-kernel, spear-devel, Vipul Kumar Samar,
	Viresh Kumar

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

PATA arasan driver expects the clock to be set to 166 MHz for proper functioning.
This patch sets clk to 166 MHz in probe.

Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/ata/pata_arasan_cf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 26201eb..71111f2 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -317,6 +317,12 @@ static int cf_init(struct arasan_cf_dev *acdev)
 		return ret;
 	}
 
+	ret = clk_set_rate(acdev->clk, 166000000);
+	if (ret) {
+		dev_warn(acdev->host->dev, "clock set rate failed");
+		return ret;
+	}
+
 	spin_lock_irqsave(&acdev->host->lock, flags);
 	/* configure CF interface clock */
 	writel((pdata->cf_if_clk <= CF_IF_CLK_200M) ? pdata->cf_if_clk :
-- 
1.7.12.rc2.18.g61b472e


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

* Re: [PATCH] ata: pata_arasan: Initialize cf clock to 166MHz
  2012-11-08 15:09 [PATCH] ata: pata_arasan: Initialize cf clock to 166MHz Viresh Kumar
@ 2012-11-16  4:40 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2012-11-16  4:40 UTC (permalink / raw)
  To: Viresh Kumar; +Cc: linux-ide, linux-kernel, spear-devel, Vipul Kumar Samar

On 11/08/2012 10:09 AM, Viresh Kumar wrote:
> From: Vipul Kumar Samar <vipulkumar.samar@st.com>
>
> PATA arasan driver expects the clock to be set to 166 MHz for proper functioning.
> This patch sets clk to 166 MHz in probe.
>
> Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>   drivers/ata/pata_arasan_cf.c | 6 ++++++
>   1 file changed, 6 insertions(+)

applied




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

end of thread, other threads:[~2012-11-16  4:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 15:09 [PATCH] ata: pata_arasan: Initialize cf clock to 166MHz Viresh Kumar
2012-11-16  4:40 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).