aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/clk/rockchip/clk-rk3188.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
index 1c5e6442dcfb..6a81bc9e54f0 100644
--- a/drivers/clk/rockchip/clk-rk3188.c
+++ b/drivers/clk/rockchip/clk-rk3188.c
@@ -652,12 +652,33 @@ CLK_OF_DECLARE(rk3066a_cru, "rockchip,rk3066a-cru", rk3066a_clk_init);
652 652
653static void __init rk3188a_clk_init(struct device_node *np) 653static void __init rk3188a_clk_init(struct device_node *np)
654{ 654{
655 struct clk *clk1, *clk2;
656 unsigned long rate;
657 int ret;
658
655 rk3188_common_clk_init(np); 659 rk3188_common_clk_init(np);
656 rockchip_clk_register_plls(rk3188_pll_clks, 660 rockchip_clk_register_plls(rk3188_pll_clks,
657 ARRAY_SIZE(rk3188_pll_clks), 661 ARRAY_SIZE(rk3188_pll_clks),
658 RK3188_GRF_SOC_STATUS); 662 RK3188_GRF_SOC_STATUS);
659 rockchip_clk_register_branches(rk3188_clk_branches, 663 rockchip_clk_register_branches(rk3188_clk_branches,
660 ARRAY_SIZE(rk3188_clk_branches)); 664 ARRAY_SIZE(rk3188_clk_branches));
665
666 /* reparent aclk_cpu_pre from apll */
667 clk1 = __clk_lookup("aclk_cpu_pre");
668 clk2 = __clk_lookup("gpll");
669 if (clk1 && clk2) {
670 rate = clk_get_rate(clk1);
671
672 ret = clk_set_parent(clk1, clk2);
673 if (ret < 0)
674 pr_warn("%s: could not reparent aclk_cpu_pre to gpll\n",
675 __func__);
676
677 clk_set_rate(clk1, rate);
678 } else {
679 pr_warn("%s: missing clocks to reparent aclk_cpu_pre to gpll\n",
680 __func__);
681 }
661} 682}
662CLK_OF_DECLARE(rk3188a_cru, "rockchip,rk3188a-cru", rk3188a_clk_init); 683CLK_OF_DECLARE(rk3188a_cru, "rockchip,rk3188a-cru", rk3188a_clk_init);
663 684