diff options
Diffstat (limited to 'arch/arm/mach-pxa/leds-idp.c')
-rw-r--r-- | arch/arm/mach-pxa/leds-idp.c | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/arch/arm/mach-pxa/leds-idp.c b/arch/arm/mach-pxa/leds-idp.c deleted file mode 100644 index 06b060025d11..000000000000 --- a/arch/arm/mach-pxa/leds-idp.c +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/leds-idp.c | ||
3 | * | ||
4 | * Copyright (C) 2000 John Dorsey <john+@cs.cmu.edu> | ||
5 | * | ||
6 | * Copyright (c) 2001 Jeff Sutherland <jeffs@accelent.com> | ||
7 | * | ||
8 | * Original (leds-footbridge.c) by Russell King | ||
9 | * | ||
10 | * Macros for actual LED manipulation should be in machine specific | ||
11 | * files in this 'mach' directory. | ||
12 | */ | ||
13 | |||
14 | |||
15 | #include <linux/init.h> | ||
16 | |||
17 | #include <mach/hardware.h> | ||
18 | #include <asm/leds.h> | ||
19 | |||
20 | #include <mach/pxa25x.h> | ||
21 | #include <mach/idp.h> | ||
22 | |||
23 | #include "leds.h" | ||
24 | |||
25 | #define LED_STATE_ENABLED 1 | ||
26 | #define LED_STATE_CLAIMED 2 | ||
27 | |||
28 | static unsigned int led_state; | ||
29 | static unsigned int hw_led_state; | ||
30 | |||
31 | void idp_leds_event(led_event_t evt) | ||
32 | { | ||
33 | unsigned long flags; | ||
34 | |||
35 | local_irq_save(flags); | ||
36 | |||
37 | switch (evt) { | ||
38 | case led_start: | ||
39 | hw_led_state = IDP_HB_LED | IDP_BUSY_LED; | ||
40 | led_state = LED_STATE_ENABLED; | ||
41 | break; | ||
42 | |||
43 | case led_stop: | ||
44 | led_state &= ~LED_STATE_ENABLED; | ||
45 | break; | ||
46 | |||
47 | case led_claim: | ||
48 | led_state |= LED_STATE_CLAIMED; | ||
49 | hw_led_state = IDP_HB_LED | IDP_BUSY_LED; | ||
50 | break; | ||
51 | |||
52 | case led_release: | ||
53 | led_state &= ~LED_STATE_CLAIMED; | ||
54 | hw_led_state = IDP_HB_LED | IDP_BUSY_LED; | ||
55 | break; | ||
56 | |||
57 | #ifdef CONFIG_LEDS_TIMER | ||
58 | case led_timer: | ||
59 | if (!(led_state & LED_STATE_CLAIMED)) | ||
60 | hw_led_state ^= IDP_HB_LED; | ||
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 &= ~IDP_BUSY_LED; | ||
68 | break; | ||
69 | |||
70 | case led_idle_end: | ||
71 | if (!(led_state & LED_STATE_CLAIMED)) | ||
72 | hw_led_state |= IDP_BUSY_LED; | ||
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 |= IDP_HB_LED; | ||
82 | break; | ||
83 | |||
84 | case led_green_off: | ||
85 | if (led_state & LED_STATE_CLAIMED) | ||
86 | hw_led_state &= ~IDP_HB_LED; | ||
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 |= IDP_BUSY_LED; | ||
98 | break; | ||
99 | |||
100 | case led_red_off: | ||
101 | if (led_state & LED_STATE_CLAIMED) | ||
102 | hw_led_state &= ~IDP_BUSY_LED; | ||
103 | break; | ||
104 | |||
105 | default: | ||
106 | break; | ||
107 | } | ||
108 | |||
109 | if (led_state & LED_STATE_ENABLED) | ||
110 | IDP_CPLD_LED_CONTROL = ( (IDP_CPLD_LED_CONTROL | IDP_LEDS_MASK) & ~hw_led_state); | ||
111 | else | ||
112 | IDP_CPLD_LED_CONTROL |= IDP_LEDS_MASK; | ||
113 | |||
114 | local_irq_restore(flags); | ||
115 | } | ||