pata_arasan: Initialize cf clock to 166MHz
authorVipul Kumar Samar <vipulkumar.samar@st.com>
Thu, 8 Nov 2012 15:09:54 +0000 (20:39 +0530)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 16 Nov 2012 04:40:20 +0000 (23:40 -0500)
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>
drivers/ata/pata_arasan_cf.c

index 26201ebef3ca652a16c12c6719eae2127ed212ad..71111f214eabb5b099de8cdec5a79b3e0571db56 100644 (file)
@@ -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 :