ar71xx: add support for Buffalo WZR 600DHP
authorLuka Perkov <luka@openwrt.org>
Fri, 1 Mar 2013 13:46:01 +0000 (13:46 +0000)
committerLuka Perkov <luka@openwrt.org>
Fri, 1 Mar 2013 13:46:01 +0000 (13:46 +0000)
Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 35840

21 files changed:
package/boot/uboot-envtools/files/ar71xx
target/linux/ar71xx/base-files/etc/diag.sh
target/linux/ar71xx/base-files/etc/hotplug.d/net/10-ar922x-led-fix
target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
target/linux/ar71xx/base-files/etc/uci-defaults/02_network
target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
target/linux/ar71xx/base-files/lib/ar71xx.sh
target/linux/ar71xx/base-files/lib/upgrade/platform.sh
target/linux/ar71xx/config-3.7
target/linux/ar71xx/config-3.8
target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-ag300h.c
target/linux/ar71xx/generic/profiles/buffalo.mk
target/linux/ar71xx/image/Makefile
target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch
target/linux/ar71xx/patches-3.7/612-MIPS-ath79-add-DIR-825-C1-support.patch
target/linux/ar71xx/patches-3.7/613-MIPS-ath79-add-TL-WDR3500-support.patch
target/linux/ar71xx/patches-3.7/615-MIPS-ath79-RB951G-support.patch
target/linux/ar71xx/patches-3.8/610-MIPS-ath79-openwrt-machines.patch
target/linux/ar71xx/patches-3.8/612-MIPS-ath79-add-DIR-825-C1-support.patch
target/linux/ar71xx/patches-3.8/613-MIPS-ath79-add-TL-WDR3500-support.patch
target/linux/ar71xx/patches-3.8/615-MIPS-ath79-RB951G-support.patch

index 124cfb6e2e3dfa123b0407bcf5c5477943d69dc8..03549fad1e1515cf9fdc440a929a5395a59525a2 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2011-2012 OpenWrt.org
+# Copyright (C) 2011-2013 OpenWrt.org
 #
 
 [ -e /etc/config/ubootenv ] && exit 0
@@ -27,6 +27,10 @@ om2p-hs | \
 om2p-lc)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
        ;;
+wzr-hp-ag300h | \
+wzr-600dhp)
+       ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
+       ;;
 esac
 
 config_load ubootenv
index adf32f12fb504955265baef671f3b462eb789db5..c863b21a81f8a18b40a2b090fe02b1f711389286 100755 (executable)
@@ -152,7 +152,8 @@ get_status_led() {
                status_led="buffalo:green:status"
                ;;
        wzr-hp-ag300h | \
-       wzr-hp-g300nh2)
+       wzr-hp-g300nh2 | \
+       wzr-600dhp)
                status_led="buffalo:red:diag"
                ;;
        wndr3700)
index 102415009bc2e8352f1fa1d90645f6d97cdf6258..6a7f521afa11a3cd5a83d1388d224fad1a8bc0d2 100644 (file)
@@ -42,7 +42,8 @@ if [ $phyname -a $ACTION = "add" ]; then
        . /lib/ar71xx.sh
        
        case $(ar71xx_board_name) in
-               wzr-hp-ag300h)
+               wzr-hp-ag300h|\
+               wzr-600dhp)
                        ar922x_disable_gpio_jtag $phyname
                        ;;
        esac;
index 392439385b94fd3d1878bb4d61ef659b28926179..3e54d64d03656f890cb8a2dff9f2568afe67a92d 100755 (executable)
@@ -212,7 +212,8 @@ wlae-ag300n)
        ucidef_set_led_netdev "wireless" "WIRELESS" "buffalo:green:wireless" "wlan0"
        ;;
 
