diff options
author | Pawel Szyszuk <pawel.szyszuk@stericsson.com> | 2011-10-03 10:00:43 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@linaro.org> | 2012-03-19 09:02:54 +0100 |
commit | 1074569ca0ecba27c54abe19d6393d8457b26245 (patch) | |
tree | 092a3ec587d3e519fc2aaec13e9ec9c674b0d58d /drivers | |
parent | 2bd75aa02cd1dda380eeb7b2ae6a1884574e377b (diff) |
ARM: U9500: HSI core clocks initialization
ST-Ericsson Linux next: NA
ST-Ericsson ID: 343481
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ic59f08e1bb5d858344d95b5d34ae8a5d85d9aa1d
Signed-off-by: Pawel Szyszuk <pawel.szyszuk@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32518
Reviewed-by: Andrew LYNN <andrew.lynn@stericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hsi/controllers/ste_hsi.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/hsi/controllers/ste_hsi.c b/drivers/hsi/controllers/ste_hsi.c index 07b39bb2868..a2cbb2108f7 100644 --- a/drivers/hsi/controllers/ste_hsi.c +++ b/drivers/hsi/controllers/ste_hsi.c @@ -1514,6 +1514,7 @@ static int __init ste_hsi_add_controller(struct hsi_controller *hsi, char overrun_name[] = "hsi_rx_overrun_chxxx"; unsigned char i; int err; + unsigned long rate; ste_hsi = kzalloc(sizeof(struct ste_hsi_controller), GFP_KERNEL); if (!ste_hsi) { @@ -1586,6 +1587,22 @@ static int __init ste_hsi_add_controller(struct hsi_controller *hsi, goto err_clk_free; } + /* Set HSITXCLK rate to 100 MHz */ + rate = clk_round_rate(ste_hsi->tx_clk, 100000000); + err = clk_set_rate(ste_hsi->tx_clk, rate); + if (unlikely(err)) { + dev_err(&hsi->device, "Couldn't set HSIT clock rate\n"); + goto err_clk_free; + } + + /* Set HSIRXCLK rate to 200 MHz */ + rate = clk_round_rate(ste_hsi->rx_clk, 200000000); + err = clk_set_rate(ste_hsi->rx_clk, rate); + if (unlikely(err)) { + dev_err(&hsi->device, "Couldn't set HSIR clock rate\n"); + goto err_clk_free; + } + err = ste_hsi_clock_enable(hsi); if (unlikely(err)) goto err_clk_free; |