Skip to content

Commit ee348d5

Browse files
Russell KingRussell King
authored andcommitted
[ARM] realview: fix broadcast tick support
Having discussed broadcast tick support with Thomas Glexiner, the broadcast tick devices should be registered with a higher rating than the global tick device, and it should have the ONESHOT and PERIODIC feature flags set. Signed-off-by: Russell King <[email protected]> Acked-by: Thomas Glexiner <[email protected]>
1 parent 78d236c commit ee348d5

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

arch/arm/mach-realview/core.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -750,14 +750,6 @@ void __init realview_timer_init(unsigned int timer_irq)
750750
{
751751
u32 val;
752752

753-
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
754-
/*
755-
* The dummy clock device has to be registered before the main device
756-
* so that the latter will broadcast the clock events
757-
*/
758-
local_timer_setup();
759-
#endif
760-
761753
/*
762754
* set clock frequency:
763755
* REALVIEW_REFCLK is 32KHz

arch/arm/mach-realview/localtimer.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,10 @@ void __cpuinit local_timer_setup(void)
189189
struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
190190

191191
clk->name = "dummy_timer";
192-
clk->features = CLOCK_EVT_FEAT_DUMMY;
193-
clk->rating = 200;
192+
clk->features = CLOCK_EVT_FEAT_ONESHOT |
193+
CLOCK_EVT_FEAT_PERIODIC |
194+
CLOCK_EVT_FEAT_DUMMY;
195+
clk->rating = 400;
194196
clk->mult = 1;
195197
clk->set_mode = dummy_timer_set_mode;
196198
clk->broadcast = smp_timer_broadcast;

arch/arm/mach-realview/platsmp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
217217
if (max_cpus > ncores)
218218
max_cpus = ncores;
219219

220-
#ifdef CONFIG_LOCAL_TIMERS
220+
#if defined(CONFIG_LOCAL_TIMERS) || defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
221221
/*
222-
* Enable the local timer for primary CPU. If the device is
223-
* dummy (!CONFIG_LOCAL_TIMERS), it was already registers in
224-
* realview_timer_init
222+
* Enable the local timer or broadcast device for the boot CPU.
225223
*/
226224
local_timer_setup();
227225
#endif

0 commit comments

Comments
 (0)