aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris/arch-v32
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2008-01-28 10:49:39 -0500
committerJesper Nilsson <jesper.nilsson@axis.com>2008-02-08 05:06:37 -0500
commit0d9f2e6f8603a770e5af013d6e87526dc2a0dbf5 (patch)
tree25a77bef1319470d6e04f2611eff7b2a6fcd90fa /include/asm-cris/arch-v32
parenta1a7dc1d068425c0c453c7c602cc97a4254e0bba (diff)
CRIS: Rename LED macros to CRIS_LED to avoid name clash in io.h
This is done to avoid collision with linux/leds.h
Diffstat (limited to 'include/asm-cris/arch-v32')
-rw-r--r--include/asm-cris/arch-v32/io.h49
1 files changed, 24 insertions, 25 deletions
diff --git a/include/asm-cris/arch-v32/io.h b/include/asm-cris/arch-v32/io.h
index 65a287953f50..6b38912f29ba 100644
--- a/include/asm-cris/arch-v32/io.h
+++ b/include/asm-cris/arch-v32/io.h
@@ -41,8 +41,7 @@ extern struct crisv32_iopin crisv32_led_net0_red;
41extern struct crisv32_iopin crisv32_led_net1_green; 41extern struct crisv32_iopin crisv32_led_net1_green;
42extern struct crisv32_iopin crisv32_led_net1_red; 42extern struct crisv32_iopin crisv32_led_net1_red;
43 43
44static inline void crisv32_io_set(struct crisv32_iopin* iopin, 44static inline void crisv32_io_set(struct crisv32_iopin *iopin, int val)
45 int val)
46{ 45{
47 long flags; 46 long flags;
48 spin_lock_irqsave(&iopin->port->lock, flags); 47 spin_lock_irqsave(&iopin->port->lock, flags);
@@ -79,59 +78,59 @@ int crisv32_io_get(struct crisv32_iopin* iopin,
79int crisv32_io_get_name(struct crisv32_iopin* iopin, 78int crisv32_io_get_name(struct crisv32_iopin* iopin,
80 const char *name); 79 const char *name);
81 80
82#define LED_OFF 0x00 81#define CRIS_LED_OFF 0x00
83#define LED_GREEN 0x01 82#define CRIS_LED_GREEN 0x01
84#define LED_RED 0x02 83#define CRIS_LED_RED 0x02
85#define LED_ORANGE (LED_GREEN | LED_RED) 84#define CRIS_LED_ORANGE (CRIS_LED_GREEN | CRIS_LED_RED)
86 85
87#if (defined(CONFIG_ETRAX_NBR_LED_GRP_ONE) || defined(CONFIG_ETRAX_NBR_LED_GRP_TWO)) 86#if (defined(CONFIG_ETRAX_NBR_LED_GRP_ONE) || defined(CONFIG_ETRAX_NBR_LED_GRP_TWO))
88#define LED_NETWORK_GRP0_SET(x) \ 87#define CRIS_LED_NETWORK_GRP0_SET(x) \
89 do { \ 88 do { \
90 LED_NETWORK_GRP0_SET_G((x) & LED_GREEN); \ 89 CRIS_LED_NETWORK_GRP0_SET_G((x) & CRIS_LED_GREEN); \
91 LED_NETWORK_GRP0_SET_R((x) & LED_RED); \ 90 CRIS_LED_NETWORK_GRP0_SET_R((x) & CRIS_LED_RED); \
92 } while (0) 91 } while (0)
93#else 92#else
94#define LED_NETWORK_GRP0_SET(x) while (0) {} 93#define CRIS_LED_NETWORK_GRP0_SET(x) while (0) {}
95#endif 94#endif
96 95
97#define LED_NETWORK_GRP0_SET_G(x) \ 96#define CRIS_LED_NETWORK_GRP0_SET_G(x) \
98 crisv32_io_set(&crisv32_led_net0_green, !(x)); 97 crisv32_io_set(&crisv32_led_net0_green, !(x));
99 98
100#define LED_NETWORK_GRP0_SET_R(x) \ 99#define CRIS_LED_NETWORK_GRP0_SET_R(x) \
101 crisv32_io_set(&crisv32_led_net0_red, !(x)); 100 crisv32_io_set(&crisv32_led_net0_red, !(x));
102 101
103#if defined(CONFIG_ETRAX_NBR_LED_GRP_TWO) 102#if defined(CONFIG_ETRAX_NBR_LED_GRP_TWO)
104#define LED_NETWORK_GRP1_SET(x) \ 103#define CRIS_LED_NETWORK_GRP1_SET(x) \
105 do { \ 104 do { \
106 LED_NETWORK_GRP1_SET_G((x) & LED_GREEN); \ 105 CRIS_LED_NETWORK_GRP1_SET_G((x) & CRIS_LED_GREEN); \
107 LED_NETWORK_GRP1_SET_R((x) & LED_RED); \ 106 CRIS_LED_NETWORK_GRP1_SET_R((x) & CRIS_LED_RED); \
108 } while (0) 107 } while (0)
109#else 108#else
110#define LED_NETWORK_GRP1_SET(x) while (0) {} 109#define CRIS_LED_NETWORK_GRP1_SET(x) while (0) {}
111#endif 110#endif
112 111
113#define LED_NETWORK_GRP1_SET_G(x) \ 112#define CRIS_LED_NETWORK_GRP1_SET_G(x) \
114 crisv32_io_set(&crisv32_led_net1_green, !(x)); 113 crisv32_io_set(&crisv32_led_net1_green, !(x));
115 114
116#define LED_NETWORK_GRP1_SET_R(x) \ 115#define CRIS_LED_NETWORK_GRP1_SET_R(x) \
117 crisv32_io_set(&crisv32_led_net1_red, !(x)); 116 crisv32_io_set(&crisv32_led_net1_red, !(x));
118 117
119#define LED_ACTIVE_SET(x) \ 118#define CRIS_LED_ACTIVE_SET(x) \
120 do { \ 119 do { \
121 LED_ACTIVE_SET_G((x) & LED_GREEN); \ 120 CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \
122 LED_ACTIVE_SET_R((x) & LED_RED); \ 121 CRIS_LED_ACTIVE_SET_R((x) & CRIS_LED_RED); \
123 } while (0) 122 } while (0)
124 123
125#define LED_ACTIVE_SET_G(x) \ 124#define CRIS_LED_ACTIVE_SET_G(x) \
126 crisv32_io_set(&crisv32_led2_green, !(x)); 125 crisv32_io_set(&crisv32_led2_green, !(x));
127#define LED_ACTIVE_SET_R(x) \ 126#define CRIS_LED_ACTIVE_SET_R(x) \
128 crisv32_io_set(&crisv32_led2_red, !(x)); 127 crisv32_io_set(&crisv32_led2_red, !(x));
129#define LED_DISK_WRITE(x) \ 128#define CRIS_LED_DISK_WRITE(x) \
130 do{\ 129 do{\
131 crisv32_io_set(&crisv32_led3_green, !(x)); \ 130 crisv32_io_set(&crisv32_led3_green, !(x)); \
132 crisv32_io_set(&crisv32_led3_red, !(x)); \ 131 crisv32_io_set(&crisv32_led3_red, !(x)); \
133 }while(0) 132 }while(0)
134#define LED_DISK_READ(x) \ 133#define CRIS_LED_DISK_READ(x) \
135 crisv32_io_set(&crisv32_led3_green, !(x)); 134 crisv32_io_set(&crisv32_led3_green, !(x));
136 135
137#endif 136#endif