aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files-2.6.39/arch/mips
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-01-31 20:49:34 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-01-31 20:49:34 +0000
commit41bd6bd282aa75e357c9a4eaf27518726301b4dc (patch)
tree1b3c5ab6a43739951baeaa1652e02b1e281f84e0 /target/linux/ar71xx/files-2.6.39/arch/mips
parentc315ce403bad47c55f162805b258091a3b8164e5 (diff)
downloadupstream-41bd6bd282aa75e357c9a4eaf27518726301b4dc.tar.gz
upstream-41bd6bd282aa75e357c9a4eaf27518726301b4dc.tar.bz2
upstream-41bd6bd282aa75e357c9a4eaf27518726301b4dc.zip
ar71xx: fix ethernet LEDs on the WHR-{G301N,HP-G300N,HP-GN} boards
SVN-Revision: 29978
Diffstat (limited to 'target/linux/ar71xx/files-2.6.39/arch/mips')
-rw-r--r--target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-whr-hp-g300n.c47
1 files changed, 39 insertions, 8 deletions
diff --git a/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-whr-hp-g300n.c b/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-whr-hp-g300n.c
index ccc36507df..aaa8c1052b 100644
--- a/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-whr-hp-g300n.c
+++ b/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-whr-hp-g300n.c
@@ -24,14 +24,19 @@
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
-#define WHRHPG300N_GPIO_LED_SECURITY 0
-#define WHRHPG300N_GPIO_LED_DIAG 1
-#define WHRHPG300N_GPIO_LED_ROUTER 6
-
-#define WHRHPG300N_GPIO_BTN_ROUTER_ON 7
-#define WHRHPG300N_GPIO_BTN_ROUTER_AUTO 8
-#define WHRHPG300N_GPIO_BTN_RESET 11
-#define WHRHPG300N_GPIO_BTN_AOSS 12
+#define WHRHPG300N_GPIO_LED_SECURITY 0
+#define WHRHPG300N_GPIO_LED_DIAG 1
+#define WHRHPG300N_GPIO_LED_ROUTER 6
+
+#define WHRHPG300N_GPIO_BTN_ROUTER_ON 7
+#define WHRHPG300N_GPIO_BTN_ROUTER_AUTO 8
+#define WHRHPG300N_GPIO_BTN_RESET 11
+#define WHRHPG300N_GPIO_BTN_AOSS 12
+#define WHRHPG300N_GPIO_LED_LAN1 13
+#define WHRHPG300N_GPIO_LED_LAN2 14
+#define WHRHPG300N_GPIO_LED_LAN3 15
+#define WHRHPG300N_GPIO_LED_LAN4 16
+#define WHRHPG300N_GPIO_LED_WAN 17
#define WHRHPG300N_KEYS_POLL_INTERVAL 20 /* msecs */
#define WHRHPG300N_KEYS_DEBOUNCE_INTERVAL (3 * WHRHPG300N_KEYS_POLL_INTERVAL)
@@ -95,6 +100,26 @@ static struct gpio_led whrhpg300n_leds_gpio[] __initdata = {
.name = "buffalo:green:router",
.gpio = WHRHPG300N_GPIO_LED_ROUTER,
.active_low = 1,
+ }, {
+ .name = "buffalo:green:wan",
+ .gpio = WHRHPG300N_GPIO_LED_WAN,
+ .active_low = 1,
+ }, {
+ .name = "buffalo:green:lan1",
+ .gpio = WHRHPG300N_GPIO_LED_LAN1,
+ .active_low = 1,
+ }, {
+ .name = "buffalo:green:lan2",
+ .gpio = WHRHPG300N_GPIO_LED_LAN2,
+ .active_low = 1,
+ }, {
+ .name = "buffalo:green:lan3",
+ .gpio = WHRHPG300N_GPIO_LED_LAN3,
+ .active_low = 1,
+ }, {
+ .name = "buffalo:green:lan4",
+ .gpio = WHRHPG300N_GPIO_LED_LAN4,
+ .active_low = 1,
}
};
@@ -137,6 +162,12 @@ static void __init whrhpg300n_setup(void)
ar71xx_add_device_m25p80(&whrhpg300n_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(whrhpg300n_leds_gpio),
whrhpg300n_leds_gpio);