diff options
author | Pawel Moll <pawel.moll@arm.com> | 2013-04-18 13:23:22 -0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-04-18 14:41:10 -0400 |
commit | 6e973d2c438502dcf956e76305258ba7d1c7d1d3 (patch) | |
tree | e9b85815c35794b1b3a219e4ae755bfca2319f4a /arch/arm/mach-vexpress | |
parent | 476ba5ffa412cc170aa20fd135648b8f14a4baef (diff) |
clk: vexpress: Add separate SP810 driver
Factor out the SP810 clocking code into a separate driver,
selecting better (faster) parent at clk_prepare() time.
This is to avoid problems with clocking infrastructure
initialisation order, in particular to avoid dependency
of fixed clock being initialized before SP810. It also
makes vexpress platform OF-based clock initialisation code
unnecessary.
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[mturquette@linaro.org: add .unprepare, FIXME comment, cleaned up code]
Diffstat (limited to 'arch/arm/mach-vexpress')
-rw-r--r-- | arch/arm/mach-vexpress/v2m.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 915683cb67d6..c5e20b52e3b7 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/regulator/fixed.h> | 21 | #include <linux/regulator/fixed.h> |
22 | #include <linux/regulator/machine.h> | 22 | #include <linux/regulator/machine.h> |
23 | #include <linux/vexpress.h> | 23 | #include <linux/vexpress.h> |
24 | #include <linux/clk-provider.h> | ||
25 | #include <linux/clkdev.h> | ||
24 | 26 | ||
25 | #include <asm/arch_timer.h> | 27 | #include <asm/arch_timer.h> |
26 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
@@ -433,7 +435,7 @@ static void __init v2m_dt_timer_init(void) | |||
433 | { | 435 | { |
434 | struct device_node *node = NULL; | 436 | struct device_node *node = NULL; |
435 | 437 | ||
436 | vexpress_clk_of_init(); | 438 | of_clk_init(NULL); |
437 | 439 | ||
438 | do { | 440 | do { |
439 | node = of_find_compatible_node(node, NULL, "arm,sp804"); | 441 | node = of_find_compatible_node(node, NULL, "arm,sp804"); |
@@ -441,6 +443,10 @@ static void __init v2m_dt_timer_init(void) | |||
441 | if (node) { | 443 | if (node) { |
442 | pr_info("Using SP804 '%s' as a clock & events source\n", | 444 | pr_info("Using SP804 '%s' as a clock & events source\n", |
443 | node->full_name); | 445 | node->full_name); |
446 | WARN_ON(clk_register_clkdev(of_clk_get_by_name(node, | ||
447 | "timclken1"), "v2m-timer0", "sp804")); | ||
448 | WARN_ON(clk_register_clkdev(of_clk_get_by_name(node, | ||
449 | "timclken2"), "v2m-timer1", "sp804")); | ||
444 | v2m_sp804_init(of_iomap(node, 0), | 450 | v2m_sp804_init(of_iomap(node, 0), |
445 | irq_of_parse_and_map(node, 0)); | 451 | irq_of_parse_and_map(node, 0)); |
446 | } | 452 | } |