-wzr-hp-ag300h)
+wzr-hp-ag300h | \
+wzr-600dhp)
        ucidef_set_led_default "diag" "DIAG" "buffalo:red:diag" "0"
        ucidef_set_led_netdev "router" "ROUTER" "buffalo:green:router" "eth1"
        ucidef_set_led_usbdev "usb" "USB" "buffalo:green:usb" "1-1"
index b1f84da605506696ce41886177a51c6aaa0f8c58..15a1d39ac4e9b1598eafec095b9956423d303e50 100755 (executable)
@@ -233,7 +233,8 @@ tl-wr841n-v7 |\
 whr-g301n |\
 whr-hp-g300n |\
 whr-hp-gn |\
-wzr-hp-ag300h)
+wzr-hp-ag300h |\
+wzr-600dhp)
        ucidef_set_interfaces_lan_wan "eth0" "eth1"
        ucidef_add_switch "switch0" "1" "1"
        ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
index 718a924f1918bf56b77ab7392c676a2d3a96772a..8757b21a80818ffa923cc460714c58d645770e88 100755 (executable)
@@ -75,6 +75,7 @@ whr-hp-g300n|\
 whr-hp-gn|\
 wzr-hp-ag300h|\
 wzr-hp-g450h|\
+wzr-600dhp|\
 ew-dorin|\
 ew-dorin-router)
        migrate_switch_name "eth0" "switch0"
index 71bf58e05bc372226cb673489356557736a1aadc..84751e8b190063ce584d648515ab7e8ab7c343e5 100755 (executable)
@@ -468,6 +468,9 @@ ar71xx_board_detect() {
        *WZR-HP-G300NH2)
                name="wzr-hp-g300nh2"
                ;;
+       *WZR-600DHP)
+               name="wzr-600dhp"
+               ;;
        *WHR-HP-G300N)
                name="whr-hp-g300n"
                ;;
