aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2014-09-25 03:48:47 -0400
committerMike Turquette <mturquette@linaro.org>2014-09-25 18:47:45 -0400
commitcd248502927fa5b4a700433675c4ff4a2bbee14b (patch)
treec9f9224a70dbd9766940c26e94aa2b61c29a1497 /drivers/clk
parent89d83e14f44c37c46fc1880a0768da1a77b682c7 (diff)
clk: rockchip: add clock node in PD_VIDEO
This patch add the clock node in PD_VIDEO Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Doug Anderson <dianders@chromium.org> Tested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/rockchip/clk-rk3288.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
index 3dfc5e3a074c..35c3297d05ba 100644
--- a/drivers/clk/rockchip/clk-rk3288.c
+++ b/drivers/clk/rockchip/clk-rk3288.c
@@ -296,6 +296,20 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
296 COMPOSITE(0, "aclk_vdpu", mux_pll_src_cpll_gpll_usb480m_p, 0, 296 COMPOSITE(0, "aclk_vdpu", mux_pll_src_cpll_gpll_usb480m_p, 0,
297 RK3288_CLKSEL_CON(32), 14, 2, MFLAGS, 8, 5, DFLAGS, 297 RK3288_CLKSEL_CON(32), 14, 2, MFLAGS, 8, 5, DFLAGS,
298 RK3288_CLKGATE_CON(3), 11, GFLAGS), 298 RK3288_CLKGATE_CON(3), 11, GFLAGS),
299 /*
300 * We use aclk_vdpu by default GRF_SOC_CON0[7] setting in system,
301 * so we ignore the mux and make clocks nodes as following,
302 */
303 GATE(ACLK_VCODEC, "aclk_vcodec", "aclk_vdpu", 0,
304 RK3288_CLKGATE_CON(9), 0, GFLAGS),
305 /*
306 * We introduce a virtul node of hclk_vodec_pre_v to split one clock
307 * struct with a gate and a fix divider into two node in software.
308 */
309 GATE(0, "hclk_vcodec_pre_v", "aclk_vdpu", 0,
310 RK3288_CLKGATE_CON(3), 10, GFLAGS),
311 GATE(HCLK_VCODEC, "hclk_vcodec", "hclk_vcodec_pre", 0,
312 RK3288_CLKGATE_CON(9), 1, GFLAGS),
299 313
300 COMPOSITE(0, "aclk_vio0", mux_pll_src_cpll_gpll_usb480m_p, 0, 314 COMPOSITE(0, "aclk_vio0", mux_pll_src_cpll_gpll_usb480m_p, 0,
301 RK3288_CLKSEL_CON(31), 6, 2, MFLAGS, 0, 5, DFLAGS, 315 RK3288_CLKSEL_CON(31), 6, 2, MFLAGS, 0, 5, DFLAGS,
@@ -705,6 +719,12 @@ static void __init rk3288_clk_init(struct device_node *np)
705 pr_warn("%s: could not register clock usb480m: %ld\n", 719 pr_warn("%s: could not register clock usb480m: %ld\n",
706 __func__, PTR_ERR(clk)); 720 __func__, PTR_ERR(clk));
707 721
722 clk = clk_register_fixed_factor(NULL, "hclk_vcodec_pre",
723 "hclk_vcodec_pre_v", 0, 1, 4);
724 if (IS_ERR(clk))
725 pr_warn("%s: could not register clock hclk_vcodec_pre: %ld\n",
726 __func__, PTR_ERR(clk));
727
708 rockchip_clk_register_plls(rk3288_pll_clks, 728 rockchip_clk_register_plls(rk3288_pll_clks,
709 ARRAY_SIZE(rk3288_pll_clks), 729 ARRAY_SIZE(rk3288_pll_clks),
710 RK3288_GRF_SOC_STATUS); 730 RK3288_GRF_SOC_STATUS);