diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2012-11-28 15:55:30 -0200 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-04-09 22:52:52 +0800 |
commit | c20736f1aba75bd4251e96ef3f487beebbaf41cc (patch) | |
tree | eb30f0b230a4fdbd33a9626ba256a7a11a9ca4d0 /arch/arm/mach-imx/clk-imx27.c | |
parent | 52c9aa946154a355f03e66f67545597f7cdf5b5a (diff) | |
download | op-kernel-dev-c20736f1aba75bd4251e96ef3f487beebbaf41cc.zip op-kernel-dev-c20736f1aba75bd4251e96ef3f487beebbaf41cc.tar.gz |
ARM: mx27: Replace clk_register_clkdev with clock DT lookup
Similarly as it was done for mx6q, use a DT lookup in order to make maintainance
task for the clock devices easier.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/clk-imx27.c')
-rw-r--r-- | arch/arm/mach-imx/clk-imx27.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 8e3b657..faf629e 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c @@ -86,10 +86,12 @@ enum mx27_clks { }; static struct clk *clk[clk_max]; +static struct clk_onecell_data clk_data; int __init mx27_clocks_init(unsigned long fref) { int i; + struct device_node *np; clk[dummy] = imx_clk_fixed("dummy", 0); clk[ckih] = imx_clk_fixed("ckih", fref); @@ -198,6 +200,13 @@ int __init mx27_clocks_init(unsigned long fref) pr_err("i.MX27 clk %d: register failed with %ld\n", i, PTR_ERR(clk[i])); + np = of_find_compatible_node(NULL, NULL, "fsl,imx27-ccm"); + if (np) { + clk_data.clks = clk; + clk_data.clk_num = ARRAY_SIZE(clk); + of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); + } + clk_register_clkdev(clk[uart1_ipg_gate], "ipg", "imx21-uart.0"); clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.0"); clk_register_clkdev(clk[uart2_ipg_gate], "ipg", "imx21-uart.1"); |