[OpenWrt-Devel] [PATCH] [ipq806x] enable hard float

2016-04-05 Thread Adrian Panella

Author: Adrian Panella 

Date: Tue Apr 5 21:45:14 2016 -0500

IPQ806X: enable hard float

tested with Linksys EA8500

Signed-off-by: Adrian Panella 

diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile

index 97a40cf..689ba64 100644

--- a/target/linux/ipq806x/Makefile

+++ b/target/linux/ipq806x/Makefile

@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk

ARCH:=arm

BOARD:=ipq806x

BOARDNAME:=Qualcomm Atheros IPQ806X

-FEATURES:=squashfs nand ubifs

+FEATURES:=squashfs nand ubifs fpu

CPU_TYPE:=cortex-a9

CPU_SUBTYPE:=neon-vfpv4

MAINTAINER:=John Crispin 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: add TP-Link TL-WA901ND-v4 support

2016-04-05 Thread Tiziano Bacocco
Signed-off-by: Tiziano Bacocco 
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   5 +-
 .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |   9 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../files/arch/mips/ath79/mach-tl-wa901nd-v4.c | 112 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/Makefile |  10 +-
 tools/firmware-utils/src/mktplinkfw.c  |   6 ++
 12 files changed, 149 insertions(+), 2 deletions(-)
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 708ebb9..1958964 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -620,7 +620,10 @@ tl-wa901nd-v3)
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
;;
-
+tl-wa901nd-v4)
+   ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
+   ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
+   ;;
 tl-wr941nd | \
 tl-wr1041n-v2)
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index bd488a2..19893ee 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -364,6 +364,7 @@ tl-wa801nd-v2 |\
 tl-wa901nd |\
 tl-wa901nd-v2 |\
 tl-wa901nd-v3 |\
+tl-wa901nd-v4 |\
 tl-wr703n |\
 tube2h |\
 unifiac |\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index a2251d1..0389f6e 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -301,6 +301,7 @@ get_status_led() {
tl-wa901nd | \
tl-wa901nd-v2 | \
tl-wa901nd-v3 | \
+   tl-wa901nd-v4 | \
tl-wdr3320-v2 | \
tl-wdr3500 | \
tl-wr1041n-v2 | \
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 6b8550a..1f7f45a 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -859,6 +859,9 @@ ar71xx_board_detect() {
*"TL-WA901ND v3")
name="tl-wa901nd-v3"
;;
+   *"TL-WA901ND v4")
+   name="tl-wa901nd-v4"
+   ;;
*"TL-WDR3320 v2")
name="tl-wdr3320-v2"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 923e02b..b214829 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -363,6 +363,7 @@ platform_check_image() {
tl-wa901nd | \
tl-wa901nd-v2 | \
tl-wa901nd-v3 | \
+   tl-wa901nd-v4 | \
tl-wdr3320-v2 | \
tl-wdr3500 | \
tl-wdr4300 | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index d6ad850..4edb49e 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -141,6 +141,7 @@ CONFIG_ATH79_MACH_TL_WA801ND_V3=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
+CONFIG_ATH79_MACH_TL_WA901ND_V4=y
 CONFIG_ATH79_MACH_TL_WAX50RE=y
 CONFIG_ATH79_MACH_TL_WDR3320_V2=y
 CONFIG_ATH79_MACH_TL_WDR3500=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index f47f1b9..566b2a6 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1153,6 +1153,15 @@ config ATH79_MACH_TL_WA901ND_V2
select ATH79_DEV_M25P80
select ATH79_DEV_WMAC
 
+config ATH79_MACH_TL_WA901ND_V4
+   bool "TP-LINK TL-WA901ND v4 support"
+   select SOC_QCA956X
+   select ATH79_DEV_ETH
+   select ATH79_DEV_GPIO_BUTTONS
+   select ATH79_DEV_LEDS_GPIO
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_WMAC
+
 config ATH79_MACH_TL_WDR3320_V2
bool "TP-LINK TL-WDR3320 v2 board support"
select SOC_AR934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile 
b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 74376b2..2217e52 100644
--- 

Re: [OpenWrt-Devel] Cannot flash UBNT Loco M2

2016-04-05 Thread Sven Roederer
Hi,

for me it helped to go this way, to bring a NSM5 (xm) one member of our 
Freifunk-community bricked :
- UBoot was "1.1.4.2-s956 (Jun 10 2015 - 10:54:50)" and did not accept 
snapshot-images
- downgrading UBoot to "1.1.4.2-s594 (Dec  5 2012 - 15:23:07)" by flashing 
original xm5.5 image
- on uboot start the rescure tftp-server wit option -f (urescue -f), this also 
overwrites the uboot-code
-board boots up with AirOS5.5 and can be flashed to openWRT the normal way

found this hint to the "-f" option at the guys of the AREDN-project (http://
bloodhound.aredn.org/products/AREDN/wiki/HowTo/Unbrick)


I hope this help 
SVen

Am Friday 11 March 2016, 15:28:41 schrieb Matthias Schiffer:
> 
> Getting out of this state is not easy: you have a U-boot on your device
> that doesn't accept correct images, and an OpenWrt version that doesn't
> allow writing to the flash.
> 
> Through a serial console, you can try fixing the settings in U-boot; when I
> tried this the last time, I wasn't able to do so, but maybe I did something
> wrong. The U-boot console has a few interesting settings (I forgot the
> exact commands, but the "help" command should tell you everything you need
> to know):
> 
> * You can reset the MTD layout to the defaults. This makes the recovery
> accept correct images again. Unfortunately, in my experiments, this setting
> was not permanent even when I saves the environment after resetting the
> layout. In the hindsight, I remember there being a setting to disable flash
> protection, maybe that would made have the environment saving effective.
> 
> In the end, I fixed this by creating a patched OpenWrt image that allowed
> me to write to the uboot and uboot-env partitions; this allowed me to write
> back backups I had made of the uboot and uboot-env before I broke the flash
> layout by flashing OpenWrt. Obviously, this does not work if you don't have
> backups...
> 
> * If you don't plan to ever go back to AirOS again, it might be okay to
> just ignore the broken MTD layout in the U-boot settings. Get into the
> U-boot console, reset the MTD layout, start recovery, and flash an OpenWrt
> version after trunk r48829 or CC r48849.
> 
> 
> I hope this helps. I'd be interested if you find a way to parmanently reset
> the MTD layout from the U-boot console; unfortunately, I don't have a test
> device available at the moment.
> 
> Regards,
> Matthias
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/3] ar71xx: add WNR2200 16M version

2016-04-05 Thread Hartmut Knaack
Hi Dirk,
just for the records (I didn't spot this myself), there is a typo in the
art partition config, which should be 64k but is just 64.
Please check back with Silent Wanderer before resending, so he may give
his tested-by tag.
Thanks,

Hartmut

Dirk Neukirchen schrieb am 07.03.2016 um 22:12:
> - change naming of old firmware to indicate 8M flash
> 
> this change should support 16M international version
> 
> totally untested, used
> - input from IRC chat,
> - ticket #14356 w. patch,
> - verified against GPL tarball (WNR2200 russia version)
> 
> Signed-off-by: Dirk Neukirchen 
> ---
>  target/linux/ar71xx/image/Makefile | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/target/linux/ar71xx/image/Makefile 
> b/target/linux/ar71xx/image/Makefile
> index ca4437b..d9168fd 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -1594,7 +1594,8 @@ 
> dr344_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1
>  
> wpj531_mtdlayout_16M=mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
>  
> wpj558_mtdlayout_16M=mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
>  
> wndap360_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1728k(kernel),6016k(rootfs),64k(nvram)ro,64k(art)ro,7744k@0x5(firmware)
> -wnr2200_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
> +wnr2200_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
> +wnr2200_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14784k(firmware),64k(config)ro,1024k(language_table)ro,64k(pot)ro,64k(traffic_meter)ro,64(art)ro,1536k0x05(kernel),13248k@0x1d(rootfs)
>  
> wnr2000v3_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,3712k(firmware),64k(art)ro
>  
> wnr2000v4_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,3776k(firmware),64k(art)ro
>  
> r6100_mtdlayout=mtdparts=ar934x-nfc:128k(u-boot)ro,256k(caldata),256k(caldata-backup),512k(config),512k(pot),2048k(kernel),122240k(ubi),25600k@0x1a(firmware),2048k(language),3072k(traffic_meter)
> @@ -2450,7 +2451,8 @@ $(eval $(call 
> SingleProfile,MyLoader,64k,WPE72_16M,wpe72,,ttyS0,115200,0x100
>  
>  $(eval $(call 
> SingleProfile,Netgear,64kraw,WNR2000V3,wnr2000v3,WNR2000V3,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303033,WNR2000V3,""
>  NA,-H 29763551+04+32))
>  $(eval $(call 
> SingleProfile,NetgearLzma,64kraw,WNR2000V4,wnr2000v4,WNR2000V4,ttyS0,115200,$$(wnr2000v4_mtdlayout),0x32303034,WNR2000V4,""
>  NA,))
> -$(eval $(call 
> SingleProfile,Netgear,64kraw,WNR2200,wnr2200,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout),0x32323030,wnr2200,""
>  NA,))
> +$(eval $(call 
> SingleProfile,Netgear,64kraw,WNR2200_8M,wnr2200-8m,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout_8M),0x32323030,wnr2200,""
>  NA,))
> +$(eval $(call 
> SingleProfile,Netgear,64kraw,WNR2200_16M,wnr2200-16m,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout_16M),0x32323030,wnr2200,""
>  WW,))
>  $(eval $(call 
> SingleProfile,Netgear,64kraw,REALWNR612V2,wnr612v2,WNR612V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303631,WNR612V2,"",))
>  $(eval $(call 
> SingleProfile,Netgear,64kraw,N150R,n150r,WNR612V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303631,N150R,"",))
>  $(eval $(call 
> SingleProfile,Netgear,64kraw,REALWNR1000V2,wnr1000v2,WNR1000V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x31303031,WNR1000V2,"",))
> @@ -2514,6 +2516,7 @@ $(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW 
> TEW652BRP_RECOVERY))
>  $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
>  $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
>  $(eval $(call MultiProfile,WNR1000V2,REALWNR1000V2 WNR1000V2_VC))
> +$(eval $(call MultiProfile,WNR2200,WNR2200_8M WNR2200_16M))
>  $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
>  $(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M))
>  $(eval $(call MultiProfile,WPJ344,WPJ344_16M))
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] tools/mpfr: update to 3.1.4

