Commit 12aad63c authored by Shawn Guo's avatar Shawn Guo

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: default avatarShawn Guo <shawn.guo@linaro.org>
parent fcc1c8a8
...@@ -276,21 +276,12 @@ int __init mx6q_clocks_init(void) ...@@ -276,21 +276,12 @@ int __init mx6q_clocks_init(void)
void __iomem *base; void __iomem *base;
int i, irq; int i, irq;
clk[dummy] = imx_clk_fixed("dummy", 0); of_clk_init(NULL);
/* retrieve the freqency of fixed clocks from device tree */ clk[dummy] = imx_clk_fixed("dummy", 0);
for_each_compatible_node(np, NULL, "fixed-clock") { clk[ckil] = imx_obtain_fixed_clock("ckil", 0);
u32 rate; clk[ckih] = imx_obtain_fixed_clock("ckih1", 0);
if (of_property_read_u32(np, "clock-frequency", &rate)) clk[osc] = imx_obtain_fixed_clock("osc", 0);
continue;
if (of_device_is_compatible(np, "fsl,imx-ckil"))
clk[ckil] = imx_clk_fixed("ckil", rate);
else if (of_device_is_compatible(np, "fsl,imx-ckih1"))
clk[ckih] = imx_clk_fixed("ckih", rate);
else if (of_device_is_compatible(np, "fsl,imx-osc"))
clk[osc] = imx_clk_fixed("osc", rate);
}
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
base = of_iomap(np, 0); base = of_iomap(np, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment