Support for WA801ND v2 (AR9341, H/W clone of the WA830RE v2)
authorPiotr Dymacz <pepe2k@gmail.com>
Mon, 6 Jan 2014 21:48:30 +0000 (22:48 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Mon, 6 Jan 2014 21:48:30 +0000 (22:48 +0100)
Makefile
u-boot/Makefile
u-boot/board/ar7240/db12x/db12x.c
u-boot/cpu/mips/start_bootstrap.S

index b3e54ab1844603b45c5e0a2922a93a79e8b4e78e..bdd42009cac7060473e15c8bd8a3dc703da1ff6c 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -107,12 +107,12 @@ tplink_wr841n_v8:
        @cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
        @make show_size
 
-tplink_wa830re_v2:     export UBOOT_FILE_NAME=uboot_for_tp-link_tl-wa830re_v2
-tplink_wa830re_v2:     export MAX_UBOOT_SIZE=64
-tplink_wa830re_v2:     export COMPRESSED_UBOOT=1
-tplink_wa830re_v2:     export ETH_CONFIG=_s27
-tplink_wa830re_v2:
-       @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) wa830re_v2_config
+tplink_wa830re_v2_wa801nd_v2:  export UBOOT_FILE_NAME=uboot_for_tp-link_tl-wa830re_v2_tl-wa801nd_v2
+tplink_wa830re_v2_wa801nd_v2:  export MAX_UBOOT_SIZE=64
+tplink_wa830re_v2_wa801nd_v2:  export COMPRESSED_UBOOT=1
+tplink_wa830re_v2_wa801nd_v2:  export ETH_CONFIG=_s27
+tplink_wa830re_v2_wa801nd_v2:
+       @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) wa830re_v2_wa801nd_v2_config
        @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
        @cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
        @make show_size
index f782eafc024eef253ed9e1993462c4c77df9682d..37c5872e8fb2d21779fda76efd0126fc6d085bd1 100755 (executable)
@@ -529,25 +529,25 @@ wr841n_v8_config : unconfig wasp_common_config
 
        @./mkconfig -a db12x mips mips db12x ar7240 ar7240
 
-wa830re_v2_config : unconfig wasp_common_config
-       @echo '======= Configuring for TP-Link TL-WA830RE v2 at:' `date` '======='
-       @echo "#define CONFIG_FOR_TPLINK_WA830RE_V2         1" >> include/config.h
-       @echo "#define CONFIG_AP123                         1" >> include/config.h
-       @echo "#define DDR2_32BIT_SUPPORT                   1" >> include/config.h
-       @echo "#define CFG_ATHRS27_PHY                      1" >> include/config.h
-       @echo "#define CFG_AG7240_NMACS                     2" >> include/config.h
-       @echo "#define GPIO_SYS_LED_BIT                    14" >> include/config.h
-       @echo "#define GPIO_SYS_LED_ON                      0" >> include/config.h
-       @echo "#define GPIO_LAN_LED_BIT                    18" >> include/config.h
-       @echo "#define GPIO_LAN_LED_ON                      0" >> include/config.h
-       @echo "#define GPIO_WLAN_LED_BIT                   13" >> include/config.h
-       @echo "#define GPIO_WLAN_LED_ON                     0" >> include/config.h
-       @echo "#define GPIO_QSS_LED_BIT                    15" >> include/config.h
-       @echo "#define GPIO_QSS_LED_ON                      0" >> include/config.h
-       @echo "#define GPIO_RST_BUTTON_BIT                 17" >> include/config.h
-       @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW        1" >> include/config.h
-       @echo "#define DEFAULT_FLASH_SIZE_IN_MB             4" >> include/config.h
-       @echo "#define BOARD_CUSTOM_STRING                  \"AP123 (AR9341) U-Boot for TL-WA830RE v2\"" >> include/config.h
+wa830re_v2_wa801nd_v2_config : unconfig wasp_common_config
+       @echo '======= Configuring for TP-Link TL-WA830RE/TL-WA801ND v2 at:' `date` '======='
+       @echo "#define CONFIG_FOR_TPLINK_WA830RE_V2_WA801ND_V2 1" >> include/config.h
+       @echo "#define CONFIG_AP123                            1" >> include/config.h
+       @echo "#define DDR2_32BIT_SUPPORT                      1" >> include/config.h
+       @echo "#define CFG_ATHRS27_PHY                         1" >> include/config.h
+       @echo "#define CFG_AG7240_NMACS                        2" >> include/config.h
+       @echo "#define GPIO_SYS_LED_BIT                       14" >> include/config.h
+       @echo "#define GPIO_SYS_LED_ON                         0" >> include/config.h
+       @echo "#define GPIO_LAN_LED_BIT                       18" >> include/config.h
+       @echo "#define GPIO_LAN_LED_ON                         0" >> include/config.h
+       @echo "#define GPIO_WLAN_LED_BIT                      13" >> include/config.h
+       @echo "#define GPIO_WLAN_LED_ON                        0" >> include/config.h
+       @echo "#define GPIO_QSS_LED_BIT                       15" >> include/config.h
+       @echo "#define GPIO_QSS_LED_ON                         0" >> include/config.h
+       @echo "#define GPIO_RST_BUTTON_BIT                    17" >> include/config.h
+       @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW           1" >> include/config.h
+       @echo "#define DEFAULT_FLASH_SIZE_IN_MB                4" >> include/config.h
+       @echo "#define BOARD_CUSTOM_STRING                     \"AP123 (AR9341) U-Boot for TL-WA830RE/TL-WA801ND v2\"" >> include/config.h
 
        @./mkconfig -a db12x mips mips db12x ar7240 ar7240
 
