diff options
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; |