diff options
author | Prashant Gaikwad <pgaikwad@nvidia.com> | 2013-01-04 02:00:55 -0500 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-01-24 14:12:46 -0500 |
commit | d34bcdeb43331f87acf21423df26a8567c07de67 (patch) | |
tree | 3d0a07ea86ad739e87941fdc9ad5c30b5a8f8187 | |
parent | 85a181986c9cf8bbd2c4f2fb6f2add7ac5db1f76 (diff) |
clk: highbank: Use common of_clk_init() function
Use common of_clk_init() function for clocks initialization.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
-rw-r--r-- | arch/arm/mach-highbank/core.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-highbank/highbank.c | 3 | ||||
-rw-r--r-- | drivers/clk/clk-highbank.c | 18 |
3 files changed, 6 insertions, 16 deletions
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h index 80235b46cb58..3f65206a9b92 100644 --- a/arch/arm/mach-highbank/core.h +++ b/arch/arm/mach-highbank/core.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define __HIGHBANK_CORE_H | 2 | #define __HIGHBANK_CORE_H |
3 | 3 | ||
4 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); | 4 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); |
5 | extern void highbank_clocks_init(void); | ||
6 | extern void highbank_restart(char, const char *); | 5 | extern void highbank_restart(char, const char *); |
7 | extern void __iomem *scu_base_addr; | 6 | extern void __iomem *scu_base_addr; |
8 | 7 | ||
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 981dc1e1da51..f710f163fb50 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
26 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
27 | #include <linux/amba/bus.h> | 27 | #include <linux/amba/bus.h> |
28 | #include <linux/clk-provider.h> | ||
28 | 29 | ||
29 | #include <asm/arch_timer.h> | 30 | #include <asm/arch_timer.h> |
30 | #include <asm/cacheflush.h> | 31 | #include <asm/cacheflush.h> |
@@ -116,7 +117,7 @@ static void __init highbank_timer_init(void) | |||
116 | WARN_ON(!timer_base); | 117 | WARN_ON(!timer_base); |
117 | irq = irq_of_parse_and_map(np, 0); | 118 | irq = irq_of_parse_and_map(np, 0); |
118 | 119 | ||
119 | highbank_clocks_init(); | 120 | of_clk_init(NULL); |
120 | lookup.clk = of_clk_get(np, 0); | 121 | lookup.clk = of_clk_get(np, 0); |
121 | clkdev_add(&lookup); | 122 | clkdev_add(&lookup); |
122 | 123 | ||
diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c index 52fecadf004a..5d1de2e11753 100644 --- a/drivers/clk/clk-highbank.c +++ b/drivers/clk/clk-highbank.c | |||
@@ -314,33 +314,23 @@ static void __init hb_pll_init(struct device_node *node) | |||
314 | { | 314 | { |
315 | hb_clk_init(node, &clk_pll_ops); | 315 | hb_clk_init(node, &clk_pll_ops); |
316 | } | 316 | } |
317 | CLK_OF_DECLARE(hb_pll, "calxeda,hb-pll-clock", hb_pll_init); | ||
317 | 318 | ||
318 | static void __init hb_a9periph_init(struct device_node *node) | 319 | static void __init hb_a9periph_init(struct device_node *node) |
319 | { | 320 | { |
320 | hb_clk_init(node, &a9periphclk_ops); | 321 | hb_clk_init(node, &a9periphclk_ops); |
321 | } | 322 | } |
323 | CLK_OF_DECLARE(hb_a9periph, "calxeda,hb-a9periph-clock", hb_a9periph_init); | ||
322 | 324 | ||
323 | static void __init hb_a9bus_init(struct device_node *node) | 325 | static void __init hb_a9bus_init(struct device_node *node) |
324 | { | 326 | { |
325 | struct clk *clk = hb_clk_init(node, &a9bclk_ops); | 327 | struct clk *clk = hb_clk_init(node, &a9bclk_ops); |
326 | clk_prepare_enable(clk); | 328 | clk_prepare_enable(clk); |
327 | } | 329 | } |
330 | CLK_OF_DECLARE(hb_a9bus, "calxeda,hb-a9bus-clock", hb_a9bus_init); | ||
328 | 331 | ||
329 | static void __init hb_emmc_init(struct device_node *node) | 332 | static void __init hb_emmc_init(struct device_node *node) |
330 | { | 333 | { |
331 | hb_clk_init(node, &periclk_ops); | 334 | hb_clk_init(node, &periclk_ops); |
332 | } | 335 | } |
333 | 336 | CLK_OF_DECLARE(hb_emmc, "calxeda,hb-emmc-clock", hb_emmc_init); | |
334 | static const __initconst struct of_device_id clk_match[] = { | ||
335 | { .compatible = "fixed-clock", .data = of_fixed_clk_setup, }, | ||
336 | { .compatible = "calxeda,hb-pll-clock", .data = hb_pll_init, }, | ||
337 | { .compatible = "calxeda,hb-a9periph-clock", .data = hb_a9periph_init, }, | ||
338 | { .compatible = "calxeda,hb-a9bus-clock", .data = hb_a9bus_init, }, | ||
339 | { .compatible = "calxeda,hb-emmc-clock", .data = hb_emmc_init, }, | ||
340 | {} | ||
341 | }; | ||
342 | |||
343 | void __init highbank_clocks_init(void) | ||
344 | { | ||
345 | of_clk_init(clk_match); | ||
346 | } | ||