diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-05-21 09:58:51 +0800 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-06-17 15:45:14 +0800 |
commit | 53bb71da1c5c14267089218923585840f76e2480 (patch) | |
tree | 872fa273049ea680d51bf21c5efb50833f0e9de5 /arch/arm/mach-imx/clk-imx6sl.c | |
parent | 12aad63ca466409a531e5b79abb59d8de33bcbaa (diff) |
ARM: imx6: use common of_clk_init() call to initialize clocks
Instead of explicitly calling clock initialization functions, we can
declare the functions with CLK_OF_DECLARE() and then call common
of_clk_init() to have them invoked properly.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/clk-imx6sl.c')
-rw-r--r-- | arch/arm/mach-imx/clk-imx6sl.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c index 76835a731db..a307ac22dff 100644 --- a/arch/arm/mach-imx/clk-imx6sl.c +++ b/arch/arm/mach-imx/clk-imx6sl.c @@ -66,15 +66,13 @@ static struct clk_div_table video_div_table[] = { static struct clk *clks[IMX6SL_CLK_CLK_END]; static struct clk_onecell_data clk_data; -int __init imx6sl_clocks_init(void) +static void __init imx6sl_clocks_init(struct device_node *ccm_node) { struct device_node *np; void __iomem *base; int irq; int i; - of_clk_init(NULL); - clks[IMX6SL_CLK_DUMMY] = imx_clk_fixed("dummy", 0); clks[IMX6SL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0); clks[IMX6SL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0); @@ -125,7 +123,7 @@ int __init imx6sl_clocks_init(void) clks[IMX6SL_CLK_PLL3_80M] = imx_clk_fixed_factor("pll3_80m", "pll3_usb_otg", 1, 6); clks[IMX6SL_CLK_PLL3_60M] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); - np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-ccm"); + np = ccm_node; base = of_iomap(np, 0); WARN_ON(!base); @@ -265,6 +263,5 @@ int __init imx6sl_clocks_init(void) WARN_ON(!base); irq = irq_of_parse_and_map(np, 0); mxc_timer_init(base, irq); - - return 0; } +CLK_OF_DECLARE(imx6sl, "fsl,imx6sl-ccm", imx6sl_clocks_init); |