diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2013-09-06 08:59:57 -0400 |
---|---|---|
committer | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2013-09-29 15:07:16 -0400 |
commit | be0804513a506de96925f9ed1aa8dc1facd4c180 (patch) | |
tree | 9037e4e75a525b14af2d8ee9ae713f2fd70f448e /drivers/clk/sunxi | |
parent | 8e7b25f1aa9accb8e4c80d0c019d769c979f2ec6 (diff) |
clk: sunxi: declare OF clock provider
Common clock framework allows to register clock providers to get called
on of_clk_init() by using CLK_OF_DECLARE. This converts sunxi clock
providers to make use of it and get rid of the mach specific clk init
call. As sunxi has a bunch of independent clk provider nodes, we hook
current clock init to board compatible to make it called once.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/sunxi')
-rw-r--r-- | drivers/clk/sunxi/clk-sunxi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index 34ee69f4d50c..9bbd03514540 100644 --- a/drivers/clk/sunxi/clk-sunxi.c +++ b/drivers/clk/sunxi/clk-sunxi.c | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #include <linux/clk-provider.h> | 17 | #include <linux/clk-provider.h> |
18 | #include <linux/clkdev.h> | 18 | #include <linux/clkdev.h> |
19 | #include <linux/clk/sunxi.h> | ||
20 | #include <linux/of.h> | 19 | #include <linux/of.h> |
21 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
22 | 21 | ||
@@ -617,11 +616,8 @@ static void __init of_sunxi_table_clock_setup(const struct of_device_id *clk_mat | |||
617 | } | 616 | } |
618 | } | 617 | } |
619 | 618 | ||
620 | void __init sunxi_init_clocks(void) | 619 | static void __init sunxi_init_clocks(struct device_node *np) |
621 | { | 620 | { |
622 | /* Register all the simple and basic clocks on DT */ | ||
623 | of_clk_init(NULL); | ||
624 | |||
625 | /* Register factor clocks */ | 621 | /* Register factor clocks */ |
626 | of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup); | 622 | of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup); |
627 | 623 | ||
@@ -634,3 +630,8 @@ void __init sunxi_init_clocks(void) | |||
634 | /* Register gate clocks */ | 630 | /* Register gate clocks */ |
635 | of_sunxi_table_clock_setup(clk_gates_match, sunxi_gates_clk_setup); | 631 | of_sunxi_table_clock_setup(clk_gates_match, sunxi_gates_clk_setup); |
636 | } | 632 | } |
633 | CLK_OF_DECLARE(sun4i_a10_clk_init, "allwinner,sun4i-a10", sunxi_init_clocks); | ||
634 | CLK_OF_DECLARE(sun5i_a10s_clk_init, "allwinner,sun5i-a10s", sunxi_init_clocks); | ||
635 | CLK_OF_DECLARE(sun5i_a13_clk_init, "allwinner,sun5i-a13", sunxi_init_clocks); | ||
636 | CLK_OF_DECLARE(sun6i_a31_clk_init, "allwinner,sun6i-a31", sunxi_init_clocks); | ||
637 | CLK_OF_DECLARE(sun7i_a20_clk_init, "allwinner,sun7i-a20", sunxi_init_clocks); | ||