diff options
author | Emilio López <emilio@elopez.com.ar> | 2013-07-22 21:01:05 -0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-08-26 04:48:39 -0400 |
commit | 431807f0bff97bbfddc7a2497038369ed2b4e508 (patch) | |
tree | 13910720ae6cabe4a48f0b4afa0122bc1cd53ef0 | |
parent | 2371dd88b80fc847a451d5eff018e165501f560a (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>
Cc: Mike Turquette <mturquette@linaro.org>
-rw-r--r-- | drivers/clk/sunxi/clk-sunxi.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index 15804c25e038..12c8dc7fa394 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 | } |
72 | CLK_OF_DECLARE(sunxi_osc, "allwinner,sun4i-osc-clk", sunxi_osc_clk_setup); | ||
72 | 73 | ||
73 | 74 | ||
74 | 75 | ||
@@ -423,12 +424,6 @@ static void __init sunxi_gates_clk_setup(struct device_node *node, | |||
423 | of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); | 424 | of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); |
424 | } | 425 | } |
425 | 426 | ||
426 | /* Matches for of_clk_init */ | ||
427 | static const __initconst struct of_device_id clk_match[] = { | ||
428 | {.compatible = "allwinner,sun4i-osc-clk", .data = sunxi_osc_clk_setup,}, | ||
429 | {} | ||
430 | }; | ||
431 | |||
432 | /* Matches for factors clocks */ | 427 | /* Matches for factors clocks */ |
433 | static const __initconst struct of_device_id clk_factors_match[] = { | 428 | static const __initconst struct of_device_id clk_factors_match[] = { |
434 | {.compatible = "allwinner,sun4i-pll1-clk", .data = &pll1_data,}, | 429 | {.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 | |||
483 | 478 | ||
484 | void __init sunxi_init_clocks(void) | 479 | void __init sunxi_init_clocks(void) |
485 | { | 480 | { |
486 | /* Register all the simple sunxi clocks on DT */ | 481 | /* Register all the simple and basic clocks on DT */ |
487 | of_clk_init(clk_match); | 482 | of_clk_init(NULL); |
488 | 483 | ||
489 | /* Register factor clocks */ | 484 | /* Register factor clocks */ |
490 | of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup); | 485 | of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup); |