aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorEmilio López <emilio@elopez.com.ar>2013-08-04 05:47:29 -0400
committerMike Turquette <mturquette@linaro.org>2013-08-27 19:05:23 -0400
commit1ec5502ef20acc0af5c9172aac4652cd7cafd852 (patch)
treea9f220126371cba54d489f5f3cb21b9f4c8d68e6 /drivers/clk
parentf98d007d332b819b7777bf280a07fc3d2dfe2f7a (diff)
clk: sunxi: fix initialization of basic clocks
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> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/sunxi/clk-sunxi.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 323830465d13..3bbfca5850fd 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -69,6 +69,7 @@ static void __init sunxi_osc_clk_setup(struct device_node *node)
69 clk_register_clkdev(clk, clk_name, NULL); 69 clk_register_clkdev(clk, clk_name, NULL);
70 } 70 }
71} 71}
72CLK_OF_DECLARE(sunxi_osc, "allwinner,sun4i-osc-clk", sunxi_osc_clk_setup);
72 73
73 74
74 75
@@ -411,12 +412,6 @@ static void __init sunxi_gates_clk_setup(struct device_node *node,
411 of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); 412 of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
412} 413}
413 414
414/* Matches for of_clk_init */
415static const __initconst struct of_device_id clk_match[] = {
416 {.compatible = "allwinner,sun4i-osc-clk", .data = sunxi_osc_clk_setup,},
417 {}
418};
419
420/* Matches for factors clocks */ 415/* Matches for factors clocks */
421static const __initconst struct of_device_id clk_factors_match[] = { 416static const __initconst struct of_device_id clk_factors_match[] = {
422 {.compatible = "allwinner,sun4i-pll1-clk", .data = &pll1_data,}, 417 {.compatible = "allwinner,sun4i-pll1-clk", .data = &pll1_data,},
@@ -468,8 +463,8 @@ static void __init of_sunxi_table_clock_setup(const struct of_device_id *clk_mat
468 463
469void __init sunxi_init_clocks(void) 464void __init sunxi_init_clocks(void)
470{ 465{
471 /* Register all the simple sunxi clocks on DT */ 466 /* Register all the simple and basic clocks on DT */
472 of_clk_init(clk_match); 467 of_clk_init(NULL);
473 468
474 /* Register factor clocks */ 469 /* Register factor clocks */
475 of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup); 470 of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup);