[ARM] realview: fix broadcast tick support
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sun, 17 May 2009 16:00:47 +0000 (17:00 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 17 May 2009 16:11:35 +0000 (17:11 +0100)
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 <rmk+kernel@arm.linux.org.uk>
Acked-by: Thomas Glexiner <tglx@linutronix.de>
arch/arm/mach-realview/core.c
arch/arm/mach-realview/localtimer.c
arch/arm/mach-realview/platsmp.c

index 942e1a7eb9b29f8501d706545083af8265644b13..076acbc50706272d9ab0713b3801be20bc6e067e 100644 (file)
@@ -750,14 +750,6 @@ void __init realview_timer_init(unsigned int timer_irq)
 {
        u32 val;
 
-#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
-       /*
-        * The dummy clock device has to be registered before the main device
-        * so that the latter will broadcast the clock events
-        */
-       local_timer_setup();
-#endif
-
        /* 
         * set clock frequency: 
         *      REALVIEW_REFCLK is 32KHz
index d0d39adf640777c9f56222fbe9be9028f0926243..1c01d13460f01f13495e3b0cdf9757fe58ac513f 100644 (file)
@@ -189,8 +189,10 @@ void __cpuinit local_timer_setup(void)
        struct clock_event_device *clk = &per_cpu(local_clockevent, cpu);
 
        clk->name               = "dummy_timer";
-       clk->features           = CLOCK_EVT_FEAT_DUMMY;
-       clk->rating             = 200;
+       clk->features           = CLOCK_EVT_FEAT_ONESHOT |
+                                 CLOCK_EVT_FEAT_PERIODIC |
+                                 CLOCK_EVT_FEAT_DUMMY;
+       clk->rating             = 400;
        clk->mult               = 1;
        clk->set_mode           = dummy_timer_set_mode;
        clk->broadcast          = smp_timer_broadcast;
index b037fd6c82dc0aa6f54c7eb1df82c66441592850..30a9c68591f661ddd2f11492a02630d0a5f6b357 100644 (file)
@@ -217,11 +217,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
        if (max_cpus > ncores)
                max_cpus = ncores;
 
-#ifdef CONFIG_LOCAL_TIMERS
+#if defined(CONFIG_LOCAL_TIMERS) || defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
        /*
-        * Enable the local timer for primary CPU. If the device is
-        * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in
-        * realview_timer_init
+        * Enable the local timer or broadcast device for the boot CPU.
         */
        local_timer_setup();
 #endif