ARM: mxs: look up timrot clock from device tree
Change call clk_get_sys() to of_clk_get() to look up timrot clock from device tree, so that the clk_register_clkdev() call for timrot can be saved in clock driver. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
This commit is contained in:
parent
633ef4c7d1
commit
2efb950465
5 changed files with 3 additions and 4 deletions
|
@ -426,6 +426,7 @@
|
||||||
compatible = "fsl,imx23-timrot", "fsl,timrot";
|
compatible = "fsl,imx23-timrot", "fsl,timrot";
|
||||||
reg = <0x80068000 0x2000>;
|
reg = <0x80068000 0x2000>;
|
||||||
interrupts = <28 29 30 31>;
|
interrupts = <28 29 30 31>;
|
||||||
|
clocks = <&clks 28>;
|
||||||
};
|
};
|
||||||
|
|
||||||
auart0: serial@8006c000 {
|
auart0: serial@8006c000 {
|
||||||
|
|
|
@ -838,6 +838,7 @@
|
||||||
compatible = "fsl,imx28-timrot", "fsl,timrot";
|
compatible = "fsl,imx28-timrot", "fsl,timrot";
|
||||||
reg = <0x80068000 0x2000>;
|
reg = <0x80068000 0x2000>;
|
||||||
interrupts = <48 49 50 51>;
|
interrupts = <48 49 50 51>;
|
||||||
|
clocks = <&clks 26>;
|
||||||
};
|
};
|
||||||
|
|
||||||
auart0: serial@8006a000 {
|
auart0: serial@8006a000 {
|
||||||
|
|
|
@ -247,7 +247,7 @@ static void __init mxs_timer_init(struct device_node *np)
|
||||||
struct clk *timer_clk;
|
struct clk *timer_clk;
|
||||||
int irq;
|
int irq;
|
||||||
|
|
||||||
timer_clk = clk_get_sys("timrot", NULL);
|
timer_clk = of_clk_get(np, 0);
|
||||||
if (IS_ERR(timer_clk)) {
|
if (IS_ERR(timer_clk)) {
|
||||||
pr_err("%s: failed to get clk\n", __func__);
|
pr_err("%s: failed to get clk\n", __func__);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -159,8 +159,6 @@ int __init mx23_clocks_init(void)
|
||||||
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
|
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
clk_register_clkdev(clks[clk32k], NULL, "timrot");
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
|
for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
|
||||||
clk_prepare_enable(clks[clks_init_on[i]]);
|
clk_prepare_enable(clks[clks_init_on[i]]);
|
||||||
|
|
||||||
|
|
|
@ -237,7 +237,6 @@ int __init mx28_clocks_init(void)
|
||||||
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
|
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
clk_register_clkdev(clks[xbus], NULL, "timrot");
|
|
||||||
clk_register_clkdev(clks[enet_out], NULL, "enet_out");
|
clk_register_clkdev(clks[enet_out], NULL, "enet_out");
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
|
for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
|
||||||
|
|
Loading…
Reference in a new issue