index c16d184e7388ecee29f1d80ad75bd09c36e5f384..d3e14d16ad16a9a58acb6c9fceb1b7f7e24c3785 100755 (executable)
@@ -125,6 +125,7 @@ platform_check_image() {
        wzr-hp-g300nh | \
        wzr-hp-g450h | \
        wzr-hp-ag300h | \
+       wzr-600dhp | \
        whr-g301n | \
        whr-hp-g300n | \
        whr-hp-gn | \
index 98f099623dc44042f1a1445f713d6add10f14e92..7e07a957f7ac89555f90489cb00e752093448ad9 100644 (file)
@@ -92,6 +92,7 @@ CONFIG_ATH79_MACH_WZR_HP_AG300H=y
 CONFIG_ATH79_MACH_WZR_HP_G300NH=y
 CONFIG_ATH79_MACH_WZR_HP_G300NH2=y
 CONFIG_ATH79_MACH_WZR_HP_G450H=y
+CONFIG_ATH79_MACH_WZR_600DHP=y
 CONFIG_ATH79_MACH_ZCN_1523H=y
 CONFIG_ATH79_NVRAM=y
 CONFIG_ATH79_PCI_ATH9K_FIXUP=y
index 847b9a50342f848f1a9dc961fba183d1c237c75d..898236e295cbcc7f5e9e8bd7845ad5097d0194ae 100644 (file)
@@ -92,6 +92,7 @@ CONFIG_ATH79_MACH_WZR_HP_AG300H=y
 CONFIG_ATH79_MACH_WZR_HP_G300NH=y
 CONFIG_ATH79_MACH_WZR_HP_G300NH2=y
 CONFIG_ATH79_MACH_WZR_HP_G450H=y
+CONFIG_ATH79_MACH_WZR_600DHP=y
 CONFIG_ATH79_MACH_ZCN_1523H=y
 CONFIG_ATH79_NVRAM=y
 CONFIG_ATH79_PCI_ATH9K_FIXUP=y
index a7068e15542e1d68054c302e05bdc58de964a1b5..aa035c81b1e3fe47cbeb3e7d2624ff66fdbf10ff 100644 (file)
@@ -36,7 +36,6 @@ static struct mtd_partition wzrhpag300h_flash_partitions[] = {
                .name           = "u-boot-env",
                .offset         = 0x0040000,
                .size           = 0x0010000,
-               .mask_flags     = MTD_WRITEABLE,
        }, {
                .name           = "art",
                .offset         = 0x0050000,
@@ -212,3 +211,6 @@ static void __init wzrhpag300h_setup(void)
 MIPS_MACHINE(ATH79_MACH_WZR_HP_AG300H, "WZR-HP-AG300H",
             "Buffalo WZR-HP-AG300H", wzrhpag300h_setup);
 
+MIPS_MACHINE(ATH79_MACH_WZR_600DHP, "WZR-600DHP",
+            "Buffalo WZR-600DHP", wzrhpag300h_setup);
+
index 887be265710a6ff140314690067c89d46fd8b86f..80e71921065b4da15502d1e91ab37dec93898636 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2013 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -49,6 +49,17 @@ endef
 
 $(eval $(call Profile,WZRHPG450H))
 
+define Profile/WZR600DHP
+       NAME:=Buffalo WZR-600DHP
+       PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
+endef
+
+define Profile/WZR600DHP/Description
+       Package set optimized for the Buffalo WZR-600DHP
+endef
+
+$(eval $(call Profile,WZR600DHP))
+
 define Profile/WHRG301N
        NAME:=Buffalo WHR-G301N
        PACKAGES:=
index 1d39e25529e6e85663096e6dcbd0680cc4ed8018..a34828cfadafb89a936007fca7a6b46af2406d3a 100644 (file)
@@ -960,6 +960,7 @@ $(eval $(call SingleProfile,WZRHPG30XNH,$(fs_128k),WZRHPG300NH,wzr-hp-g300nh,WZR
 $(eval $(call SingleProfile,WZRHPG30XNH,$(fs_64k),WZRHPG300NH2,wzr-hp-g300nh2,WZR-HP-G300NH2,ttyS0,115200,WZR-HP-G300NH2))
 $(eval $(call SingleProfile,WZRHPG30XNH,$(fs_64k),WZRHPAG300H,wzr-hp-ag300h,WZR-HP-AG300H,ttyS0,115200,WZR-HP-AG300H))
 $(eval $(call SingleProfile,WZRHPG30XNH,$(fs_64k),WZRHPG450H,wzr-hp-g450h,WZR-HP-G450H,ttyS0,115200,WZR-HP-AG450H))
+$(eval $(call SingleProfile,WZRHPG30XNH,$(fs_64k),WZR600DHP,wzr-600dhp,WZR-600DHP,ttyS0,115200,WZR-600DHP))
 
 $(eval $(call SingleProfile,Zcomax,$(fs_64k),ZCN1523H28,zcn-1523h-2-8,ZCN-1523H-2,ttyS0,115200,$$(zcn1523h_mtdlayout)))
 $(eval $(call SingleProfile,Zcomax,$(fs_64k),ZCN1523H516,zcn-1523h-5-16,ZCN-1523H-5,ttyS0,115200,$$(zcn1523h_mtdlayout)))
index 73253bb5ab7740dc32e71df87da7bcdfc192ed88..bdf8c2be2360721034d093c68a3d96853c5d8cdd 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/machtypes.h
 +++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,112 @@
+@@ -16,22 +16,113 @@
  
  enum ath79_mach_type {
        ATH79_MACH_GENERIC = 0,
 +      ATH79_MACH_WZR_HP_G300NH,       /* Buffalo WZR-HP-G300NH */
 +      ATH79_MACH_WZR_HP_G300NH2,      /* Buffalo WZR-HP-G300NH2 */
 +      ATH79_MACH_WZR_HP_G450H,        /* Buffalo WZR-HP-G450H */
++      ATH79_MACH_WZR_600DHP,          /* Buffalo WZR-600DHP */
 +      ATH79_MACH_ZCN_1523H_2,         /* Zcomax ZCN-1523H-2-xx */
 +      ATH79_MACH_ZCN_1523H_5,         /* Zcomax ZCN-1523H-5-xx */
  };
  config ATH79_MACH_PB44
        bool "Atheros PB44 reference board"
        select SOC_AR71XX
-@@ -68,6 +148,488 @@ config ATH79_MACH_PB44
+@@ -68,6 +148,497 @@ config ATH79_MACH_PB44
          Say 'Y' here if you want your kernel to support the
          Atheros PB44 reference board.
  
 +      select ATH79_DEV_M25P80
 +      select ATH79_DEV_USB
 +
++config ATH79_MACH_WZR_600DHP
++      bool "Buffalo WZR-600DHP board support"
++      select SOC_AR71XX
++      select ATH79_DEV_ETH
++      select ATH79_DEV_GPIO_BUTTONS
++      select ATH79_DEV_LEDS_GPIO
++      select ATH79_DEV_M25P80
++      select ATH79_DEV_USB
++
 +config ATH79_MACH_WP543
 +      bool "Compex WP543/WPJ543 board support"
 +      select SOC_AR71XX
  config ATH79_MACH_UBNT_XM
        bool "Ubiquiti Networks XM/UniFi boards"
        select SOC_AR724X
-@@ -83,6 +645,24 @@ config ATH79_MACH_UBNT_XM
+@@ -83,6 +654,24 @@ config ATH79_MACH_UBNT_XM
          Say 'Y' here if you want your kernel to support the
          Ubiquiti Networks XM (rev 1.0) board.
  
  endmenu
  
  config SOC_AR71XX
-@@ -118,10 +698,6 @@ config SOC_QCA955X
+@@ -118,10 +707,6 @@ config SOC_QCA955X
        select PCI_AR724X if PCI
        def_bool n
  
  config ATH79_DEV_AP9X_PCI
        select ATH79_PCI_ATH9K_FIXUP
        def_bool n
-@@ -132,7 +708,14 @@ config ATH79_DEV_DSA
+@@ -132,7 +717,14 @@ config ATH79_DEV_DSA
  config ATH79_DEV_ETH
        def_bool n
  
        def_bool n
  
  config ATH79_DEV_GPIO_BUTTONS
-@@ -164,4 +747,7 @@ config ATH79_PCI_ATH9K_FIXUP
+@@ -164,4 +756,7 @@ config ATH79_PCI_ATH9K_FIXUP
  config ATH79_ROUTERBOOT
        def_bool n
  
  endif
 --- a/arch/mips/ath79/Makefile
 +++ b/arch/mips/ath79/Makefile
-@@ -38,9 +38,71 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)              += route
+@@ -38,9 +38,72 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)              += route
  #
  # Machines
  #
 +obj-$(CONFIG_ATH79_MACH_WZR_HP_G300NH2)       += mach-wzr-hp-g300nh2.o
 +obj-$(CONFIG_ATH79_MACH_WZR_HP_AG300H)        += mach-wzr-hp-ag300h.o
 +obj-$(CONFIG_ATH79_MACH_WZR_HP_G450H) += mach-wzr-hp-g450h.o
++obj-$(CONFIG_ATH79_MACH_WZR_600DHP)   += mach-wzr-hp-ag300h.o
 +obj-$(CONFIG_ATH79_MACH_ZCN_1523H)    += mach-zcn-1523h.o
 +
 --- a/arch/mips/ath79/prom.c
index 5d6f5cb226f99e092602f1e1ea1f8d42e1c1d9cb..5722ed1fb6f60db5b546639593b71c102a7894d3 100644 (file)
@@ -10,7 +10,7 @@
        ATH79_MACH_EAP7660D,            /* Senao EAP7660D */
 --- a/arch/mips/ath79/Kconfig
 +++ b/arch/mips/ath79/Kconfig
-@@ -283,6 +283,17 @@ config ATH79_MACH_DIR_825_B1
+@@ -292,6 +292,17 @@ config ATH79_MACH_DIR_825_B1
        select ATH79_DEV_M25P80
        select ATH79_DEV_USB
  
index 0a2c3bda51f898c42b4ea1ea249936ea21f4ea17..cc60e78e43c0a77377e381313f41045d6499c204 100644 (file)
@@ -10,7 +10,7 @@
        ATH79_MACH_TL_WR1043ND,         /* TP-LINK TL-WR1043ND */
 --- a/arch/mips/ath79/Kconfig
 +++ b/arch/mips/ath79/Kconfig
-@@ -514,6 +514,17 @@ config ATH79_MACH_TL_WA901ND_V2
+@@ -523,6 +523,17 @@ config ATH79_MACH_TL_WA901ND_V2
        select ATH79_DEV_M25P80
        select ATH79_DEV_WMAC
  
index e679717366ff144553ad5534f9bc298db0c0cfda..07bf8867934695b801ac0015457c03b35afb829e 100644 (file)
@@ -10,7 +10,7 @@
        ATH79_MACH_RW2458N,             /* Redwave RW2458N */
 --- a/arch/mips/ath79/Kconfig
 +++ b/arch/mips/ath79/Kconfig
-@@ -360,6 +360,16 @@ config ATH79_MACH_RB750
+@@ -369,6 +369,16 @@ config ATH79_MACH_RB750
        select ATH79_ROUTERBOOT
        select RLE_DECOMPRESS
  
index 73253bb5ab7740dc32e71df87da7bcdfc192ed88..bdf8c2be2360721034d093c68a3d96853c5d8cdd 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/machtypes.h
 +++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,112 @@
+@@ -16,22 +16,113 @@
  
  enum ath79_mach_type {
        ATH79_MACH_GENERIC = 0,
 +      ATH79_MACH_WZR_HP_G300NH,       /* Buffalo WZR-HP-G300NH */
 +      ATH79_MACH_WZR_HP_G300NH2,      /* Buffalo WZR-HP-G300NH2 */
 +      ATH79_MACH_WZR_HP_G450H,        /* Buffalo WZR-HP-G450H */
++      ATH79_MACH_WZR_600DHP,          /* Buffalo WZR-600DHP */
 +      ATH79_MACH_ZCN_1523H_2,         /* Zcomax ZCN-1523H-2-xx */
 +      ATH79_MACH_ZCN_1523H_5,         /* Zcomax ZCN-1523H-5-xx */
  };
  config ATH79_MACH_PB44
        bool "Atheros PB44 reference board"
        select SOC_AR71XX
-@@ -68,6 +148,488 @@ config ATH79_MACH_PB44
+@@ -68,6 +148,497 @@ config ATH79_MACH_PB44
          Say 'Y' here if you want your kernel to support the
          Atheros PB44 reference board.
  
 +      select ATH79_DEV_M25P80
 +      select ATH79_DEV_USB
 +
++config ATH79_MACH_WZR_600DHP
++      bool "Buffalo WZR-600DHP board support"
++      select SOC_AR71XX
++      select ATH79_DEV_ETH
++      select ATH79_DEV_GPIO_BUTTONS
++      select ATH79_DEV_LEDS_GPIO
++      select ATH79_DEV_M25P80
++      select ATH79_DEV_USB
++
 +config ATH79_MACH_WP543
 +      bool "Compex WP543/WPJ543 board support"
 +      select SOC_AR71XX
  config ATH79_MACH_UBNT_XM
        bool "Ubiquiti Networks XM/UniFi boards"
        select SOC_AR724X
-@@ -83,6 +645,24 @@ config ATH79_MACH_UBNT_XM
+@@ -83,6 +654,24 @@ config ATH79_MACH_UBNT_XM
          Say 'Y' here if you want your kernel to support the
          Ubiquiti Networks XM (rev 1.0) board.
  
  endmenu
  
  config SOC_AR71XX
-@@ -118,10 +698,6 @@ config SOC_QCA955X
+@@ -118,10 +707,6 @@ config SOC_QCA955X
        select PCI_AR724X if PCI
        def_bool n
  
  config ATH79_DEV_AP9X_PCI
        select ATH79_PCI_ATH9K_FIXUP
        def_bool n
-@@ -132,7 +708,14 @@ config ATH79_DEV_DSA
+@@ -132,7 +717,14 @@ config ATH79_DEV_DSA
  config ATH79_DEV_ETH
        def_bool n
  
        def_bool n
  
  config ATH79_DEV_GPIO_BUTTONS
-@@ -164,4 +747,7 @@ config ATH79_PCI_ATH9K_FIXUP
+@@ -164,4 +756,7 @@ config ATH79_PCI_ATH9K_FIXUP
  config ATH79_ROUTERBOOT
        def_bool n
  
  endif
 --- a/arch/mips/ath79/Makefile
 +++ b/arch/mips/ath79/Makefile
-@@ -38,9 +38,71 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)              += route
+@@ -38,9 +38,72 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)              += route
  #
  # Machines
  #
 +obj-$(CONFIG_ATH79_MACH_WZR_HP_G300NH2)       += mach-wzr-hp-g300nh2.o
 +obj-$(CONFIG_ATH79_MACH_WZR_HP_AG300H)        += mach-wzr-hp-ag300h.o
 +obj-$(CONFIG_ATH79_MACH_WZR_HP_G450H) += mach-wzr-hp-g450h.o
