clk: tm2: fix tm2 64bit hangup [1/1]
authorJian Hu <jian.hu@amlogic.com>
Mon, 20 May 2019 06:46:03 +0000 (14:46 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Mon, 20 May 2019 10:49:50 +0000 (03:49 -0700)
PD#SWPL-8546

Problem:
it hangup in tm2 64bit

Solution:
call clk_set_parent to set
tl1_dsu_fixed_source_sel1 to 1G

Verify:
verified on tm2 ab311

Change-Id: I2e75c76aab3ba2510050592ea5f6c3069cfa9f4d
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
drivers/amlogic/clk/tl1/tl1.c

index 61eaf5f..c416293 100644 (file)
@@ -1093,11 +1093,14 @@ static void __init tl1_clkc_init(struct device_node *np)
        ret = clk_notifier_register(parent_clk, &tl1_cpu_clk.clk_nb);
 
        /* set tl1_dsu_fixed_sel1 to 1G (default 24M) */
-       ret = clk_set_rate(tl1_dsu_fixed_sel1.hw.clk, 1000000000);
+       ret = clk_set_parent(tl1_dsu_fixed_source_sel1.hw.clk,
+               tl1_fclk_div2.hw.clk);
        if (ret < 0) {
-               pr_err("set tl1_dsu_fixed_sel1 to 1G failed\n");
+               pr_err("%s: failed to set parent for tl1_dsu_fixed_source_sel1\n",
+               __func__);
                return;
        }
+
        /*
         * when change tl1_dsu_fixed_sel0, switch to
         * tl1_dsu_fixed_sel1 to avoid crash