clk: imx: Add a virtual arm clk on i.mx7d
authorBai Ping <b51503@freescale.com>
Tue, 24 Nov 2015 10:25:14 +0000 (18:25 +0800)
committerShawn Guo <shawnguo@kernel.org>
Wed, 2 Dec 2015 05:34:01 +0000 (13:34 +0800)
Add a virtual arm clk to abstract the actual steps
when changing the ARM core frequency.So we can using
the 'cpufreq-dt' driver on i.MX7D/Solo.

Signed-off-by: Bai Ping <b51503@freescale.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/clk/imx/clk-imx7d.c
include/dt-bindings/clock/imx7d-clock.h

index 448ef321948b1c1d5e0b4c614b9875728b133d58..581b428d3133bbf0028016140a52eaf1fde53a03 100644 (file)
@@ -833,6 +833,12 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
 
        clks[IMX7D_GPT_3M_CLK] = imx_clk_fixed_factor("gpt_3m", "osc", 1, 8);
 
+       clks[IMX7D_CLK_ARM] = imx_clk_cpu("arm", "arm_a7_root_clk",
+                                        clks[IMX7D_ARM_A7_ROOT_CLK],
+                                        clks[IMX7D_ARM_A7_ROOT_SRC],
+                                        clks[IMX7D_PLL_ARM_MAIN_CLK],
+                                        clks[IMX7D_PLL_SYS_MAIN_CLK]);
+
        for (i = 0; i < ARRAY_SIZE(clks); i++)
                if (IS_ERR(clks[i]))
                        pr_err("i.MX7D clk %d: register failed with %ld\n",
index a4a7a9ce345737fc39e0f55f5b850b34dc828ce1..edca8985c50e82e3d1d495d773194ef045f6f036 100644 (file)
 #define IMX7D_SEMA4_HS_ROOT_CLK                434
 #define IMX7D_PLL_DRAM_TEST_DIV                435
 #define IMX7D_ADC_ROOT_CLK             436
-#define IMX7D_CLK_END                  437
+#define IMX7D_CLK_ARM                  437
+#define IMX7D_CLK_END                  438
 #endif /* __DT_BINDINGS_CLOCK_IMX7D_H */