++obj-$(CONFIG_ATH79_MACH_WZR_600DHP)   += mach-wzr-hp-ag300h.o
 +obj-$(CONFIG_ATH79_MACH_ZCN_1523H)    += mach-zcn-1523h.o
 +
 --- a/arch/mips/ath79/prom.c
index 5d6f5cb226f99e092602f1e1ea1f8d42e1c1d9cb..5722ed1fb6f60db5b546639593b71c102a7894d3 100644 (file)
@@ -10,7 +10,7 @@
        ATH79_MACH_EAP7660D,            /* Senao EAP7660D */
 --- a/arch/mips/ath79/Kconfig
 +++ b/arch/mips/ath79/Kconfig
-@@ -283,6 +283,17 @@ config ATH79_MACH_DIR_825_B1
+@@ -292,6 +292,17 @@ config ATH79_MACH_DIR_825_B1
        select ATH79_DEV_M25P80
        select ATH79_DEV_USB
  
index 0a2c3bda51f898c42b4ea1ea249936ea21f4ea17..cc60e78e43c0a77377e381313f41045d6499c204 100644 (file)
@@ -10,7 +10,7 @@
        ATH79_MACH_TL_WR1043ND,         /* TP-LINK TL-WR1043ND */
 --- a/arch/mips/ath79/Kconfig
 +++ b/arch/mips/ath79/Kconfig
-@@ -514,6 +514,17 @@ config ATH79_MACH_TL_WA901ND_V2
+@@ -523,6 +523,17 @@ config ATH79_MACH_TL_WA901ND_V2
        select ATH79_DEV_M25P80
        select ATH79_DEV_WMAC
  
index e679717366ff144553ad5534f9bc298db0c0cfda..07bf8867934695b801ac0015457c03b35afb829e 100644 (file)
@@ -10,7 +10,7 @@
        ATH79_MACH_RW2458N,             /* Redwave RW2458N */
 --- a/arch/mips/ath79/Kconfig
 +++ b/arch/mips/ath79/Kconfig
-@@ -360,6 +360,16 @@ config ATH79_MACH_RB750
+@@ -369,6 +369,16 @@ config ATH79_MACH_RB750
        select ATH79_ROUTERBOOT
        select RLE_DECOMPRESS