2016-04-05 Thread Hannu Nyman
Update mpfr to 3.1.4

Signed-off-by: Hannu Nyman 
---

Release notes at: http://www.mpfr.org/mpfr-current/

 tools/mpfr/Makefile   | 6 +++---
 tools/mpfr/patches/001-only_src.patch | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/mpfr/Makefile b/tools/mpfr/Makefile
index 16624a7..3a2c339 100644
--- a/tools/mpfr/Makefile
+++ b/tools/mpfr/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009-2015 OpenWrt.org
+# Copyright (C) 2009-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpfr
-PKG_VERSION:=3.1.3
+PKG_VERSION:=3.1.4
 
 PKG_SOURCE_URL:=http://www.mpfr.org/mpfr-$(PKG_VERSION) \
@GNU/mpfr
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MD5SUM:=5fdfa3cfa5c86514ee4a241a1affa138
+PKG_MD5SUM:=b8a2f6b0e68bef46e53da2ac439e1cf4
 
 HOST_BUILD_PARALLEL:=1
 HOST_FIXUP:=autoreconf
diff --git a/tools/mpfr/patches/001-only_src.patch 
b/tools/mpfr/patches/001-only_src.patch
index 4a07cb9..b983f87 100644
--- a/tools/mpfr/patches/001-only_src.patch
+++ b/tools/mpfr/patches/001-only_src.patch
@@ -1,6 +1,6 @@
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -18,7 +18,7 @@
+@@ -18,7 +18,7 @@ AUTOMAKE_OPTIONS = gnu
  # old Automake version.
  ACLOCAL_AMFLAGS = -I m4
  
@@ -11,7 +11,7 @@
examples/ReadMe examples/divworst.c examples/rndo-add.c examples/sample.c \
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -377,7 +377,7 @@ top_builddir = @top_builddir@
+@@ -378,7 +378,7 @@ AUTOMAKE_OPTIONS = gnu
  # libtoolize and in case some developer needs to switch back to an
  # old Automake version.
  ACLOCAL_AMFLAGS = -I m4
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] tools/cmake: update to 3.5.1

2016-04-05 Thread Hannu Nyman
Update cmake to 3.5.1

Signed-off-by: Hannu Nyman 
---

Release notes at https://cmake.org/cmake/help/v3.5/release/3.5.html

 tools/cmake/Makefile   | 6 +++---
 tools/cmake/patches/100-disable_qt_tests.patch | 4 ++--
 tools/cmake/patches/110-freebsd-compat.patch   | 3 ---
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile
index d7a68ea..3cbc09e 100644
--- a/tools/cmake/Makefile
+++ b/tools/cmake/Makefile
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cmake
-PKG_VERSION:=3.4.3
+PKG_VERSION:=3.5.1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://cmake.org/files/v3.4/ \
+PKG_SOURCE_URL:=https://cmake.org/files/v3.5/ \
https://fossies.org/linux/misc/
-PKG_MD5SUM:=4cb3ff35b2472aae70f542116d616e63
+PKG_MD5SUM:=ca051f4a66375c89d1a524e726da0296
 
 HOST_BUILD_PARALLEL:=1
 HOST_CONFIGURE_PARALLEL:=1
diff --git a/tools/cmake/patches/100-disable_qt_tests.patch 
b/tools/cmake/patches/100-disable_qt_tests.patch
index 417e27a..9d2f641 100644
--- a/tools/cmake/patches/100-disable_qt_tests.patch
+++ b/tools/cmake/patches/100-disable_qt_tests.patch
@@ -1,6 +1,6 @@
 --- a/Tests/RunCMake/CMakeLists.txt
 +++ b/Tests/RunCMake/CMakeLists.txt
-@@ -216,15 +216,6 @@
+@@ -217,15 +217,6 @@ add_RunCMake_test(interface_library)
  add_RunCMake_test(no_install_prefix)
  add_RunCMake_test(configure_file)
  
@@ -18,7 +18,7 @@
add_RunCMake_test(FindPkgConfig)
 --- a/Tests/CMakeLists.txt
 +++ b/Tests/CMakeLists.txt
-@@ -390,10 +390,6 @@
+@@ -389,10 +389,6 @@ if(BUILD_TESTING)
  
list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX})
  
diff --git a/tools/cmake/patches/110-freebsd-compat.patch 
b/tools/cmake/patches/110-freebsd-compat.patch
index b549448..49c9b78 100644
--- a/tools/cmake/patches/110-freebsd-compat.patch
+++ b/tools/cmake/patches/110-freebsd-compat.patch
@@ -19,8 +19,6 @@ Change-Id: I3b91ed7ac0e6878035aee202b3336c536cc6d2ff
  Source/kwsys/SystemInformation.cxx |9 +
  1 file changed, 9 insertions(+)
 
-diff --git a/Source/kwsys/SystemInformation.cxx 
b/Source/kwsys/SystemInformation.cxx
-index 7c31f3a..2672730 100644
 --- a/Source/kwsys/SystemInformation.cxx
 +++ b/Source/kwsys/SystemInformation.cxx
 @@ -90,6 +90,15 @@ typedef int siginfo_t;
@@ -39,4 +37,3 @@ index 7c31f3a..2672730 100644
  #endif
  
  #if defined(__OpenBSD__) || defined(__NetBSD__)
-
-- 
2.8.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] xtables-addons: build: fix configure compatiblity with POSIX shells

2016-04-05 Thread Matthias Schiffer
Fixes build with /bin/sh pointing to certain versions of dash (for example
on Void Linux).

Signed-off-by: Matthias Schiffer 
---
 ...-configure-compatiblity-with-POSIX-shells.patch | 51 ++
 .../patches/002-fix-kernel-version-detection.patch | 12 ++---
 2 files changed, 57 insertions(+), 6 deletions(-)
 create mode 100644 
package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch

diff --git 
a/package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch
 
b/package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch
new file mode 100644
index 000..e0b11b5
--- /dev/null
+++ 
b/package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch
@@ -0,0 +1,51 @@
+From f07a0a5cb8b3c5e1aee8b30c7fa21ccfbf24a95a Mon Sep 17 00:00:00 2001
+Message-Id: 

+From: Matthias Schiffer 
+Date: Fri, 1 Apr 2016 22:24:00 +0200
+Subject: [PATCH] build: fix configure compatiblity with POSIX shells
+
+The kernel version detection code uses some bashisms, which makes the build
+fail on Debian systems where /bin/sh links to dash. Replace with POSIX-
+conforming commands at the cost of requiring awk.
+---
+ configure.ac | 24 +---
+ 1 file changed, 9 insertions(+), 15 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 82a1355..5a5ea57 100644
+--- a/configure.ac
 b/configure.ac
+@@ -44,21 +44,15 @@ regular_CFLAGS="-Wall -Waggregate-return 
-Wmissing-declarations \
+ 
+ if test -n "$kbuilddir"; then
+   AC_MSG_CHECKING([kernel version that we will build against])
+-  krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease)";
+-  kmajor="${krel%%[[^0-9]]*}";
+-  kmajor="$(($kmajor+0))";
+-  krel="${krel:${#kmajor}}";
+-  krel="${krel#.}";
+-  kminor="${krel%%[[^0-9]]*}";
+-  kminor="$(($kminor+0))";
+-  krel="${krel:${#kminor}}";
+-  krel="${krel#.}";
+-  kmicro="${krel%%[[^0-9]]*}";
+-  kmicro="$(($kmicro+0))";
+-  krel="${krel:${#kmicro}}";
+-  krel="${krel#.}";
+-  kstable="${krel%%[[^0-9]]*}";
+-  kstable="$(($kstable+0))";
++  krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 
'FS=[[^0-9.]]' '{print $1; exit}')";
++  save_IFS=$IFS;
++  IFS='.';
++  set x $krel;
++  IFS=$save_IFS;
++  kmajor="$(($2+0))";
++  kminor="$(($3+0))";
++  kmicro="$(($4+0))";
++  kstable="$(($5+0))";
+   if test -z "$kmajor" -o -z "$kminor" -o -z "$kmicro"; then
+   echo "WARNING: Version detection did not succeed. Continue at 
own luck.";
+   else
+-- 
+2.8.0
+
diff --git 
a/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
 
b/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
index e4101ad..6a7a099 100644
--- 
a/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
+++ 
b/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
@@ -1,11 +1,11 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return
+@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return 
-Wmissing-declarations \
  
  if test -n "$kbuilddir"; then
AC_MSG_CHECKING([kernel version that we will build against])
--  krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease)";
-+  krel="$(make -sC "$kbuilddir" M=$PWD kernelversion)";
-   kmajor="${krel%%[[^0-9]]*}";
-   kmajor="$(($kmajor+0))";
-   krel="${krel:${#kmajor}}";
+-  krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 
'FS=[[^0-9.]]' '{print $1; exit}')";
++  krel="$(make -sC "$kbuilddir" M=$PWD kernelversion | $AWK -v 
'FS=[[^0-9.]]' '{print $1; exit}')";
+   save_IFS=$IFS;
+   IFS='.';
+   set x $krel;
-- 
2.8.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] arc770: build kmod-ath9k-htc wpad-mini by default

2016-04-05 Thread Alexey Brodkin
Hi John,

> 
> From: Alexey Brodkin [abrod...@synopsys.com]
> Sent: Friday, April 01, 2016 5:39 PM
> To: John Crispin
> Cc: openwrt-devel@lists.openwrt.org; Alexey Brodkin
> Subject: [PATCH] arc770: build kmod-ath9k-htc wpad-mini by default
> 
> AXS101 beind a development board lacks built-in wireles inerfaces.
> So we have to use external USB dongles to turn the board into
> wireless router.
> 
> The best USB Wi-Fi dongles to work in AP-mode seem to be based on
> ath9k-htc chipset.
> 
> And so with that change we add support of mentioned dongles in
> default and axs101 builds.
> 
> Signed-off-by: Alexey Brodkin 

I'm wondering if there're any comments on this one or it could be applied?

-Alexey
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] arc770: enable unaligned access handling simulation in software

2016-04-05 Thread Alexey Brodkin
Hi John,

> 
> From: Alexey Brodkin [abrod...@synopsys.com]
> Sent: Friday, April 01, 2016 5:43 PM
> To: John Crispin
> Cc: openwrt-devel@lists.openwrt.org; Alexey Brodkin
> Subject: [PATCH] arc770: enable unaligned access handling simulation in 
> software
> 
> This enables misaligned access handling by software in Linux kernel.
> 
> With some wireless drivers (ath9k-htc and mt7601u for example) we see
> misaligned accesses here and there and to cope with that without
> fixing stuff in the drivers we're just gracefully handling it on ARC.
> 
> Signed-off-by: Alexey Brodkin 

I'm wondering if there're any comments on this one or it could be applied?

-Alexey
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 11/16] ar71xx: add user-space support for the OpenMesh OM5P-ACv2

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 target/linux/ar71xx/base-files/etc/diag.sh   | 3 ++-
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index da976bd..783a4e6 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -214,7 +214,8 @@ get_status_led() {
om5p-an)
status_led="om5p:blue:power"
;;
-   om5p-ac)
+   om5p-ac | \
+   om5p-acv2)
status_led="om5pac:blue:power"
;;
omy-x1)
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index ded9e7e..9c19e23 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -649,6 +649,9 @@ ar71xx_board_detect() {
*"OM5P AC")
name="om5p-ac"
;;
+   *"OM5P ACv2")
+   name="om5p-acv2"
+   ;;
*"OMY-X1")
name="omy-x1"
;;
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 10/16] ar71xx: add kernel support for the OpenMesh OM5P-ACv2 board

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 target/linux/ar71xx/config-4.1 |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  10 +
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-om5pacv2.c   | 216 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 6 files changed, 230 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c

diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 0ba1f53..087f027 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -110,6 +110,7 @@ CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
 CONFIG_ATH79_MACH_OM5P_AC=y
+CONFIG_ATH79_MACH_OM5P_ACv2=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 5117829..b684292 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -113,6 +113,7 @@ CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
 CONFIG_ATH79_MACH_OM5P_AC=y
+CONFIG_ATH79_MACH_OM5P_ACv2=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index b12c42a..1d6c4d6 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -870,6 +870,16 @@ config ATH79_MACH_OM5P_AC
select ATH79_DEV_M25P80
select ATH79_DEV_WMAC
 
+config ATH79_MACH_OM5P_ACv2
+   bool "OpenMesh OM5P-ACv2 board support"
+   select SOC_QCA955X
+   select ATH79_DEV_AP9X_PCI if PCI
+   select ATH79_DEV_ETH
+   select ATH79_DEV_GPIO_BUTTONS
+   select ATH79_DEV_LEDS_GPIO
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_WMAC
+
 config ATH79_MACH_OMY_X1
bool "OMYlink OMY X1 support"
select SOC_AR934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile 
b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 484dda0..75f1670 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -116,6 +116,7 @@ obj-$(CONFIG_ATH79_MACH_NBG460N)+= mach-nbg460n.o
 obj-$(CONFIG_ATH79_MACH_OM2P)  += mach-om2p.o
 obj-$(CONFIG_ATH79_MACH_OM5P)  += mach-om5p.o
 obj-$(CONFIG_ATH79_MACH_OM5P_AC)   += mach-om5pac.o
+obj-$(CONFIG_ATH79_MACH_OM5P_ACv2) += mach-om5pacv2.o
 obj-$(CONFIG_ATH79_MACH_OMY_X1)+= mach-omy-x1.o
 obj-$(CONFIG_ATH79_MACH_ONION_OMEGA)  += mach-onion-omega.o
 obj-$(CONFIG_ATH79_MACH_PB42)  += mach-pb42.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c
new file mode 100644
index 000..587ca32
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c
@@ -0,0 +1,216 @@
+/*
+ *  OpenMesh OM5P-ACv2 support
+ *
+ *  Copyright (C) 2013 Marek Lindner 
+ *  Copyright (C) 2014-2016 Sven Eckelmann 
+ *  Copyright (C) 2015 Open-Mesh - Jim Collar 
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "pci.h"
+
+#define OM5PACV2_GPIO_LED_POWER14
+#define OM5PACV2_GPIO_LED_GREEN13
+#define OM5PACV2_GPIO_LED_RED  23
+#define OM5PACV2_GPIO_LED_YELLOW   15
+#define OM5PACV2_GPIO_BTN_RESET1
+#define OM5PACV2_GPIO_I2C_SCL  18
+#define OM5PACV2_GPIO_I2C_SDA  19
+#define OM5PACV2_GPIO_PA_DCDC  2
+#define OM5PACV2_GPIO_PA_HIGH  16
+
+#define OM5PACV2_KEYS_POLL_INTERVAL20  /* msecs */
+#define OM5PACV2_KEYS_DEBOUNCE_INTERVAL(3 * 
OM5PACV2_KEYS_POLL_INTERVAL)
+
+#define OM5PACV2_WMAC_CALDATA_OFFSET   0x1000
+
+static struct gpio_led om5pacv2_leds_gpio[] __initdata = {
+   {
+   .name   = "om5pac:blue:power",
+   .gpio   = OM5PACV2_GPIO_LED_POWER,
+   .active_low = 1,
+   }, {
+   .name   = "om5pac:red:wifi",
+   .gpio   = OM5PACV2_GPIO_LED_RED,
+   .active_low = 1,
+

[OpenWrt-Devel] [PATCH 16/16] ar71xx: add OM5P-ACv2 to the OM5P-AC profile

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 target/linux/ar71xx/generic/profiles/openmesh.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/generic/profiles/openmesh.mk 
b/target/linux/ar71xx/generic/profiles/openmesh.mk
index 0873ac5..6817c59 100644
--- a/target/linux/ar71xx/generic/profiles/openmesh.mk
+++ b/target/linux/ar71xx/generic/profiles/openmesh.mk
@@ -28,12 +28,12 @@ endef
 $(eval $(call Profile,OM5P))
 
 define Profile/OM5PAC
-   NAME:=OpenMesh OM5P-AC
+   NAME:=OpenMesh OM5P-AC/OM5P-ACv2
PACKAGES:=kmod-ath9k kmod-ath10k om-watchdog
 endef
 
 define Profile/OM5PAC/Description
-   Package set optimized for the OpenMesh OM5P-AC.
+   Package set optimized for the OpenMesh OM5P-AC/OM5P-ACv2.
 endef
 
 $(eval $(call Profile,OM5PAC))
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 15/16] ar71xx: extract ath10k wifi board.bin for the OpenMesh OM5P-ACv2 board

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 .../linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 1b6de1e..8fc3ab3 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -71,7 +71,8 @@ case "$FIRMWARE" in
ath10kcal_extract "caldata" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +1)
;;
-   mr1750)
+   mr1750 | \
+   om5p-acv2)
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +16)
;;
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 14/16] package/uboot-envtools: add OpenMesh OM5P-ACv2 support

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 package/boot/uboot-envtools/files/ar71xx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/boot/uboot-envtools/files/ar71xx 
b/package/boot/uboot-envtools/files/ar71xx
index 91bd9a4..32e7269 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -32,6 +32,7 @@ mr900v2 | \
 nbg6716 | \
 om5p-an | \
 om5p-ac | \
+om5p-acv2 | \
 om5p | \
 tube2h | \
 wndr3700)
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 12/16] ar71xx: enable sysupgrade for the OpenMesh OM5P-ACv2

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh | 1 +
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 6 --
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
index 1cfead9..209cdaa 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
@@ -74,6 +74,7 @@ platform_check_image_openmesh()
;;
OM5PAC)
[ "$board" = "om5p-ac" ] && break
+   [ "$board" = "om5p-acv2" ] && break
echo "Invalid image board target ($img_board_target) 
for this platform: $board. Use the correct image for this platform"
return 1
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index fee9d63..2d61638 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -323,7 +323,8 @@ platform_check_image() {
om2p-lc | \
om5p | \
om5p-an | \
-   om5p-ac)
+   om5p-ac | \
+   om5p-acv2)
platform_check_image_openmesh "$magic_long" "$1" && return 0
return 1
;;
@@ -577,7 +578,8 @@ platform_do_upgrade() {
om2p-lc | \
om5p | \
om5p-an | \
-   om5p-ac)
+   om5p-ac | \
+   om5p-acv2)
platform_do_upgrade_openmesh "$ARGV"
;;
unifi-outdoor-plus | \
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 13/16] package/om-watchdog: add OpenMesh OM5P-ACv2 support

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 package/kernel/om-watchdog/files/om-watchdog.init | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/kernel/om-watchdog/files/om-watchdog.init 
b/package/kernel/om-watchdog/files/om-watchdog.init
index 5c442c6..79819ad 100644
--- a/package/kernel/om-watchdog/files/om-watchdog.init
+++ b/package/kernel/om-watchdog/files/om-watchdog.init
@@ -18,7 +18,8 @@ get_gpio() {
case "$board" in
"om2p" | \
"om2p-hs" | \
-   "om2p-hsv2")
+   "om2p-hsv2" | \
+   "om5p-acv2")
return 12
;;
"om2pv2" | \
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 08/16] ar71xx: extract ath10k wifi board.bin for the OpenMesh OM5P-AC board

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 .../linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata  | 4 
 1 file changed, 4 insertions(+)

diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index e6fcec8..1b6de1e 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -95,6 +95,10 @@ case "$FIRMWARE" in
rb-911g-5hpacd)
ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 
20480 2116
;;
+   om5p-ac)
+   ath10kcal_extract "ART" 20480 2116
+   ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth0/address) +16)
+   ;;
esac
;;
 *)
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 09/16] ar71xx: create profile and build image for the OpenMesh OM5P-AC board

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 target/linux/ar71xx/generic/profiles/openmesh.mk | 11 +++
 target/linux/ar71xx/image/Makefile   |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/generic/profiles/openmesh.mk 
b/target/linux/ar71xx/generic/profiles/openmesh.mk
index 1c51e93..0873ac5 100644
--- a/target/linux/ar71xx/generic/profiles/openmesh.mk
+++ b/target/linux/ar71xx/generic/profiles/openmesh.mk
@@ -27,6 +27,17 @@ endef
 
 $(eval $(call Profile,OM5P))
 
+define Profile/OM5PAC
+   NAME:=OpenMesh OM5P-AC
+   PACKAGES:=kmod-ath9k kmod-ath10k om-watchdog
+endef
+
+define Profile/OM5PAC/Description
+   Package set optimized for the OpenMesh OM5P-AC.
+endef
+
+$(eval $(call Profile,OM5PAC))
+
 define Profile/MR600
 NAME:=OpenMesh MR600
 PACKAGES:=kmod-ath9k om-watchdog
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 595fba2..eb7a7f0 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -2470,6 +2470,7 @@ $(eval $(call 
SingleProfile,Netgear,64kraw,WPN824N,wpn824n,WPN824N,ttyS0,115200,
 
 $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM2P,om2pOM2P))
 $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM5P,om5pOM5P))
+$(eval $(call SingleProfile,OpenMesh,squashfs-only,OM5PAC,om5pacOM5PAC))
 $(eval $(call SingleProfile,OpenMesh,squashfs-only,MR600,mr600MR600))
 $(eval $(call SingleProfile,OpenMesh,squashfs-only,MR900,mr900MR900))
 $(eval $(call SingleProfile,OpenMesh,squashfs-only,MR1750,mr1750MR1750))
@@ -2518,7 +2519,7 @@ $(eval $(call MultiProfile,AP147,AP147_010))
 $(eval $(call MultiProfile,AP152,AP152_16M))
 $(eval $(call MultiProfile,DIR615IX,DIR615I1 DIR615I3))
 $(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT EWDORIN16M))
-$(eval $(call MultiProfile,OPENMESH,OM2P OM5P MR600 MR900 MR1750))
+$(eval $(call MultiProfile,OPENMESH,OM2P OM5P OM5PAC MR600 MR900 MR1750))
 $(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
 $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
 $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 06/16] package/om-watchdog: add OpenMesh OM5P-AC support

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 package/kernel/om-watchdog/files/om-watchdog.init | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/kernel/om-watchdog/files/om-watchdog.init 
b/package/kernel/om-watchdog/files/om-watchdog.init
index d68fb15..5c442c6 100644
--- a/package/kernel/om-watchdog/files/om-watchdog.init
+++ b/package/kernel/om-watchdog/files/om-watchdog.init
@@ -29,6 +29,9 @@ get_gpio() {
"om5p-an")
return 11
;;
+   "om5p-ac")
+   return 17
+   ;;
"mr600v2")
return 15
;;
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 07/16] package/uboot-envtools: add OpenMesh OM5P-AC support

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 package/boot/uboot-envtools/files/ar71xx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/boot/uboot-envtools/files/ar71xx 
b/package/boot/uboot-envtools/files/ar71xx
index c9031ac..91bd9a4 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -31,6 +31,7 @@ mr900 | \
 mr900v2 | \
 nbg6716 | \
 om5p-an | \
+om5p-ac | \
 om5p | \
 tube2h | \
 wndr3700)
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 05/16] ar71xx: enable sysupgrade for the OpenMesh OM5P-AC

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh | 7 ++-
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 6 --
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
index 9ca0f5b..1cfead9 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
@@ -72,6 +72,11 @@ platform_check_image_openmesh()
echo "Invalid image board target ($img_board_target) 
for this platform: $board. Use the correct image for this platform"
return 1
;;
+   OM5PAC)
+   [ "$board" = "om5p-ac" ] && break
+   echo "Invalid image board target ($img_board_target) 
for this platform: $board. Use the correct image for this platform"
+   return 1
+   ;;
MR1750)
[ "$board" = "mr1750" ] && break
echo "Invalid image board target ($img_board_target) 
for this platform: $board. Use the correct image for this platform"
@@ -162,7 +167,7 @@ platform_do_upgrade_openmesh()
kernel_start_addr1=0x9f1c
kernel_start_addr2=0x9f8c
;;
-   OM5P|MR600|MR900|MR1750)
+   OM5P|OM5PAC|MR600|MR900|MR1750)
block_size=$((64 * 1024))
total_size=7995392
kernel_start_addr1=0x9f0b
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 923e02b..fee9d63 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -322,7 +322,8 @@ platform_check_image() {
om2p-hsv2 | \
om2p-lc | \
om5p | \
-   om5p-an)
+   om5p-an | \
+   om5p-ac)
platform_check_image_openmesh "$magic_long" "$1" && return 0
return 1
;;
@@ -575,7 +576,8 @@ platform_do_upgrade() {
om2p-hsv2 | \
om2p-lc | \
om5p | \
-   om5p-an)
+   om5p-an | \
+   om5p-ac)
platform_do_upgrade_openmesh "$ARGV"
;;
unifi-outdoor-plus | \
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 04/16] scripts/om-fwupgradecfg-gen.sh: add support for the OM5P-AC

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 scripts/om-fwupgradecfg-gen.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh
index e208e6d..6c3b74c 100644
--- a/scripts/om-fwupgradecfg-gen.sh
+++ b/scripts/om-fwupgradecfg-gen.sh
@@ -7,7 +7,7 @@
 #
 
 usage() {
-   echo "Usage: $0    "
+   echo "Usage: $0   
 "
rm -f $CFG_OUT
exit 1
 }
@@ -26,7 +26,7 @@ case $CE_TYPE in
FLASH_BS=262144
MD5_SKIP_BLOCKS=1
;;
-   OM5P|MR600|MR900|MR1750)
+   OM5P|OM5PAC|MR600|MR900|MR1750)
MAX_PART_SIZE=7808
KERNEL_FLASH_ADDR=0xb
FLASH_BS=65536
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 03/16] ar71xx: add user-space support for the OpenMesh OM5P-AC

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 +
 target/linux/ar71xx/base-files/etc/diag.sh | 3 +++
 target/linux/ar71xx/base-files/lib/ar71xx.sh   | 3 +++
 3 files changed, 11 insertions(+)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 708ebb9..ab19a61 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -394,6 +394,11 @@ om5p-an)
ucidef_set_led_netdev "port2" "port2" "om5p:blue:lan" "eth1"
;;
 
+om5p-ac)
+   ucidef_set_led_netdev "port1" "port1" "om5pac:blue:lan" "eth0"
+   ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1"
+   ;;
+
 omy-x1)
ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index a2251d1..da976bd 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -214,6 +214,9 @@ get_status_led() {
om5p-an)
status_led="om5p:blue:power"
;;
+   om5p-ac)
+   status_led="om5pac:blue:power"
+   ;;
omy-x1)
status_led="omy:green:power"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 6b8550a..ded9e7e 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -646,6 +646,9 @@ ar71xx_board_detect() {
*"OM5P AN")
name="om5p-an"
;;
+   *"OM5P AC")
+   name="om5p-ac"
+   ;;
*"OMY-X1")
name="omy-x1"
;;
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 02/16] ar71xx: add kernel support for the OpenMesh OM5P-AC board

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
 target/linux/ar71xx/config-4.1 |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |   9 +
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-om5pac.c | 193 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 6 files changed, 206 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c

diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index d6ad850..0ba1f53 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -109,6 +109,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_OM5P_AC=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 49cecc5..5117829 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -112,6 +112,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_OM5P_AC=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index f47f1b9..b12c42a 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -861,6 +861,15 @@ config ATH79_MACH_OM5P
select ATH79_DEV_M25P80
select ATH79_DEV_WMAC
 
+config ATH79_MACH_OM5P_AC
+   bool "OpenMesh OM5P-AC board support"
+   select SOC_QCA955X
+   select ATH79_DEV_AP9X_PCI if PCI
+   select ATH79_DEV_ETH
+   select ATH79_DEV_LEDS_GPIO
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_WMAC
+
 config ATH79_MACH_OMY_X1
bool "OMYlink OMY X1 support"
select SOC_AR934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile 
b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 74376b2..484dda0 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -115,6 +115,7 @@ obj-$(CONFIG_ATH79_MACH_MZK_W300NH) += mach-mzk-w300nh.o
 obj-$(CONFIG_ATH79_MACH_NBG460N)   += mach-nbg460n.o
 obj-$(CONFIG_ATH79_MACH_OM2P)  += mach-om2p.o
 obj-$(CONFIG_ATH79_MACH_OM5P)  += mach-om5p.o
+obj-$(CONFIG_ATH79_MACH_OM5P_AC)   += mach-om5pac.o
 obj-$(CONFIG_ATH79_MACH_OMY_X1)+= mach-omy-x1.o
 obj-$(CONFIG_ATH79_MACH_ONION_OMEGA)  += mach-onion-omega.o
 obj-$(CONFIG_ATH79_MACH_PB42)  += mach-pb42.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c
