summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-05-30 14:56:16 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2009-05-30 14:56:16 +0200
commitda055eb52ec067d51dc08c7e86baf92dd5c01599 (patch)
tree91b916d3606b9074f08d25b22dae11694fd1b112 /arch/arm
parentRealView: Allow CONFIG_LEDS on this platform (diff)
downloadlinux-da055eb52ec067d51dc08c7e86baf92dd5c01599.tar.xz
linux-da055eb52ec067d51dc08c7e86baf92dd5c01599.zip
RealView: Toggle one LED per CPU
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>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-realview/core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 076acbc50706..346cbf0cd13e 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -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: