diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2016-08-19 07:47:54 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-08-23 05:02:18 -0400 |
commit | 198b51e8a6a31d3a6f8e9dd9cade3635d0291f26 (patch) | |
tree | 4d03f0de5943eaa84aa3982d4983a003562260e5 | |
parent | 02ba38a5b6d6e0bc89c7b74651f1873055028a56 (diff) |
ARM: sa1100: register clocks early
Since we switched to use pxa_timer, we need to provide the OSTIMER0
clock. However, as the clock is initialised early, we need to provide
the clock early as well, so that pxa_timer can find it. Adding the
clock to the clkdev table at core_initcall() time is way too late.
Move the initialisation earlier.
Fixes: ee3a4020f7c9 ("ARM: 8250/1: sa1100: provide OSTIMER0 clock for pxa_timer")
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | arch/arm/mach-sa1100/clock.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/generic.h | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c index 0bf3220988ef..0db46895c82a 100644 --- a/arch/arm/mach-sa1100/clock.c +++ b/arch/arm/mach-sa1100/clock.c | |||
@@ -142,9 +142,8 @@ static struct clk_lookup sa11xx_clkregs[] = { | |||
142 | CLKDEV_INIT(NULL, "OSTIMER0", &clk_36864), | 142 | CLKDEV_INIT(NULL, "OSTIMER0", &clk_36864), |
143 | }; | 143 | }; |
144 | 144 | ||
145 | static int __init sa11xx_clk_init(void) | 145 | int __init sa11xx_clk_init(void) |
146 | { | 146 | { |
147 | clkdev_add_table(sa11xx_clkregs, ARRAY_SIZE(sa11xx_clkregs)); | 147 | clkdev_add_table(sa11xx_clkregs, ARRAY_SIZE(sa11xx_clkregs)); |
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
150 | core_initcall(sa11xx_clk_init); | ||
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 345e63f4eb71..2e2c35b8e0d4 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -388,6 +388,7 @@ void __init sa1100_init_irq(void) | |||
388 | sa11x0_init_irq_nodt(IRQ_GPIO0_SC, irq_resource.start); | 388 | sa11x0_init_irq_nodt(IRQ_GPIO0_SC, irq_resource.start); |
389 | 389 | ||
390 | sa1100_init_gpio(); | 390 | sa1100_init_gpio(); |
391 | sa11xx_clk_init(); | ||
391 | } | 392 | } |
392 | 393 | ||
393 | /* | 394 | /* |
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h index 0d92e119b36b..68199b603ff7 100644 --- a/arch/arm/mach-sa1100/generic.h +++ b/arch/arm/mach-sa1100/generic.h | |||
@@ -44,3 +44,5 @@ int sa11x0_pm_init(void); | |||
44 | #else | 44 | #else |
45 | static inline int sa11x0_pm_init(void) { return 0; } | 45 | static inline int sa11x0_pm_init(void) { return 0; } |
46 | #endif | 46 | #endif |
47 | |||
48 | int sa11xx_clk_init(void); | ||