new file mode 100644
index 000..f6974af
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c
@@ -0,0 +1,193 @@
+/*
+ *  OpenMesh OM5P-AC support
+ *
+ *  Copyright (C) 2013 Marek Lindner 
+ *  Copyright (C) 2014 Sven Eckelmann 
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "pci.h"
+
+#define OM5PAC_GPIO_LED_POWER  18
+#define OM5PAC_GPIO_LED_GREEN  21
+#define OM5PAC_GPIO_LED_RED23
+#define OM5PAC_GPIO_LED_YELLOW 22
+#define OM5PAC_GPIO_LED_LAN20
+#define OM5PAC_GPIO_LED_WAN19
+#define OM5PAC_GPIO_I2C_SCL12
+#define OM5PAC_GPIO_I2C_SDA11
+
+#define OM5PAC_KEYS_POLL_INTERVAL  20  /* msecs */
+#define OM5PAC_KEYS_DEBOUNCE_INTERVAL  (3 * OM5PAC_KEYS_POLL_INTERVAL)
+
+#define OM5PAC_WMAC_CALDATA_OFFSET 0x1000
+
+static struct gpio_led om5pac_leds_gpio[] __initdata = {
+   {
+   .name   = "om5pac:blue:power",
+   .gpio   = OM5PAC_GPIO_LED_POWER,
+   .active_low = 1,
+   }, {
+   .name   = "om5pac:red:wifi",
+   .gpio   = OM5PAC_GPIO_LED_RED,
+   .active_low = 1,
+   }, {
+   .name   = "om5pac:yellow:wifi",
+   .gpio   = OM5PAC_GPIO_LED_YELLOW,
+   .active_low = 1,
+   }, {
+   .name   = "om5pac:green:wifi",
+   .gpio 

[OpenWrt-Devel] [PATCH 01/16] scripts/om-fwupgradecfg-gen.sh: Generate sha256sum for uboot verification

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Future Open Mesh u-boot versions are changing the check of the image files
(vmlinux, rootfs) from md5 to sha256. Having both in them should be enough
to ensure backward and forward compatibility.

Signed-off-by: Sven Eckelmann 
---
 scripts/om-fwupgradecfg-gen.sh | 4 
 1 file changed, 4 insertions(+)

diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh
index fab1582..e208e6d 100644
--- a/scripts/om-fwupgradecfg-gen.sh
+++ b/scripts/om-fwupgradecfg-gen.sh
@@ -42,6 +42,7 @@ CHECK_BS=65536
 
 KERNEL_SIZE=$(stat -c%s "$KERNEL_PATH")
 KERNEL_MD5=$(md5=$(md5sum $KERNEL_PATH); echo ${md5%% *})
+KERNEL_SHA256=$(openssl dgst -sha256 $KERNEL_PATH | awk '{print $2}')
 KERNEL_PART_SIZE=$(size=$(($KERNEL_SIZE / $FLASH_BS)); [ $(($size * 
$FLASH_BS)) -lt $KERNEL_SIZE ] && size=$(($size + 1)); echo $(($size * 
$FLASH_BS / 1024)))
 
 ROOTFS_FLASH_ADDR=$(addr=$(($KERNEL_FLASH_ADDR + ($KERNEL_PART_SIZE * 1024))); 
printf "0x%x" $addr)
@@ -49,6 +50,7 @@ ROOTFS_SIZE=$(stat -c%s "$ROOTFS_PATH")
 ROOTFS_CHECK_BLOCKS=$((($ROOTFS_SIZE / $CHECK_BS) - $MD5_SKIP_BLOCKS))
 ROOTFS_MD5=$(md5=$(dd if=$ROOTFS_PATH bs=$CHECK_BS count=$ROOTFS_CHECK_BLOCKS 
2>&- | md5sum); echo ${md5%% *})
 ROOTFS_MD5_FULL=$(md5=$(md5sum $ROOTFS_PATH); echo ${md5%% *})
+ROOTFS_SHA256_FULL=$(openssl dgst -sha256 $ROOTFS_PATH | awk '{print $2}')
 ROOTFS_CHECK_SIZE=$(printf '0x%x' $(($ROOTFS_CHECK_BLOCKS * $CHECK_BS)))
 ROOTFS_PART_SIZE=$(($MAX_PART_SIZE - $KERNEL_PART_SIZE))
 
@@ -57,6 +59,7 @@ cat << EOF > $CFG_OUT
 filename=kernel
 md5sum=$KERNEL_MD5
 filemd5sum=$KERNEL_MD5
+filesha256sum=$KERNEL_SHA256
 flashaddr=$KERNEL_FLASH_ADDR
 checksize=0x0
 cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; saveenv
@@ -66,6 +69,7 @@ cmd_fail=reset
 filename=rootfs
 md5sum=$ROOTFS_MD5
 filemd5sum=$ROOTFS_MD5_FULL
+filesha256sum=$ROOTFS_SHA256_FULL
 flashaddr=$ROOTFS_FLASH_ADDR
 checksize=$ROOTFS_CHECK_SIZE
 cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; setenv 
rootfs_size_1 $ROOTFS_PART_SIZE; saveenv
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: mt7621: add support for disabling flow control

2016-04-05 Thread Cristian Morales Vega
Signed-off-by: Cristian Morales Vega 
---
 ...diatek-add-swconfig-driver-for-gsw_mt762x.patch | 54 +-
 1 file changed, 53 insertions(+), 1 deletion(-)

diff --git 
a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
 
b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
index bbad8cc..d056551 100644
--- 
a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
+++ 
b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch
@@ -28,7 +28,7 @@ Signed-off-by: John Crispin 
  obj-$(CONFIG_NET_MEDIATEK_SOC)+= mtk-eth-soc.o
 --- /dev/null
 +++ b/drivers/net/ethernet/mediatek/mt7530.c
-@@ -0,0 +1,804 @@
+@@ -0,0 +1,856 @@
 +/*
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
@@ -709,6 +709,50 @@ Signed-off-by: John Crispin 
 +  return 0;
 +}
 +
++static int mt7621_sw_get_port_fc(struct switch_dev *dev,
++   const struct switch_attr *attr,
++   struct switch_val *val)
++{
++  u32 reg;
++  struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
++
++  if (val->port_vlan >= MT7530_NUM_PORTS)
++  return -EINVAL;
++
++  reg = mdiobus_read(priv->bus, val->port_vlan, 4);
++  reg &= BIT(10);
++
++  val->value.i = reg ? 1 : 0;
++
++  return 0;
++}
++
++static int mt7621_sw_set_port_fc(struct switch_dev *dev,
++   const struct switch_attr *attr,
++   struct switch_val *val)
++{
++  u32 reg;
++  struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
++
++  if (val->port_vlan >= MT7530_NUM_PORTS)
++  return -EINVAL;
++
++  reg = mdiobus_read(priv->bus, val->port_vlan, 4);
++  if(val->value.i) {
++  reg |= BIT(10);
++  } else {
++  reg &= ~BIT(10);
++  }
++  mdiobus_write(priv->bus, val->port_vlan, 4, reg);
++
++  /* Restart auto-negotiation */
++  reg = mdiobus_read(priv->bus, val->port_vlan, 0);
++  reg |= BIT(9);
++  mdiobus_write(priv->bus, val->port_vlan, 0, reg);
++
++  return 0;
++}
++
 +static const struct switch_attr mt7621_port[] = {
 +  {
 +  .type = SWITCH_TYPE_STRING,
@@ -717,6 +761,14 @@ Signed-off-by: John Crispin 
 +  .get = mt7621_sw_get_port_mib,
 +  .set = NULL,
 +  },
++  {
++  .type = SWITCH_TYPE_INT,
++  .name = "flow_ctl",
++  .description = "Flow Control",
++  .get = mt7621_sw_get_port_fc,
++  .set = mt7621_sw_set_port_fc,
++  .max = 1,
++  },
 +};
 +
 +static const struct switch_attr mt7530_port[] = {
-- 
2.6.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 15.05.1 - Chaos Calmer

2016-04-05 Thread Bruno Randolf
On 04/05/2016 02:33 PM, Saverio Proto wrote:
> Thanks Bruno,
> 
> I am sorry I am coming back to OpenWrt after a long break.
> 
> I expected the tag also on the Release repo
> 
> http://git.openwrt.org/?p=15.05/openwrt.git;a=summary
> 
> Here I see only a 15.05 tag. I dont understand the logic. I expect the
> 15.05.1 to be release from the Release-repo ?

Right, it should be tagged there too!
As I'm now only using the other repo I didn't check there.

bruno
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 15.05.1 - Chaos Calmer

2016-04-05 Thread John Crispin


On 05/04/2016 15:33, Saverio Proto wrote:
> Thanks Bruno,
> 
> I am sorry I am coming back to OpenWrt after a long break.
> 
> I expected the tag also on the Release repo
> 
> http://git.openwrt.org/?p=15.05/openwrt.git;a=summary
> 
> Here I see only a 15.05 tag. I dont understand the logic. I expect the
> 15.05.1 to be release from the Release-repo ?
> 
> thank you
> 
> Saverio
> 

the logic is that i can push a tag to one tree but not to the other and
whoever can is not reading this thread

John


> 
> 2016-04-04 22:38 GMT+02:00 Bruno Randolf :
>> On 04/04/2016 09:34 PM, Saverio Proto wrote:
 Great! Thanks for your good work!
 Could you please add a tag for 15.05.1 in the git repo?
>>>
>>> That would be great. I am trying to git bisect a bug and I have no
>>> idea on top of what commit is 15.05.1 built.
>>
>> There is a tag for it already:
>>
>> https://github.com/openwrt/openwrt/tags
>>
>> bruno
>>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC v2 6/6] ar71xx: Reset QCA955x SGMII link on speed change

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

The SGMII link of the QCA955x seems to be unstable when the PHY changes the
link speed. Reseting the SGMII and the PHY management control seems to
resolve this problem.

This was observed with an AR8033 and QCA9558

Signed-off-by: Sven Eckelmann 
---
v2:
 - Split into multiple patches and adjust slightly to look more like an
   OpenWrt patch

The code of this RFC is not meant to be an actual patch. It should show
what the u-boot for QCA955x does and what seemed to work(tm) in my limited
tests. It would be interesting to know whether this was also noticed by
other people and how they fixed it (when they fixed it).

If it is already known than it would maybe good to find a better way to
integrate it with ag71xx. Right now it just uses the set_speed callback to
start the reset.

 .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c   | 77 ++
 1 file changed, 77 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c 
b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index bfcc82f..f2e88dd 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -383,6 +383,81 @@ static void qca955x_set_speed_xmii(int speed)
iounmap(base);
 }
 
+static void qca955x_reset_sgmii(void)
+{
+   void __iomem *base;
+   int count = 0;
+   u32 status;
+   u32 t;
+
+   base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
+
+   t = QCA955X_MR_AN_CONTROL_AN_ENABLE |
+   QCA955X_MR_AN_CONTROL_PHY_RESET;
+   __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL);
+   udelay(10);
+
+   t = QCA955X_MR_AN_CONTROL_AN_ENABLE;
+   __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL);
+
+   t = 0;
+   __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET);
+
+   t = QCA955X_SGMII_RESET_HW_RX_125M;
+   __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET);
+
+   t = QCA955X_SGMII_RESET_HW_RX_125M |
+   QCA955X_SGMII_RESET_RX_125M;
+   __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET);
+
+   t = QCA955X_SGMII_RESET_HW_RX_125M |
+   QCA955X_SGMII_RESET_TX_125M |
+   QCA955X_SGMII_RESET_RX_125M;
+   __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET);
+
+   t = QCA955X_SGMII_RESET_HW_RX_125M |
+   QCA955X_SGMII_RESET_TX_125M |
+   QCA955X_SGMII_RESET_RX_125M |
+   QCA955X_SGMII_RESET_RX_CLK;
+   __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET);
+
+   t = QCA955X_SGMII_RESET_HW_RX_125M |
+   QCA955X_SGMII_RESET_TX_125M |
+   QCA955X_SGMII_RESET_RX_125M |
+   QCA955X_SGMII_RESET_RX_CLK |
+   QCA955X_SGMII_RESET_TX_CLK;
+   __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET);
+
+   t = __raw_readl(base + QCA955X_GMAC_REG_MR_AN_CONTROL);
+   t &= ~QCA955X_MR_AN_CONTROL_PHY_RESET;
+   __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL);
+   udelay(100);
+
+   status = __raw_readl(base + QCA955X_GMAC_REG_SGMII_DEBUG);
+   status &= 0xff;
+   while (status != 0xf && status != 0x10) {
+   t = __raw_readl(base + QCA955X_GMAC_REG_MR_AN_CONTROL);
+   t |= QCA955X_MR_AN_CONTROL_PHY_RESET;
+__raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL);
+
+   udelay(100);
+
+   t = __raw_readl(base + QCA955X_GMAC_REG_MR_AN_CONTROL);
+   t &= ~QCA955X_MR_AN_CONTROL_PHY_RESET;
+__raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL);
+
+   if (count++ >= 20)
+   break;
+
+   mdelay(10);
+
+   status = __raw_readl(base + QCA955X_GMAC_REG_SGMII_DEBUG);
+   status &= 0xff;
+   }
+
+   iounmap(base);
+}
+
 static void qca955x_set_speed_sgmii(int speed)
 {
void __iomem *base;
@@ -391,6 +466,8 @@ static void qca955x_set_speed_sgmii(int speed)
base = ioremap_nocache(AR71XX_PLL_BASE, AR71XX_PLL_SIZE);
__raw_writel(val, base + QCA955X_PLL_ETH_SGMII_CONTROL_REG);
iounmap(base);
+
+   qca955x_reset_sgmii();
 }
 
 static void qca956x_set_speed_sgmii(int speed)
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 15.05.1 - Chaos Calmer

2016-04-05 Thread Saverio Proto
Thanks Bruno,

I am sorry I am coming back to OpenWrt after a long break.

I expected the tag also on the Release repo

http://git.openwrt.org/?p=15.05/openwrt.git;a=summary

Here I see only a 15.05 tag. I dont understand the logic. I expect the
15.05.1 to be release from the Release-repo ?

thank you

Saverio


2016-04-04 22:38 GMT+02:00 Bruno Randolf :
> On 04/04/2016 09:34 PM, Saverio Proto wrote:
>>> Great! Thanks for your good work!
>>> Could you please add a tag for 15.05.1 in the git repo?
>>
>> That would be great. I am trying to git bisect a bug and I have no
>> idea on top of what commit is 15.05.1 built.
>
> There is a tag for it already:
>
> https://github.com/openwrt/openwrt/tags
>
> bruno
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC v2 5/6] ag71xx: Disable classification of fragmented packets on QCA955x

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

The QCA955x SoC family tends to hang randomly on GMAC0 when the link
speeds+duplex modes are changed. QCA recommended to disable the
classification of fragmented packets for QCA to avoid this problem.

Signed-off-by: Sven Eckelmann 
---
v2:
 - Split into multiple patches and adjust slightly to look more like an
   OpenWrt patch

 .../linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h  | 5 +
 .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c   | 3 +++
 2 files changed, 8 insertions(+)

diff --git 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
index 5d03dcf..454b4c2 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
@@ -259,6 +259,10 @@ ag71xx_ring_size_order(int size)
 #define AG71XX_REG_RX_SM   0x01b0
 #define AG71XX_REG_TX_SM   0x01b4
 
+#define QCA955X_REG_IG_ACL 0x23c
+
+#define QCA955X_FRA_DISABLE0x6000
+
 #define MAC_CFG1_TXE   BIT(0)  /* Tx Enable */
 #define MAC_CFG1_STX   BIT(1)  /* Synchronize Tx Enable */
 #define MAC_CFG1_RXE   BIT(2)  /* Rx Enable */
@@ -376,6 +380,7 @@ static inline void ag71xx_check_reg_offset(struct ag71xx 
*ag, unsigned reg)
case AG71XX_REG_MAC_CFG1 ... AG71XX_REG_MAC_MFL:
case AG71XX_REG_MAC_IFCTL ... AG71XX_REG_TX_SM:
case AG71XX_REG_MII_CFG:
+   case QCA955X_REG_IG_ACL:
break;
 
default:
diff --git 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 38226cf..0832059 100644
--- 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -474,6 +474,9 @@ static void ag71xx_hw_setup(struct ag71xx *ag)
}
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG4, FIFO_CFG4_INIT);
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG5, FIFO_CFG5_INIT);
+
+   if (pdata->is_qca955x && pdata->gmac_num == 0)
+   ag71xx_sb(ag, QCA955X_REG_IG_ACL, QCA955X_FRA_DISABLE);
 }
 
 static void ag71xx_hw_init(struct ag71xx *ag)
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC v2 3/6] ar71xx: Fix size of the QCA955x GMAC registers

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

The GMAC registers for QCA9558 are from 0x1807-0x18070067. Some of the
upper registers are required to correctly reset SGMII links on speed
changes.

Signed-off-by: Sven Eckelmann 
---
v2:
 - Split into multiple patches and adjust slightly to look more like an
   OpenWrt patch

 .../ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch   | 2 +-
 .../ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch
 
b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch
index 0126f6a..ae44285 100644
--- 
a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch
+++ 
b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch
@@ -47,7 +47,7 @@
  #define QCA955X_PCI_CTRL_SIZE 0x100
  
 +#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x0007)
-+#define QCA955X_GMAC_SIZE 0x40
++#define QCA955X_GMAC_SIZE 0x68
  #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x0010)
  #define QCA955X_WMAC_SIZE 0x2
  #define QCA955X_EHCI0_BASE0x1b00
diff --git 
a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch
 
b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch
index 0126f6a..ae44285 100644
--- 
a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch
+++ 
b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch
@@ -47,7 +47,7 @@
  #define QCA955X_PCI_CTRL_SIZE 0x100
  
 +#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x0007)
-+#define QCA955X_GMAC_SIZE 0x40
++#define QCA955X_GMAC_SIZE 0x68
  #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x0010)
  #define QCA955X_WMAC_SIZE 0x2
  #define QCA955X_EHCI0_BASE0x1b00
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC v2 4/6] ar71xx: Add QCA955X SGMII related GMAC register definitions

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

Signed-off-by: Sven Eckelmann 
---
v2:
 - Split into multiple patches and adjust slightly to look more like an
   OpenWrt patch

 .../601-MIPS-ath79-add-more-register-defines.patch | 32 +-
 .../601-MIPS-ath79-add-more-register-defines.patch | 32 +-
 2 files changed, 62 insertions(+), 2 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch
 
b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch
index ae44285..213195c 100644
--- 
a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch
+++ 
b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch
@@ -217,7 +217,7 @@
  #define AR71XX_GPIO_COUNT 16
  #define AR7240_GPIO_COUNT 18
  #define AR7241_GPIO_COUNT 20
-@@ -560,4 +671,235 @@
+@@ -560,4 +671,265 @@
  #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT13
  #define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7
  
@@ -452,4 +452,34 @@
 +#define QCA955X_ETH_CFG_TXE_DELAY_MASK0x3
 +#define QCA955X_ETH_CFG_TXE_DELAY_SHIFT   20
 +
++#define QCA955X_GMAC_REG_SGMII_RESET  0x14
++
++#define QCA955X_SGMII_RESET_HW_RX_125MBIT(4)
++#define QCA955X_SGMII_RESET_TX_125M   BIT(3)
++#define QCA955X_SGMII_RESET_RX_125M   BIT(2)
++#define QCA955X_SGMII_RESET_TX_CLKBIT(1)
++#define QCA955X_SGMII_RESET_RX_CLKBIT(0)
++
++#define QCA955X_GMAC_REG_MR_AN_CONTROL0x1c
++
++#define QCA955X_MR_AN_CONTROL_PHY_RESET   BIT(15)
++#define QCA955X_MR_AN_CONTROL_LOOPBACKBIT(14)
++#define QCA955X_MR_AN_CONTROL_SPEED_SEL0  BIT(13)
++#define QCA955X_MR_AN_CONTROL_AN_ENABLE   BIT(12)
++#define QCA955X_MR_AN_CONTROL_POWER_DOWN  BIT(11)
++#define QCA955X_MR_AN_CONTROL_RESTART_AN  BIT(9)
++#define QCA955X_MR_AN_CONTROL_DUPLEX_MODE BIT(8)
++#define QCA955X_MR_AN_CONTROL_SPEED_SEL1  BIT(6)
++
++#define QCA955X_GMAC_REG_SGMII_DEBUG  0x58
++
++#define QCA955X_SGMII_DEBUG_ARB_STATE_MASK0xf
++#define QCA955X_SGMII_DEBUG_ARB_STATE_SHIFT   24
++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_MASK0xff
++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_SHIFT   16
++#define QCA955X_SGMII_DEBUG_RX_STATE_MASK 0xff
++#define QCA955X_SGMII_DEBUG_RX_STATE_SHIFT8
++#define QCA955X_SGMII_DEBUG_TX_STATE_MASK 0xff
++#define QCA955X_SGMII_DEBUG_TX_STATE_SHIFT0
++
  #endif /* __ASM_MACH_AR71XX_REGS_H */
diff --git 
a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch
 
b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch
index ae44285..213195c 100644
--- 
a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch
+++ 
b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch
@@ -217,7 +217,7 @@
  #define AR71XX_GPIO_COUNT 16
  #define AR7240_GPIO_COUNT 18
  #define AR7241_GPIO_COUNT 20
-@@ -560,4 +671,235 @@
+@@ -560,4 +671,265 @@
  #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT13
  #define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7
  
@@ -452,4 +452,34 @@
 +#define QCA955X_ETH_CFG_TXE_DELAY_MASK0x3
 +#define QCA955X_ETH_CFG_TXE_DELAY_SHIFT   20
 +
++#define QCA955X_GMAC_REG_SGMII_RESET  0x14
++
++#define QCA955X_SGMII_RESET_HW_RX_125MBIT(4)
++#define QCA955X_SGMII_RESET_TX_125M   BIT(3)
++#define QCA955X_SGMII_RESET_RX_125M   BIT(2)
++#define QCA955X_SGMII_RESET_TX_CLKBIT(1)
++#define QCA955X_SGMII_RESET_RX_CLKBIT(0)
++
++#define QCA955X_GMAC_REG_MR_AN_CONTROL0x1c
++
++#define QCA955X_MR_AN_CONTROL_PHY_RESET   BIT(15)
++#define QCA955X_MR_AN_CONTROL_LOOPBACKBIT(14)
++#define QCA955X_MR_AN_CONTROL_SPEED_SEL0  BIT(13)
++#define QCA955X_MR_AN_CONTROL_AN_ENABLE   BIT(12)
++#define QCA955X_MR_AN_CONTROL_POWER_DOWN  BIT(11)
++#define QCA955X_MR_AN_CONTROL_RESTART_AN  BIT(9)
++#define QCA955X_MR_AN_CONTROL_DUPLEX_MODE BIT(8)
++#define QCA955X_MR_AN_CONTROL_SPEED_SEL1  BIT(6)
++
++#define QCA955X_GMAC_REG_SGMII_DEBUG  0x58
++
++#define QCA955X_SGMII_DEBUG_ARB_STATE_MASK0xf
++#define QCA955X_SGMII_DEBUG_ARB_STATE_SHIFT   24
++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_MASK0xff
++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_SHIFT   16
++#define QCA955X_SGMII_DEBUG_RX_STATE_MASK 0xff
++#define QCA955X_SGMII_DEBUG_RX_STATE_SHIFT8
++#define QCA955X_SGMII_DEBUG_TX_STATE_MASK 0xff
++#define QCA955X_SGMII_DEBUG_TX_STATE_SHIFT0
++
  #endif /* __ASM_MACH_AR71XX_REGS_H */
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org

[OpenWrt-Devel] [RFC v2 2/6] ar71xx: Save GMAC id in ag71xx_platform_data

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

The ag71xx driver must know which GMAC is is currently handling to enable
some special workarounds for this GMAC. GMAC0 has some registers on
QCA9558 which GMAC1 doesn't have.

Signed-off-by: Sven Eckelmann 
---
v2:
 - Split into multiple patches and adjust slightly to look more like an
   OpenWrt patch

 target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 1 +
 .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c 
b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index 09201c9..bfcc82f 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -871,6 +871,7 @@ void __init ath79_register_eth(unsigned int id)
 
pdata->max_frame_len = 1540;
pdata->desc_pktlen_mask = 0xfff;
+   pdata->gmac_num = id;
 
err = ath79_setup_phy_if_mode(id, pdata);
if (err) {
diff --git 
a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h 
b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
index 4db2c65..5e4edae 100644
--- 
a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
+++ 
b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
@@ -38,6 +38,8 @@ struct ag71xx_platform_data {
u8  has_ar8216:1;
u8  is_qca955x:1;
 
+   unsigned intgmac_num;
+
struct ag71xx_switch_platform_data *switch_data;
 
void(*ddr_flush)(void);
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC v2 1/6] ar71xx: Save in ag71xx_platform_data if SoC is qca955x

2016-04-05 Thread Sven Eckelmann
From: Sven Eckelmann 

The ag71xx driver must know if a device is QCA955x to enable some special
workarounds for this SoC family. Similar information are already stored in
ag71xx_platform_data and ag71xx_mdio_platform_data to adjust the behavior
of the driver.

Signed-off-by: Sven Eckelmann 
---
v2:
 - Split into multiple patches and adjust slightly to look more like an
   OpenWrt patch

 target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c  | 1 +
 .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c 
b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index b43c80a..09201c9 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -1100,6 +1100,7 @@ void __init ath79_register_eth(unsigned int id)
pdata->ddr_flush = ath79_ddr_no_flush;
pdata->has_gbit = 1;
pdata->is_ar724x = 1;
+   pdata->is_qca955x = 1;
 
/*
 * Limit the maximum frame length to 4095 bytes.
diff --git 
a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h 
b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
index d46dc4e..4db2c65 100644
--- 
a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
+++ 
b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
@@ -36,6 +36,7 @@ struct ag71xx_platform_data {
u8  is_ar7240:1;
u8  is_ar724x:1;
u8  has_ar8216:1;
+   u8  is_qca955x:1;
 
struct ag71xx_switch_platform_data *switch_data;
 
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] *****SPAM***** Fw: new important message

2016-04-05 Thread openwrt-devel-bounces
Spam detection software, running on the system "arrakis.dune.hu",
has identified this incoming email as possible spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
@@CONTACT_ADDRESS@@ for details.

Content preview:  Hello! New message, please read 

   openwrt-devel-boun...@lists.openwrt.org [...] 

Content analysis details:   (6.3 points, 5.0 required)

 pts rule name  description
 -- --
 0.0 HTML_MESSAGE   BODY: HTML included in message
 3.9 NAME_EMAIL_DIFFSender NAME is an unrelated email address
 2.4 RDNS_NONE  Delivered to internal network by a host with no rDNS

The original message was not completely plain text, and may be unsafe to
open with some email clients; in particular, it may contain a virus,
or confirm that your address can receive spam.  If you wish to view
it, it may be safer to save it to a file and open it with an editor.

--- Begin Message ---
Hello!

 

New message, please read 

 

openwrt-devel-boun...@lists.openwrt.org

--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] krikwood: Make Iconnect image use new ubi format style

2016-04-05 Thread Wojciech Dubowik
To flash first time follow instructions in commit:
"kirkwood/dockstar: use ubi(kernel, squashfs, ubifs) images"

Signed-off-by: Wojciech Dubowik 
---
 target/linux/kirkwood/base-files/lib/upgrade/platform.sh |  6 --
 target/linux/kirkwood/image/Makefile | 11 +++
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh 
b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
index be5f101..af0ac7c 100644
--- a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
+++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
@@ -14,7 +14,8 @@ platform_check_image() {
}
return 0
;;
-   "dockstar")
+   "dockstar"|\
+   "iconnect")
nand_do_platform_check $board $1
return $?
;;
@@ -39,7 +40,8 @@ platform_pre_upgrade() {
local board=$(kirkwood_board_name)
 
case "$board" in
-   "dockstar")
+   "dockstar"|\
+   "iconnect")
nand_do_upgrade $1
;;
esac
diff --git a/target/linux/kirkwood/image/Makefile 
b/target/linux/kirkwood/image/Makefile
index d38ee71..071c700 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/image.mk
 
 DEVICE_VARS += DEVICE_DTS KERNEL_SIZE PAGESIZE BLOCKSIZE SUBPAGESIZE 
KERNEL_IN_UBI
 KERNEL_LOADADDR:=0x8000
-TARGET_DEVICES = linksys-audi linksys-viper dockstar goflexnet goflexhome
+TARGET_DEVICES = linksys-audi linksys-viper dockstar goflexnet goflexhome 
iconnect
 
 define Device/Default
   KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
@@ -47,6 +47,12 @@ $(Device/dockstar)
   DEVICE_DTS := kirkwood-goflexhome
 endef
 
+define Device/iconnect
+$(Device/dockstar)
+  PROFILES := Generic ICONNECT
+  DEVICE_DTS := kirkwood-iconnect
+endef
+
 define Device/linksys-audi
   DEVICE_DTS := kirkwood-linksys-audi
   PAGESIZE := 512
@@ -176,9 +182,6 @@ Image/InstallKernel/Template/Generic=$(call 
Image/InstallKernel/Template)
 Image/BuildKernel/Template/IB62X0=$(call Image/BuildKernel/Template,ib62x0)
 Image/InstallKernel/Template/IB62X0=$(call Image/InstallKernel/Template,ib62x0)
 
-Image/BuildKernel/Template/ICONNECT=$(call Image/BuildKernel/Template,iconnect)
-Image/InstallKernel/Template/ICONNECT=$(call 
Image/InstallKernel/Template,iconnect)
-
 Image/BuildKernel/Template/IOMEGA_IX2_200=$(call 
Image/BuildKernel/Template,iomega_ix2_200)
 Image/InstallKernel/Template/IOMEGA_IX2_200=$(call 
Image/InstallKernel/Template,iomega_ix2_200)
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/3] kirkwood: Use new UBI image style for Iconnect

2016-04-05 Thread Wojciech Dubowik
Adapt Iconnect to new UBI (kernel, squashfs, ubifs) image
format.

Wojciech Dubowik (3):
  uboot-kirkwood: New ubi flash format for Iconnect
  kirkwood: Migrate Iconnect to new ubi image format
  krikwood: Make Iconnect image use new ubi format style

 .../boot/uboot-kirkwood/patches/120-iconnect.patch   | 20 
 .../kirkwood/base-files/lib/upgrade/platform.sh  |  6 --
 target/linux/kirkwood/image/Makefile | 11 +++
 target/linux/kirkwood/patches-4.4/130-iconnect.patch |  2 +-
 4 files changed, 20 insertions(+), 19 deletions(-)

-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] uboot-kirkwood: New ubi flash format for Iconnect

2016-04-05 Thread Wojciech Dubowik
Migrate Iconnect to new ubi image style like for dockstar.

Signed-off-by: Wojciech Dubowik 
---
 .../boot/uboot-kirkwood/patches/120-iconnect.patch   | 20 
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/package/boot/uboot-kirkwood/patches/120-iconnect.patch 
b/package/boot/uboot-kirkwood/patches/120-iconnect.patch
index e525ca0..cfc1403 100644
--- a/package/boot/uboot-kirkwood/patches/120-iconnect.patch
+++ b/package/boot/uboot-kirkwood/patches/120-iconnect.patch
@@ -1,6 +1,6 @@
 --- a/include/configs/iconnect.h
 +++ b/include/configs/iconnect.h
-@@ -66,30 +66,35 @@
+@@ -66,30 +66,29 @@
  #define CONFIG_ENV_IS_NOWHERE
  #endif
  #define CONFIG_ENV_SIZE   0x2
@@ -13,14 +13,12 @@
  #define CONFIG_BOOTCOMMAND \
"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
 -  "ubi part rootfs; " \
-+  "ubi part root; "   \
-   "ubifsmount ubi:rootfs; "   \
-   "ubifsload 0x80 ${kernel}; "\
+-  "ubifsmount ubi:rootfs; "   \
+-  "ubifsload 0x80 ${kernel}; "\
 -  "bootm 0x80"
-+  "ubifsload 0x70 ${fdt}; "   \
-+  "ubifsumount; " \
-+  "fdt addr 0x70; fdt resize; fdt chosen; "   \
-+  "bootz 0x80 - 0x70"
++  "ubi part ubi; "\
++  "ubi read 0x80 kernel; "\
++  "bootz 0x80"
  
  #define CONFIG_MTDPARTS \
 -  "mtdparts=orion_nand:"  \
@@ -31,7 +29,7 @@
 +  "0xe@0x0(uboot),"   \
 +  "0x2@0xe(uboot_env),"   \
 +  "0x10@0x10(second_stage_uboot),"\
-+  "-@0x20(root)\0"
++  "-@0x20(ubi)\0"
  
  #define CONFIG_EXTRA_ENV_SETTINGS \
"console=console=ttyS0,115200\0"\
@@ -39,9 +37,7 @@
"mtdparts="CONFIG_MTDPARTS  \
 -  "kernel=/boot/uImage\0" \
 -  "bootargs_root=noinitrd ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0"
-+  "kernel=/boot/zImage\0" \
-+  "fdt=/boot/iconnect.dtb\0"  \
-+  "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
++  "bootargs_root=\0"
  
  /*
   * Ethernet driver configuration
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] kirkwood: Migrate Iconnect to new ubi image format

2016-04-05 Thread Wojciech Dubowik
Default partition name is now ubi.

Signed-off-by: Wojciech Dubowik 
---
 target/linux/kirkwood/patches-4.4/130-iconnect.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/kirkwood/patches-4.4/130-iconnect.patch 
b/target/linux/kirkwood/patches-4.4/130-iconnect.patch
index c95579d..2d0a376 100644
--- a/target/linux/kirkwood/patches-4.4/130-iconnect.patch
+++ b/target/linux/kirkwood/patches-4.4/130-iconnect.patch
@@ -34,7 +34,7 @@
 -  label = "boot";
 -  reg = <0x98 0x1f40>;
 +  partition@20 {
-+  label = "root";
++  label = "ubi";
 +  reg = <0x20 0x1fe0>;
};
  };
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Fixes for LinkIt 7688

2016-04-05 Thread Adam Kent
Misc fixes for LinkIt 7688 board:

- Copy the right wireless firmware for the mt7688
- Add back '0065-mt7688-fixes.patch', left out after the move to Linux 4.4.
- Remove SPI_DEV from linux config which otherwise causes a massive warning
- Add wmac to LINKIT7688.dts so wireless works

---
 package/kernel/mt76/Makefile   |  2 +-
 target/linux/ramips/dts/LINKIT7688.dts |  4 ++
 target/linux/ramips/mt7688/config-4.4  |  2 +-
 .../ramips/patches-4.4/0065-mt7688-fixes.patch | 73 ++
 4 files changed, 79 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 8800b13..33f61cb 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -55,7 +55,7 @@ endef
 define KernelPackage/mt76/install
$(INSTALL_DIR) $(1)/lib/firmware
cp \
-   $(if $(CONFIG_TARGET_ramips_mt7628), \
+   $(if $(CONFIG_TARGET_ramips_mt7628) || 
$(CONFIG_TARGET_ramips_mt7688), \
$(PKG_BUILD_DIR)/firmware/mt7628_e1.bin \
$(PKG_BUILD_DIR)/firmware/mt7628_e2.bin \
) \
diff --git a/target/linux/ramips/dts/LINKIT7688.dts 
b/target/linux/ramips/dts/LINKIT7688.dts
index 5ec29ac..2dfb98c 100644
--- a/target/linux/ramips/dts/LINKIT7688.dts
+++ b/target/linux/ramips/dts/LINKIT7688.dts
@@ -59,6 +59,10 @@
};
};
 
+   wmac@1030 {
+   status = "okay";
+   };
+
palmbus@1000 {
spi@b00 {
status = "okay";
diff --git a/target/linux/ramips/mt7688/config-4.4 
b/target/linux/ramips/mt7688/config-4.4
index c1e8df2..2bfd3f8 100644
--- a/target/linux/ramips/mt7688/config-4.4
+++ b/target/linux/ramips/mt7688/config-4.4
@@ -193,7 +193,7 @@ CONFIG_SPI=y
 CONFIG_SPI_MASTER=y
 CONFIG_SPI_MT7621=y
 # CONFIG_SPI_RT2880 is not set
-CONFIG_SPI_SPIDEV=y
+# CONFIG_SPI_SPIDEV is not set
 CONFIG_SRCU=y
 CONFIG_SWCONFIG=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
diff --git a/target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch 
b/target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch
new file mode 100644
index 000..b96be91
--- /dev/null
+++ b/target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch
@@ -0,0 +1,73 @@
+--- a/arch/mips/ralink/mt7620.c
 b/arch/mips/ralink/mt7620.c
+@@ -107,31 +107,31 @@ static struct rt2880_pmx_group mt7620a_p
+ };
+ 
+ static struct rt2880_pmx_func pwm1_grp_mt7628[] = {
+-  FUNC("sdcx", 3, 19, 1),
++  FUNC("sdxc", 3, 19, 1),
+   FUNC("utif", 2, 19, 1),
+   FUNC("gpio", 1, 19, 1),
+   FUNC("pwm", 0, 19, 1),
+ };
+ 
+ static struct rt2880_pmx_func pwm0_grp_mt7628[] = {
+-  FUNC("sdcx", 3, 18, 1),
++  FUNC("sdxc", 3, 18, 1),
+   FUNC("utif", 2, 18, 1),
+   FUNC("gpio", 1, 18, 1),
+   FUNC("pwm", 0, 18, 1),
+ };
+ 
+ static struct rt2880_pmx_func uart2_grp_mt7628[] = {
+-  FUNC("sdcx", 3, 20, 2),
++  FUNC("sdxc", 3, 20, 2),
+   FUNC("pwm", 2, 20, 2),
+   FUNC("gpio", 1, 20, 2),
+-  FUNC("uart", 0, 20, 2),
++  FUNC("uart2", 0, 20, 2),
+ };
+ 
+ static struct rt2880_pmx_func uart1_grp_mt7628[] = {
+   FUNC("sdcx", 3, 45, 2),
+   FUNC("pwm", 2, 45, 2),
+   FUNC("gpio", 1, 45, 2),
+-  FUNC("uart", 0, 45, 2),
++  FUNC("uart1", 0, 45, 2),
+ };
+ 
+ static struct rt2880_pmx_func i2c_grp_mt7628[] = {
+@@ -143,21 +143,21 @@ static struct rt2880_pmx_func i2c_grp_mt
+ 
+ static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("reclk", 0, 36, 1) 
};
+ static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 37, 1) 
};
+-static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 15, 38) };
++static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 38, 1) };
+ static struct rt2880_pmx_func spi_grp_mt7628[] = { FUNC("spi", 0, 7, 4) };
+ 
+ static struct rt2880_pmx_func sd_mode_grp_mt7628[] = {
+   FUNC("jtag", 3, 22, 8),
+   FUNC("utif", 2, 22, 8),
+   FUNC("gpio", 1, 22, 8),
+-  FUNC("sdcx", 0, 22, 8),
++  FUNC("sdxc", 0, 22, 8),
+ };
+ 
+ static struct rt2880_pmx_func uart0_grp_mt7628[] = {
+   FUNC("-", 3, 12, 2),
+   FUNC("-", 2, 12, 2),
+   FUNC("gpio", 1, 12, 2),
+-  FUNC("uart", 0, 12, 2),
++  FUNC("uart0", 0, 12, 2),
+ };
+ 
+ static struct rt2880_pmx_func i2s_grp_mt7628[] = {
+@@ -438,6 +438,8 @@ void __init ralink_clk_init(void)
+   ralink_clk_add("1b00.spi", sys_rate);
+   ralink_clk_add("1b40.spi", sys_rate);
+   ralink_clk_add("1c00.uartlite", periph_rate);
++  ralink_clk_add("1d00.uart1", periph_rate);
++  ralink_clk_add("1e00.uart2", periph_rate);
+   ralink_clk_add("1018.wmac", xtal_rate);
+ 
+   if (IS_ENABLED(CONFIG_USB) && is_mt76x8()) {
-- 
1.9.1
___
openwrt-devel mailing list