diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-05-20 10:39:19 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-06-17 03:45:14 -0400 |
commit | 12aad63ca466409a531e5b79abb59d8de33bcbaa (patch) | |
tree | c915d996c15f041a5c1a6c9929cbfc7dad50a5da | |
parent | fcc1c8a8b47fdd5d472ffece5a5e0092e936efae (diff) |
ARM: imx6q: call of_clk_init() to register fixed rate clocks
As the fixed rate clocks are defined in device tree, we can just call
of_clk_init() to register them.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 0bc3ea20cec7..80d350b814d7 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -276,21 +276,12 @@ int __init mx6q_clocks_init(void) | |||
276 | void __iomem *base; | 276 | void __iomem *base; |
277 | int i, irq; | 277 | int i, irq; |
278 | 278 | ||
279 | clk[dummy] = imx_clk_fixed("dummy", 0); | 279 | of_clk_init(NULL); |
280 | 280 | ||
281 | /* retrieve the freqency of fixed clocks from device tree */ | 281 | clk[dummy] = imx_clk_fixed("dummy", 0); |
282 | for_each_compatible_node(np, NULL, "fixed-clock") { | 282 | clk[ckil] = imx_obtain_fixed_clock("ckil", 0); |
283 | u32 rate; | 283 | clk[ckih] = imx_obtain_fixed_clock("ckih1", 0); |
284 | if (of_property_read_u32(np, "clock-frequency", &rate)) | 284 | clk[osc] = imx_obtain_fixed_clock("osc", 0); |
285 | continue; | ||
286 | |||
287 | if (of_device_is_compatible(np, "fsl,imx-ckil")) | ||
288 | clk[ckil] = imx_clk_fixed("ckil", rate); | ||
289 | else if (of_device_is_compatible(np, "fsl,imx-ckih1")) | ||
290 | clk[ckih] = imx_clk_fixed("ckih", rate); | ||
291 | else if (of_device_is_compatible(np, "fsl,imx-osc")) | ||
292 | clk[osc] = imx_clk_fixed("osc", rate); | ||
293 | } | ||
294 | 285 | ||
295 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); | 286 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); |
296 | base = of_iomap(np, 0); | 287 | base = of_iomap(np, 0); |