index 39339724f4b863e8b9ab074d3ea043be89e38f19..652f98a1063444491c40f531f2ad1a9634726340 100755 (executable)
@@ -18,7 +18,7 @@ void led_toggle(void){
 \r
 #if defined(CONFIG_FOR_TPLINK_WDR3600_WDR43X0_V1) || \\r
        defined(CONFIG_FOR_TPLINK_WR841N_V8) || \\r
-       defined(CONFIG_FOR_TPLINK_WA830RE_V2)\r
+       defined(CONFIG_FOR_TPLINK_WA830RE_V2_WA801ND_V2)\r
        gpio ^= 1 << GPIO_SYS_LED_BIT;\r
 #else\r
        #error "Custom GPIO in leg_toggle() not defined!"\r
@@ -47,7 +47,7 @@ void all_led_on(void){
        SETBITVAL(gpio, GPIO_LAN3_LED_BIT,     GPIO_LAN3_LED_ON);\r
        SETBITVAL(gpio, GPIO_LAN4_LED_BIT,     GPIO_LAN4_LED_ON);\r
        SETBITVAL(gpio, GPIO_QSS_LED_BIT,      GPIO_QSS_LED_ON);\r
-#elif defined(CONFIG_FOR_TPLINK_WA830RE_V2)\r
+#elif defined(CONFIG_FOR_TPLINK_WA830RE_V2_WA801ND_V2)\r
        SETBITVAL(gpio, GPIO_SYS_LED_BIT,      GPIO_SYS_LED_ON);\r
        SETBITVAL(gpio, GPIO_LAN_LED_BIT,      GPIO_LAN_LED_ON);\r
        SETBITVAL(gpio, GPIO_WLAN_LED_BIT,     GPIO_WLAN_LED_ON);\r
@@ -79,7 +79,7 @@ void all_led_off(void){
        SETBITVAL(gpio, GPIO_LAN3_LED_BIT,     !GPIO_LAN3_LED_ON);\r
        SETBITVAL(gpio, GPIO_LAN4_LED_BIT,     !GPIO_LAN4_LED_ON);\r
        SETBITVAL(gpio, GPIO_QSS_LED_BIT,      !GPIO_QSS_LED_ON);\r
-#elif defined(CONFIG_FOR_TPLINK_WA830RE_V2)\r
+#elif defined(CONFIG_FOR_TPLINK_WA830RE_V2_WA801ND_V2)\r
        SETBITVAL(gpio, GPIO_SYS_LED_BIT,      !GPIO_SYS_LED_ON);\r
        SETBITVAL(gpio, GPIO_LAN_LED_BIT,      !GPIO_LAN_LED_ON);\r
        SETBITVAL(gpio, GPIO_WLAN_LED_BIT,     !GPIO_WLAN_LED_ON);\r
index 4cd85b68a6cd9b20b9c58cab5a846f5889fa6b45..4e6b2a5f1157da7f8b70c3ecf3e21fab8faf4d0c 100755 (executable)
@@ -297,7 +297,7 @@ reset:
        li      v1, 0x3CF000
        sw      v1, 0(a1)
 
-#elif defined(CONFIG_FOR_TPLINK_WA830RE_V2)
+#elif defined(CONFIG_FOR_TPLINK_WA830RE_V2_WA801ND_V2)
        /*
         * LED's/Reset GPIOs on WR841N/D v8:
         *