aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-01-04 17:30:50 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-01-04 17:30:50 +0000
commit90bfef9ec9391387afecb46d5e242c28a497812a (patch)
treece8531e0a661d0f22a87214f41f7fc275e474673 /target/linux/ar71xx
parent5eb502d9c1b15ed231ada81f380f8f7e04028b18 (diff)
downloadupstream-90bfef9ec9391387afecb46d5e242c28a497812a.tar.gz
upstream-90bfef9ec9391387afecb46d5e242c28a497812a.tar.bz2
upstream-90bfef9ec9391387afecb46d5e242c28a497812a.zip
ar71xx: allow to use LAN LED on the TL-WA901N/ND boards
SVN-Revision: 29653
Diffstat (limited to 'target/linux/ar71xx')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/uci-defaults/leds4
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c11
2 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/leds b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
index afa9abb1e3..f3b67a391e 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
@@ -145,6 +145,10 @@ tl-mr3420 )
set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
;;
+tl-wa901nd)
+ set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
+ ;;
+
tl-wr741nd)
set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x02"
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c
index 7bc666a9f9..056f35ab75 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c
@@ -20,6 +20,7 @@
#define TL_WA901ND_GPIO_LED_QSS 0
#define TL_WA901ND_GPIO_LED_SYSTEM 1
+#define TL_WA901ND_GPIO_LED_LAN 13
#define TL_WA901ND_GPIO_BTN_RESET 11
#define TL_WA901ND_GPIO_BTN_QSS 12
@@ -38,6 +39,10 @@ static struct flash_platform_data tl_wa901nd_flash_data = {
static struct gpio_led tl_wa901nd_leds_gpio[] __initdata = {
{
+ .name = "tp-link:green:lan",
+ .gpio = TL_WA901ND_GPIO_LED_LAN,
+ .active_low = 1,
+ }, {
.name = "tp-link:green:system",
.gpio = TL_WA901ND_GPIO_LED_SYSTEM,
.active_low = 1,
@@ -71,6 +76,12 @@ static void __init tl_wa901nd_setup(void)
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+ 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_eth0 would be the WAN port, but is not connected on
* the TL-WA901ND. ar71xx_eth1 connects to the internal switch chip,