ARM: sa1100: register clocks early
Subsystems (2)
PATCH 2/2 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.
--- arch/arm/mach-sa1100/clock.c | 3 +-- arch/arm/mach-sa1100/generic.c | 1 + arch/arm/mach-sa1100/generic.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-sa1100/clock.c +1 -2
@@ -142,9 +142,8 @@ static struct clk_lookup sa11xx_clkregs[] = { CLKDEV_INIT(NULL, "OSTIMER0", &clk_36864), }; -static int __init sa11xx_clk_init (void ) +int __init sa11xx_clk_init (void ) {clkdev_add_table (sa11xx_clkregs,ARRAY_SIZE (sa11xx_clkregs));return 0 ; } -core_initcall (sa11xx_clk_init);
arch/arm/mach-sa1100/generic.c +1 -0
@@ -388,6 +388,7 @@ void __init sa1100_init_irq(void)sa11x0_init_irq_nodt (IRQ_GPIO0_SC , irq_resource.start);sa1100_init_gpio (); +sa11xx_clk_init (); }/*
arch/arm/mach-sa1100/generic.h +2 -0
@@ -44,3 +44,5 @@ int sa11x0_pm_init(void);#else static inline int sa11x0_pm_init (void ) {return 0 ; }#endif + +int sa11xx_clk_init (void );
Signature · 1 line
2.1.0
PATCH 2/2 ARM: sa1100: register clocks early
2016-08-19 14:51 GMT+03:00 Russell King <[email protected]>:
Quoted 4 lines
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 thatpxa_timercan find it. Adding the clock to the clkdev table atcore_initcall()time is way too late.
This worked for me before, so maybe the init order of other kernel parts has changed. Anyway:
Signature · 2 lines
With best wishes Dmitry
Russell King - ARM Linux
maintainerPATCH 2/2 ARM: sa1100: register clocks early
Quoted 10 lines · Dmitry Eremin-Solenikov
2016-08-19 14:51 GMT+03:00 Russell King <[email protected]>:
Quoted 4 lines
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 thatpxa_timercan find it. Adding the clock to the clkdev table atcore_initcall()time is way too late.This worked for me before, so maybe the init order of other kernel parts has changed. Anyway:
It worked in so far as we fell back to the non-clock based code, so things continued to work. However, a warning was printed at each boot.
I don't think this ever worked. Timers are setup very early in the boot process (going back to 0.99.x times), and core_initcall() has always been after that, after pid1 has been created.
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.