Skip to content

Commit

Permalink
pata_arasan: Initialize cf clock to 166MHz
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vipul Kumar Samar authored and Jeff Garzik committed Nov 16, 2012
1 parent 60817a6 commit 9addf6a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/ata/pata_arasan_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand Down

0 comments on commit 9addf6a

Please sign in to comment.