kmemtrace: SLOB hooks.
[linux-2.6/kmemtrace.git] / arch / arm / mach-imx / leds-mx1ads.c
blob79236404aec2571b1f26b383b7d0e7a370ad2e19
1 /*
2 * linux/arch/arm/mach-imx/leds-mx1ads.c
4 * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de>
6 * Original (leds-footbridge.c) by Russell King
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <asm/hardware.h>
17 #include <asm/system.h>
18 #include <asm/io.h>
19 #include <asm/leds.h>
20 #include "leds.h"
23 * The MX1ADS Board has only one usable LED,
24 * so select only the timer led or the
25 * cpu usage led
27 void
28 mx1ads_leds_event(led_event_t ledevt)
30 unsigned long flags;
32 local_irq_save(flags);
34 switch (ledevt) {
35 #ifdef CONFIG_LEDS_CPU
36 case led_idle_start:
37 DR(0) &= ~(1<<2);
38 break;
40 case led_idle_end:
41 DR(0) |= 1<<2;
42 break;
43 #endif
45 #ifdef CONFIG_LEDS_TIMER
46 case led_timer:
47 DR(0) ^= 1<<2;
48 #endif
49 default:
50 break;
52 local_irq_restore(flags);