ARM: mxs: look up timrot clock from device tree
authorShawn Guo <shawn.guo@linaro.org>
Mon, 25 Mar 2013 14:57:14 +0000 (22:57 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Mon, 1 Apr 2013 08:30:02 +0000 (16:30 +0800)
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>
arch/arm/boot/dts/imx23.dtsi
arch/arm/boot/dts/imx28.dtsi
arch/arm/mach-mxs/timer.c
drivers/clk/mxs/clk-imx23.c
drivers/clk/mxs/clk-imx28.c

index 56afcf41aae0d6bb8373ae9ed419c65294460897..27ce8070e18769fb441ffc0dd332b2c1e215c29b 100644 (file)
                                compatible = "fsl,imx23-timrot", "fsl,timrot";
                                reg = <0x80068000 0x2000>;
                                interrupts = <28 29 30 31>;
+                               clocks = <&clks 28>;
                        };
 
                        auart0: serial@8006c000 {
index 7ba49662b9bcde0fae3e1651b7795f1bd05dd83e..c2f10d381f03bf93bfbbc876847f095fdb534bd8 100644 (file)
                                compatible = "fsl,imx28-timrot", "fsl,timrot";
                                reg = <0x80068000 0x2000>;
                                interrupts = <48 49 50 51>;
+                               clocks = <&clks 26>;
                        };
 
                        auart0: serial@8006a000 {
index fe2903d7939aeb767b2e624a5c1387a3571ff94c..f5142aa234a392a3c5231b92e4ae08bb8bccc53a 100644 (file)
@@ -247,7 +247,7 @@ static void __init mxs_timer_init(struct device_node *np)
        struct clk *timer_clk;
        int irq;
 
-       timer_clk = clk_get_sys("timrot", NULL);
+       timer_clk = of_clk_get(np, 0);
        if (IS_ERR(timer_clk)) {
                pr_err("%s: failed to get clk\n", __func__);
                return;
index 291cc44713f49f307f38ce633d34a5b9101f92d0..46ae6bebe445186707f95e64514a88e8318231a6 100644 (file)
@@ -159,8 +159,6 @@ int __init mx23_clocks_init(void)
                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++)
                clk_prepare_enable(clks[clks_init_on[i]]);
 
index d861bfd8c5378c45428829933a08ac42750336a7..fb30cd92b234e70cc60a819533986ad1dee0e529 100644 (file)
@@ -237,7 +237,6 @@ int __init mx28_clocks_init(void)
                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");
 
        for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)