diff options
Diffstat (limited to 'arch/avr32/boards/atstk1000/atstk1002.c')
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 64 |
1 files changed, 2 insertions, 62 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index 5be0d13f4b03..2481d2389873 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/etherdevice.h> | 11 | #include <linux/etherdevice.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/leds.h> | ||
15 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
16 | #include <linux/string.h> | 15 | #include <linux/string.h> |
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
@@ -22,7 +21,7 @@ | |||
22 | 21 | ||
23 | #include <asm/io.h> | 22 | #include <asm/io.h> |
24 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
25 | #include <asm/arch/at32ap7000.h> | 24 | #include <asm/arch/at32ap700x.h> |
26 | #include <asm/arch/board.h> | 25 | #include <asm/arch/board.h> |
27 | #include <asm/arch/init.h> | 26 | #include <asm/arch/init.h> |
28 | #include <asm/arch/portmux.h> | 27 | #include <asm/arch/portmux.h> |
@@ -141,65 +140,6 @@ static void __init set_hw_addr(struct platform_device *pdev) | |||
141 | clk_put(pclk); | 140 | clk_put(pclk); |
142 | } | 141 | } |
143 | 142 | ||
144 | #ifdef CONFIG_BOARD_ATSTK1002_J2_LED | ||
145 | |||
146 | static struct gpio_led stk_j2_led[] = { | ||
147 | #ifdef CONFIG_BOARD_ATSTK1002_J2_LED8 | ||
148 | #define LEDSTRING "J2 jumpered to LED8" | ||
149 | { .name = "led0:amber", .gpio = GPIO_PIN_PB( 8), }, | ||
150 | { .name = "led1:amber", .gpio = GPIO_PIN_PB( 9), }, | ||
151 | { .name = "led2:amber", .gpio = GPIO_PIN_PB(10), }, | ||
152 | { .name = "led3:amber", .gpio = GPIO_PIN_PB(13), }, | ||
153 | { .name = "led4:amber", .gpio = GPIO_PIN_PB(14), }, | ||
154 | { .name = "led5:amber", .gpio = GPIO_PIN_PB(15), }, | ||
155 | { .name = "led6:amber", .gpio = GPIO_PIN_PB(16), }, | ||
156 | { .name = "led7:amber", .gpio = GPIO_PIN_PB(30), | ||
157 | .default_trigger = "heartbeat", }, | ||
158 | #else /* RGB */ | ||
159 | #define LEDSTRING "J2 jumpered to RGB LEDs" | ||
160 | { .name = "r1:red", .gpio = GPIO_PIN_PB( 8), }, | ||
161 | { .name = "g1:green", .gpio = GPIO_PIN_PB(10), }, | ||
162 | { .name = "b1:blue", .gpio = GPIO_PIN_PB(14), }, | ||
163 | |||
164 | { .name = "r2:red", .gpio = GPIO_PIN_PB( 9), | ||
165 | .default_trigger = "heartbeat", }, | ||
166 | { .name = "g2:green", .gpio = GPIO_PIN_PB(13), }, | ||
167 | { .name = "b2:blue", .gpio = GPIO_PIN_PB(15), | ||
168 | .default_trigger = "heartbeat", }, | ||
169 | /* PB16, PB30 unused */ | ||
170 | #endif | ||
171 | }; | ||
172 | |||
173 | static struct gpio_led_platform_data stk_j2_led_data = { | ||
174 | .num_leds = ARRAY_SIZE(stk_j2_led), | ||
175 | .leds = stk_j2_led, | ||
176 | }; | ||
177 | |||
178 | static struct platform_device stk_j2_led_dev = { | ||
179 | .name = "leds-gpio", | ||
180 | .id = 2, /* gpio block J2 */ | ||
181 | .dev = { | ||
182 | .platform_data = &stk_j2_led_data, | ||
183 | }, | ||
184 | }; | ||
185 | |||
186 | static void setup_j2_leds(void) | ||
187 | { | ||
188 | unsigned i; | ||
189 | |||
190 | for (i = 0; i < ARRAY_SIZE(stk_j2_led); i++) | ||
191 | at32_select_gpio(stk_j2_led[i].gpio, AT32_GPIOF_OUTPUT); | ||
192 | |||
193 | printk("STK1002: " LEDSTRING "\n"); | ||
194 | platform_device_register(&stk_j2_led_dev); | ||
195 | } | ||
196 | |||
197 | #else | ||
198 | static void setup_j2_leds(void) | ||
199 | { | ||
200 | } | ||
201 | #endif | ||
202 | |||
203 | #ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM | 143 | #ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM |
204 | #ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM | 144 | #ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM |
205 | static void __init at73c213_set_clk(struct at73c213_board_info *info) | 145 | static void __init at73c213_set_clk(struct at73c213_board_info *info) |
@@ -298,7 +238,7 @@ static int __init atstk1002_init(void) | |||
298 | at32_add_device_ssc(0, ATMEL_SSC_TX); | 238 | at32_add_device_ssc(0, ATMEL_SSC_TX); |
299 | #endif | 239 | #endif |
300 | 240 | ||
301 | setup_j2_leds(); | 241 | atstk1000_setup_j2_leds(); |
302 | 242 | ||
303 | #ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM | 243 | #ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM |
304 | #ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM | 244 | #ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM |