RealView: Toggle one LED per CPU
authorCatalin Marinas <catalin.marinas@arm.com>
Sat, 30 May 2009 12:56:16 +0000 (13:56 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Sat, 30 May 2009 12:56:16 +0000 (13:56 +0100)
If CONFIG_LEDS is enabled, it makes more sense to toggle one LED per CPU
in SMP systems rather than a single LED for all the CPUs.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm/mach-realview/core.c

index 076acbc50706272d9ab0713b3801be20bc6e067e..346cbf0cd13ec1e42a76bc947c4757b7d53bccae 100644 (file)
@@ -578,21 +578,22 @@ void realview_leds_event(led_event_t ledevt)
 {
        unsigned long flags;
        u32 val;
+       u32 led = 1 << smp_processor_id();
 
        local_irq_save(flags);
        val = readl(VA_LEDS_BASE);
 
        switch (ledevt) {
        case led_idle_start:
-               val = val & ~REALVIEW_SYS_LED0;
+               val = val & ~led;
                break;
 
        case led_idle_end:
-               val = val | REALVIEW_SYS_LED0;
+               val = val | led;
                break;
 
        case led_timer:
-               val = val ^ REALVIEW_SYS_LED1;
+               val = val ^ REALVIEW_SYS_LED7;
                break;
 
        case led_halted: