ar71xx: switch to 3.2.5
[openwrt.git] / target / linux / ar71xx / files-2.6.39 / arch / mips / ar71xx / mach-dir-600-a1.c
index e0da867..3b39b06 100644 (file)
@@ -1,7 +1,8 @@
 /*
  *  D-Link DIR-600 rev. A1 board support
  *
- *  Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
+ *  Copyright (C) 2010-2012 Gabor Juhos <juhosg@openwrt.org>
+ *  Copyright (C) 2012 Vadim Girlin <vadimgirlin@gmail.com>
  *
  *  This program is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License version 2 as published
 #define DIR_600_A1_GPIO_LED_WPS                        0
 #define DIR_600_A1_GPIO_LED_POWER_AMBER                1
 #define DIR_600_A1_GPIO_LED_POWER_GREEN                6
+#define DIR_600_A1_GPIO_LED_LAN1               13
+#define DIR_600_A1_GPIO_LED_LAN2               14
+#define DIR_600_A1_GPIO_LED_LAN3               15
+#define DIR_600_A1_GPIO_LED_LAN4               16
+#define DIR_600_A1_GPIO_LED_WAN_AMBER          7
+#define DIR_600_A1_GPIO_LED_WAN_GREEN          17
 
 #define DIR_600_A1_GPIO_BTN_RESET              8
 #define DIR_600_A1_GPIO_BTN_WPS                        12
@@ -85,6 +92,29 @@ static struct gpio_led dir_600_a1_leds_gpio[] __initdata = {
        }, {
                .name           = "d-link:amber:power",
                .gpio           = DIR_600_A1_GPIO_LED_POWER_AMBER,
+       }, {
+               .name           = "d-link:amber:wan",
+               .gpio           = DIR_600_A1_GPIO_LED_WAN_AMBER,
+       }, {
+               .name           = "d-link:green:wan",
+               .gpio           = DIR_600_A1_GPIO_LED_WAN_GREEN,
+               .active_low     = 1,
+       }, {
+               .name           = "d-link:green:lan1",
+               .gpio           = DIR_600_A1_GPIO_LED_LAN1,
+               .active_low     = 1,
+       }, {
+               .name           = "d-link:green:lan2",
+               .gpio           = DIR_600_A1_GPIO_LED_LAN2,
+               .active_low     = 1,
+       }, {
+               .name           = "d-link:green:lan3",
+               .gpio           = DIR_600_A1_GPIO_LED_LAN3,
+               .active_low     = 1,
+       }, {
+               .name           = "d-link:green:lan4",
+               .gpio           = DIR_600_A1_GPIO_LED_LAN4,
+               .active_low     = 1,
        }, {
                .name           = "d-link:blue:wps",
                .gpio           = DIR_600_A1_GPIO_LED_WPS,
@@ -126,6 +156,12 @@ static void __init dir_600_a1_setup(void)
 
        ar71xx_add_device_m25p80(&dir_600_a1_flash_data);
 
+       ar71xx_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
+                                    AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
+                                    AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
+                                    AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
+                                    AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
+
        ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(dir_600_a1_leds_gpio),
                                        dir_600_a1_leds_gpio);
 
@@ -149,3 +185,12 @@ static void __init dir_600_a1_setup(void)
 
 MIPS_MACHINE(AR71XX_MACH_DIR_600_A1, "DIR-600-A1", "D-Link DIR-600 rev. A1",
             dir_600_a1_setup);
+
+static void __init dir_615_e4_setup(void)
+{
+       dir_600_a1_setup();
+       ap91_pci_setup_wmac_led_pin(1);
+}
+
+MIPS_MACHINE(AR71XX_MACH_DIR_615_E4, "DIR-615-E4", "D-Link DIR-615 rev. E4",
+            dir_615_e4_setup);
This page took 0.029104 seconds and 4 git commands to generate.