diff options
author | Pawel Szyszuk <pawel.szyszuk@stericsson.com> | 2011-10-03 10:00:43 +0100 |
---|---|---|
committer | Mathieu J. Poirier <mathieu.poirier@linaro.org> | 2011-11-10 11:12:22 -0700 |
commit | cee630945352e8021b3cd87ee0f2971745c4c5ae (patch) | |
tree | b9772130b0b640949784651441c6e22f1c63cacb | |
parent | a241301f8eeb7c4663970bc59e4869ef9044d2fc (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>
-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; |