aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Szyszuk <pawel.szyszuk@stericsson.com>2011-10-03 10:00:43 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2011-12-06 11:01:13 +0100
commite4bd2486e3ea8a75e6be4a4930ba39f2c1d78f3e (patch)
tree0e20a656eb6afb0388b4aab22b51e3a9ab686c44
parentfc94a273c88c8abc60cc38c8c1e464024bfa0236 (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.c17
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;