Skip to content

Commit

Permalink
RealView: Toggle one LED per CPU
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Catalin Marinas committed May 30, 2009
1 parent ff3042f commit da055eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/arm/mach-realview/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit da055eb

Please sign in to comment.