diff options
Diffstat (limited to 'arch/arm/mach-sa1100/leds-assabet.c')
-rw-r--r-- | arch/arm/mach-sa1100/leds-assabet.c | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/arch/arm/mach-sa1100/leds-assabet.c b/arch/arm/mach-sa1100/leds-assabet.c deleted file mode 100644 index 3699176bca94..000000000000 --- a/arch/arm/mach-sa1100/leds-assabet.c +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-sa1100/leds-assabet.c | ||
3 | * | ||
4 | * Copyright (C) 2000 John Dorsey <john+@cs.cmu.edu> | ||
5 | * | ||
6 | * Original (leds-footbridge.c) by Russell King | ||
7 | * | ||
8 | * Assabet uses the LEDs as follows: | ||
9 | * - Green - toggles state every 50 timer interrupts | ||
10 | * - Red - on if system is not idle | ||
11 | */ | ||
12 | #include <linux/init.h> | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | #include <asm/leds.h> | ||
16 | #include <mach/assabet.h> | ||
17 | |||
18 | #include "leds.h" | ||
19 | |||
20 | |||
21 | #define LED_STATE_ENABLED 1 | ||
22 | #define LED_STATE_CLAIMED 2 | ||
23 | |||
24 | static unsigned int led_state; | ||
25 | static unsigned int hw_led_state; | ||
26 | |||
27 | #define ASSABET_BCR_LED_MASK (ASSABET_BCR_LED_GREEN | ASSABET_BCR_LED_RED) | ||
28 | |||
29 | void assabet_leds_event(led_event_t evt) | ||
30 | { | ||
31 | unsigned long flags; | ||
32 | |||
33 | local_irq_save(flags); | ||
34 | |||
35 | switch (evt) { | ||
36 | case led_start: | ||
37 | hw_led_state = ASSABET_BCR_LED_RED | ASSABET_BCR_LED_GREEN; | ||
38 | led_state = LED_STATE_ENABLED; | ||
39 | break; | ||
40 | |||
41 | case led_stop: | ||
42 | led_state &= ~LED_STATE_ENABLED; | ||
43 | hw_led_state = ASSABET_BCR_LED_RED | ASSABET_BCR_LED_GREEN; | ||
44 | ASSABET_BCR_frob(ASSABET_BCR_LED_MASK, hw_led_state); | ||
45 | break; | ||
46 | |||
47 | case led_claim: | ||
48 | led_state |= LED_STATE_CLAIMED; | ||
49 | hw_led_state = ASSABET_BCR_LED_RED | ASSABET_BCR_LED_GREEN; | ||
50 | break; | ||
51 | |||
52 | case led_release: | ||
53 | led_state &= ~LED_STATE_CLAIMED; | ||
54 | hw_led_state = ASSABET_BCR_LED_RED | ASSABET_BCR_LED_GREEN; | ||
55 | break; | ||
56 | |||
57 | #ifdef CONFIG_LEDS_TIMER | ||
58 | case led_timer: | ||
59 | if (!(led_state & LED_STATE_CLAIMED)) | ||
60 | hw_led_state ^= ASSABET_BCR_LED_GREEN; | ||
61 | break; | ||
62 | #endif | ||
63 | |||
64 | #ifdef CONFIG_LEDS_CPU | ||
65 | case led_idle_start: | ||
66 | if (!(led_state & LED_STATE_CLAIMED)) | ||
67 | hw_led_state |= ASSABET_BCR_LED_RED; | ||
68 | break; | ||
69 | |||
70 | case led_idle_end: | ||
71 | if (!(led_state & LED_STATE_CLAIMED)) | ||
72 | hw_led_state &= ~ASSABET_BCR_LED_RED; | ||
73 | break; | ||
74 | #endif | ||
75 | |||
76 | case led_halted: | ||
77 | break; | ||
78 | |||
79 | case led_green_on: | ||
80 | if (led_state & LED_STATE_CLAIMED) | ||
81 | hw_led_state &= ~ASSABET_BCR_LED_GREEN; | ||
82 | break; | ||
83 | |||
84 | case led_green_off: | ||
85 | if (led_state & LED_STATE_CLAIMED) | ||
86 | hw_led_state |= ASSABET_BCR_LED_GREEN; | ||
87 | break; | ||
88 | |||
89 | case led_amber_on: | ||
90 | break; | ||
91 | |||
92 | case led_amber_off: | ||
93 | break; | ||
94 | |||
95 | case led_red_on: | ||
96 | if (led_state & LED_STATE_CLAIMED) | ||
97 | hw_led_state &= ~ASSABET_BCR_LED_RED; | ||
98 | break; | ||
99 | |||
100 | case led_red_off: | ||
101 | if (led_state & LED_STATE_CLAIMED) | ||
102 | hw_led_state |= ASSABET_BCR_LED_RED; | ||
103 | break; | ||
104 | |||
105 | default: | ||
106 | break; | ||
107 | } | ||
108 | |||
109 | if (led_state & LED_STATE_ENABLED) | ||
110 | ASSABET_BCR_frob(ASSABET_BCR_LED_MASK, hw_led_state); | ||
111 | |||
112 | local_irq_restore(flags); | ||
113 | } | ||