ar71xx: fix ath9k default LED changes fallout
[openwrt/staging/lynxis/omap.git] / target / linux / ar71xx / files / arch / mips / ath79 / mach-wzr-hp-g300nh2.c
index 6ccafcb49d76ced960df31c7a0b6efa17b9bd7e1..c44a9cf7708750b5fc6a421db168d71e87fb8cf1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  Buffalo WZR-HP-G300NH2 board support
  *
- *  Copyright (C) 2011 Felix Fietkau <nbd@openwrt.org>
+ *  Copyright (C) 2011 Felix Fietkau <nbd@nbd.name>
  *  Copyright (C) 2011 Mark Deneen <mdeneen@gmail.com>
  *
  *  This program is free software; you can redistribute it and/or modify it
@@ -44,22 +44,14 @@ static struct mtd_partition wzrhpg300nh2_flash_partitions[] = {
                .size           = 0x0010000,
                .mask_flags     = MTD_WRITEABLE,
        }, {
-               .name           = "kernel",
+               .name           = "firmware",
                .offset         = 0x0060000,
-               .size           = 0x0100000,
-       }, {
-               .name           = "rootfs",
-               .offset         = 0x0160000,
-               .size           = 0x1e90000,
+               .size           = 0x1f90000,
        }, {
                .name           = "user_property",
                .offset         = 0x1ff0000,
                .size           = 0x0010000,
                .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "firmware",
-               .offset         = 0x0060000,
-               .size           = 0x1f90000,
        }
 };
 
@@ -82,6 +74,11 @@ static struct gpio_led wzrhpg300nh2_wmac_leds_gpio[] = {
                .gpio           = 4,
                .active_low     = 1,
        },
+       {
+               .name           = "buffalo:green:wireless",
+               .gpio           = 5,
+               .active_low     = 1,
+       },
        {
                .name           = "buffalo:orange:security",
                .gpio           = 6,
@@ -156,17 +153,17 @@ static void __init wzrhpg300nh2_setup(void)
        ath79_eth0_data.phy_mask = BIT(0);
 
        ath79_register_eth(0);
-       ath79_register_usb();
+
        /* gpio13 is usb power.  Turn it on. */
-       gpio_request(13, "usb");
-       gpio_direction_output(13, 1);
+       gpio_request_one(13, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+                        "USB power");
+       ath79_register_usb();
 
        ath79_register_leds_gpio(-1, ARRAY_SIZE(wzrhpg300nh2_leds_gpio),
                                 wzrhpg300nh2_leds_gpio);
        ath79_register_gpio_keys_polled(-1, WZRHPG300NH2_KEYS_POLL_INTERVAL,
                                        ARRAY_SIZE(wzrhpg300nh2_gpio_keys),
                                        wzrhpg300nh2_gpio_keys);
-       ap9x_pci_setup_wmac_led_pin(0, 5);
        ap9x_pci_setup_wmac_leds(0, wzrhpg300nh2_wmac_leds_gpio,
                                ARRAY_SIZE(wzrhpg300nh2_wmac_leds_gpio));