]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/boards/board-rsk7203.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / arch / sh / boards / board-rsk7203.c
index ffbedc59a9738e0bcbf2ce7cc0fd283af4db4156..58266f06134ae5a187673e23eb89765a3c171510 100644 (file)
 #include <linux/mtd/physmap.h>
 #include <linux/mtd/map.h>
 #include <linux/smc911x.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
 #include <asm/machvec.h>
 #include <asm/io.h>
+#include <cpu/sh7203.h>
 
 static struct smc911x_platdata smc911x_info = {
        .flags          = SMC911X_USE_16BIT,
@@ -114,14 +117,54 @@ static void __init set_mtd_partitions(void)
        }
 }
 
+static struct gpio_led rsk7203_gpio_leds[] = {
+       {
+               .name                   = "green",
+               .gpio                   = GPIO_PE10,
+               .active_low             = 1,
+       }, {
+               .name                   = "orange",
+               .default_trigger        = "nand-disk",
+               .gpio                   = GPIO_PE12,
+               .active_low             = 1,
+       }, {
+               .name                   = "red:timer",
+               .default_trigger        = "timer",
+               .gpio                   = GPIO_PC14,
+               .active_low             = 1,
+       }, {
+               .name                   = "red:heartbeat",
+               .default_trigger        = "heartbeat",
+               .gpio                   = GPIO_PE11,
+               .active_low             = 1,
+       },
+};
+
+static struct gpio_led_platform_data rsk7203_gpio_leds_info = {
+       .leds           = rsk7203_gpio_leds,
+       .num_leds       = ARRAY_SIZE(rsk7203_gpio_leds),
+};
+
+static struct platform_device led_device = {
+       .name           = "leds-gpio",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &rsk7203_gpio_leds_info,
+       },
+};
 
 static struct platform_device *rsk7203_devices[] __initdata = {
        &smc911x_device,
        &flash_device,
+       &led_device,
 };
 
 static int __init rsk7203_devices_setup(void)
 {
+       /* Select pins for SCIF0 */
+       gpio_request(GPIO_FN_TXD0, NULL);
+       gpio_request(GPIO_FN_RXD0, NULL);
+
        set_mtd_partitions();
        return platform_add_devices(rsk7203_devices,
                                    ARRAY_SIZE(rsk7203_devices));