summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorVipul Kumar Samar <vipulkumar.samar@st.com>2012-11-08 20:39:54 +0530
committerJeff Garzik <jgarzik@redhat.com>2012-11-15 23:40:20 -0500
commit9addf6afeef0f2c9a1fef880e2dbe633d15a89bd (patch)
tree308064de7d1ead295a88eba3215152a2d481813d /drivers/ata
parent60817a680b1bd3341b6909fab7d8a1fcc3a78369 (diff)
downloadlinux-9addf6afeef0f2c9a1fef880e2dbe633d15a89bd.tar.gz
linux-9addf6afeef0f2c9a1fef880e2dbe633d15a89bd.tar.bz2
linux-9addf6afeef0f2c9a1fef880e2dbe633d15a89bd.zip
pata_arasan: Initialize cf clock to 166MHz
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> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_arasan_cf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 26201ebef3ca..71111f214eab 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 :