]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
clk: sunxi: fix initialization of basic clocks
authorEmilio López <emilio@elopez.com.ar>
Tue, 23 Jul 2013 01:01:05 +0000 (22:01 -0300)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 26 Aug 2013 08:48:39 +0000 (10:48 +0200)
With the recent move towards CLK_OF_DECLARE(...), the driver stopped
initializing osc32k, which is compatible "fixed-clock". This is because
we never called of_clk_init(NULL). Fix this by moving the only other
simple clock (osc24M) to use CLK_OF_DECLARE(...) and call of_clk_init(NULL)
to initialize both of them.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mike Turquette <mturquette@linaro.org>
drivers/clk/sunxi/clk-sunxi.c

index 15804c25e0388cb200a8392fa9ac14de25889350..12c8dc7fa394b17e0ac4259bc351fea6ed2ead8b 100644 (file)
@@ -69,6 +69,7 @@ static void __init sunxi_osc_clk_setup(struct device_node *node)
                clk_register_clkdev(clk, clk_name, NULL);
        }
 }
+CLK_OF_DECLARE(sunxi_osc, "allwinner,sun4i-osc-clk", sunxi_osc_clk_setup);
 
 
 
@@ -423,12 +424,6 @@ static void __init sunxi_gates_clk_setup(struct device_node *node,
        of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
 }
 
-/* Matches for of_clk_init */
-static const __initconst struct of_device_id clk_match[] = {
-       {.compatible = "allwinner,sun4i-osc-clk", .data = sunxi_osc_clk_setup,},
-       {}
-};
-
 /* Matches for factors clocks */
 static const __initconst struct of_device_id clk_factors_match[] = {
        {.compatible = "allwinner,sun4i-pll1-clk", .data = &pll1_data,},
@@ -483,8 +478,8 @@ static void __init of_sunxi_table_clock_setup(const struct of_device_id *clk_mat
 
 void __init sunxi_init_clocks(void)
 {
-       /* Register all the simple sunxi clocks on DT */
-       of_clk_init(clk_match);
+       /* Register all the simple and basic clocks on DT */
+       of_clk_init(NULL);
 
        /* Register factor clocks */
        of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup);