diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-10-31 03:18:02 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-10-31 03:18:02 -0400 |
commit | 0803d540db06f53acd2fabf1347d5b665218f14a (patch) | |
tree | f5f8e5510a76bb59d3583478961daf5afc32df08 /arch/mips/txx9/rbtx4927/setup.c | |
parent | a8884e3415c29c58a5875d54c109c4a7fcaa6fb4 (diff) | |
parent | 721d5dfe7e516954c501d5e9d0dfab379cf4241a (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/mips/txx9/rbtx4927/setup.c')
-rw-r--r-- | arch/mips/txx9/rbtx4927/setup.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c index 4a74423b2ba8..01129a9d50fa 100644 --- a/arch/mips/txx9/rbtx4927/setup.c +++ b/arch/mips/txx9/rbtx4927/setup.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/platform_device.h> | 49 | #include <linux/platform_device.h> |
50 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
51 | #include <linux/gpio.h> | 51 | #include <linux/gpio.h> |
52 | #include <linux/leds.h> | ||
52 | #include <asm/io.h> | 53 | #include <asm/io.h> |
53 | #include <asm/reboot.h> | 54 | #include <asm/reboot.h> |
54 | #include <asm/txx9/generic.h> | 55 | #include <asm/txx9/generic.h> |
@@ -210,10 +211,6 @@ static void __init rbtx4927_mem_setup(void) | |||
210 | /* TX4927-SIO DTR on (PIO[15]) */ | 211 | /* TX4927-SIO DTR on (PIO[15]) */ |
211 | gpio_request(15, "sio-dtr"); | 212 | gpio_request(15, "sio-dtr"); |
212 | gpio_direction_output(15, 1); | 213 | gpio_direction_output(15, 1); |
213 | gpio_request(0, "led"); | ||
214 | gpio_direction_output(0, 1); | ||
215 | gpio_request(1, "led"); | ||
216 | gpio_direction_output(1, 1); | ||
217 | 214 | ||
218 | tx4927_sio_init(0, 0); | 215 | tx4927_sio_init(0, 0); |
219 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE | 216 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE |
@@ -315,6 +312,25 @@ static void __init rbtx4927_mtd_init(void) | |||
315 | tx4927_mtd_init(i); | 312 | tx4927_mtd_init(i); |
316 | } | 313 | } |
317 | 314 | ||
315 | static void __init rbtx4927_gpioled_init(void) | ||
316 | { | ||
317 | static struct gpio_led leds[] = { | ||
318 | { .name = "gpioled:green:0", .gpio = 0, .active_low = 1, }, | ||
319 | { .name = "gpioled:green:1", .gpio = 1, .active_low = 1, }, | ||
320 | }; | ||
321 | static struct gpio_led_platform_data pdata = { | ||
322 | .num_leds = ARRAY_SIZE(leds), | ||
323 | .leds = leds, | ||
324 | }; | ||
325 | struct platform_device *pdev = platform_device_alloc("leds-gpio", 0); | ||
326 | |||
327 | if (!pdev) | ||
328 | return; | ||
329 | pdev->dev.platform_data = &pdata; | ||
330 | if (platform_device_add(pdev)) | ||
331 | platform_device_put(pdev); | ||
332 | } | ||
333 | |||
318 | static void __init rbtx4927_device_init(void) | 334 | static void __init rbtx4927_device_init(void) |
319 | { | 335 | { |
320 | toshiba_rbtx4927_rtc_init(); | 336 | toshiba_rbtx4927_rtc_init(); |
@@ -322,6 +338,7 @@ static void __init rbtx4927_device_init(void) | |||
322 | tx4927_wdt_init(); | 338 | tx4927_wdt_init(); |
323 | rbtx4927_mtd_init(); | 339 | rbtx4927_mtd_init(); |
324 | txx9_iocled_init(RBTX4927_LED_ADDR - IO_BASE, -1, 3, 1, "green", NULL); | 340 | txx9_iocled_init(RBTX4927_LED_ADDR - IO_BASE, -1, 3, 1, "green", NULL); |
341 | rbtx4927_gpioled_init(); | ||
325 | } | 342 | } |
326 | 343 | ||
327 | struct txx9_board_vec rbtx4927_vec __initdata = { | 344 | struct txx9_board_vec rbtx4927_vec __initdata = { |