[LEDE-DEV] [PATCH] ar71xx: fix board detection with newer RouterBOOT versions

2017-12-08 Thread Gabor Juhos
the kernel is unable to identify these boards they become unusable despite that they are supported by the current code. Update the prom_init code to convert the 'Board' kernel parameter to 'board'. After this change, the board detection works also with the new RouterBO

[LEDE-DEV] [PATCH] ar71xx: fix invalid pointer dereference in rb95x_nand_scan_fixup()

2017-12-12 Thread Gabor Juhos
c data. Fixes: 7bbf4117c6fe ("ar71xx: Add kernel 4.9 support") Signed-off-by: Gabor Juhos --- target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c b/target/linux/ar71xx/files

Re: [LEDE-DEV] [PATCH] ar71xx: fix invalid pointer dereference in rb95x_nand_scan_fixup()

2017-12-13 Thread Gabor Juhos
Hello, >> Since Linux 4.6, mtd->priv no longer points to the NAND specific >> structure. Under 4.9 it contains NULL, thus using it to access >> chip->options causes an invalid pointer dereference (FS#1200). >> >> Update the code to use the mtd_to_nand() helper under 4.9 to obtain >> the address of

[LEDE-DEV] [PATCH] ar71xx: fix invalid pointer dereference in c60_nand_scan_fixup()

2017-12-13 Thread Gabor Juhos
hip specific data. Compile tested only. Fixes: 7bbf4117c6fe ("ar71xx: Add kernel 4.9 support") Signed-off-by: Gabor Juhos --- target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-c6

[LEDE-DEV] [PATCH] kernel: fix compiler warning in mtdsplit_minor.c under 4.4

2017-12-13 Thread Gabor Juhos
s the qualifier from other partition parsers. Update it to handle mtdsplit_minor.c as well. Signed-off-by: Gabor Juhos --- target/linux/generic/pending-4.4/001-mtdsplit_backport.patch | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target/linux/generic/pending-4.4/001-mtdsplit_back

Re: [LEDE-DEV] [PATCH] ar71xx: fix invalid pointer dereference in c60_nand_scan_fixup()

2017-12-14 Thread Gabor Juhos
Hi Christian, 2017.12.14. 17:07 keltezéssel, Christian Lamparter írta: > On Wednesday, December 13, 2017 8:31:50 PM CET Gabor Juhos wrote: > >> Since Linux 4.6, mtd->priv no longer points to the NAND specific > >> structure. Under 4.9 it contains NULL, thus using it to

[LEDE-DEV] [PATCH] ar71xx: spi-rb4xx: balance clk_prepare_enable() call

2017-12-18 Thread Gabor Juhos
ounterpart of clk_prepare_enable() in both places. Fixes: c312cef223dd ("ar71xx: spi-rb4xx fix.") Signed-off-by: Gabor Juhos --- target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/driver

[LEDE-DEV] [PATCH] kernel/4.4: add missing newline character to UBI messages

2017-12-19 Thread Gabor Juhos
fix the line from above looks better in the log: [6.609182] UBI error: no valid UBI magic found inside mtd6 [6.627599] Freeing unused kernel memory: 2132K Signed-off-by: Gabor Juhos --- .../490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch | 6 +++--- .../generic

[LEDE-DEV] [PATCH] kernel/4.14: add missing newline character to UBI messages

2017-12-19 Thread Gabor Juhos
fix the line from above looks better in the log: [6.609182] UBI error: no valid UBI magic found inside mtd6 [6.627599] Freeing unused kernel memory: 2132K Signed-off-by: Gabor Juhos --- .../490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch| 4 ++-- .../generic

[LEDE-DEV] [PATCH] kernel/4.9: add missing newline character to UBI messages

2017-12-19 Thread Gabor Juhos
fix the line from above looks better in the log: [6.609182] UBI error: no valid UBI magic found inside mtd6 [6.627599] Freeing unused kernel memory: 2132K Signed-off-by: Gabor Juhos --- .../490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch| 4 ++-- .../generic

[LEDE-DEV] [PATCH] ar71xx: fix compiler warnings in mdio-bitbang.c for 4.4

2018-01-05 Thread Gabor Juhos
only. The second patch adds local_irq_{save,restore} calls. The type of the argument of these calls must be 'unsigned long', but the patch defines the variable as 'long'. Fix both patches to silence the warnings. Signed-off-by: Gabor Juhos --- .../ar71xx/patches-4.4/900-mdio_

[LEDE-DEV] [PATCH] ar71xx: sort kernel configurations

2018-01-08 Thread Gabor Juhos
The symbols in some kernel configurations of the target are in wrong order. Sort them with kconfig.pl. Signed-off-by: Gabor Juhos --- target/linux/ar71xx/config-4.4 | 4 ++-- target/linux/ar71xx/config-4.9 | 4 ++-- target/linux/ar71xx/mikrotik/config-default | 2

[LEDE-DEV] [PATCH] ar71xx: fix Kconfig dependency of the 88E6063 switch DSA driver

2018-01-08 Thread Gabor Juhos
R which has unmet direct dependencies (NET && NET_DSA) Signed-off-by: Gabor Juhos --- target/linux/ar71xx/patches-4.4/423-dsa-add-88e6063-driver.patch | 3 ++- target/linux/ar71xx/patches-4.9/423-dsa-add-88e6063-driver.patch | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff -

[LEDE-DEV] [PATCH 3/3] ar71xx/mikrotik: disable TP-Link TL-WR810N v2 board support

2018-01-08 Thread Gabor Juhos
It does not belongs to the MikroTik boards. Signed-off-by: Gabor Juhos --- target/linux/ar71xx/mikrotik/config-default | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default index da0c9dacc9..a77813d23d

[LEDE-DEV] [PATCH 1/3] ar71xx/mikrotik: disable unused ethernet switch and phy drivers

2018-01-08 Thread Gabor Juhos
framework too, because it is not required by the remaining switch drivers. This reduces the compressed kernel size by ~20KB. Signed-off-by: Gabor Juhos --- target/linux/ar71xx/mikrotik/config-default | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/ar71xx/mikrotik/config-default

[LEDE-DEV] [PATCH 2/3] ar71xx/mikrotik: disable unused MTD partitioning and split drivers

2018-01-08 Thread Gabor Juhos
Reduces the compressed kernel size by ~2.5KB. Signed-off-by: Gabor Juhos --- target/linux/ar71xx/mikrotik/config-default | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default index 815ac60e68

[LEDE-DEV] [PATCH 0/3] ar71xx/mikrotik: disable unused kernel options

2018-01-08 Thread Gabor Juhos
itch DSA driver") Gabor Juhos (3): ar71xx/mikrotik: disable unused ethernet switch and phy drivers ar71xx/mikrotik: disable unused MTD partitioning and split drivers ar71xx/mikrotik: disable TP-Link TL-WR810N v2 board support target/linux/ar71xx/mikrotik/config-default | 11 +++

[LEDE-DEV] [PATCH] ar71xx: drop mdio-gpio.h include from mach-om5pacv2.c

2018-01-09 Thread Gabor Juhos
Eckelmann Signed-off-by: Gabor Juhos --- target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c index 0480d01e2c..1ab24f9339

[LEDE-DEV] [PATCH 0/3] ar71xx: remove obsolete kernel version checks

2018-01-09 Thread Gabor Juhos
Gabor Juhos (3): ar71xx: remove obsolete '< KERNEL_VERSION(3,15,0)' checks ar71xx: remove obsolete '< KERNEL_VERSION(4,2,0)' check ar71xx: remove obsolete '< KERNEL_VERSION(4,4,0)' check target/linux/ar71xx/files/arch/mips/ath79/dev-dsa.c

[LEDE-DEV] [PATCH 2/3] ar71xx: remove obsolete '< KERNEL_VERSION(4, 2, 0)' check

2018-01-09 Thread Gabor Juhos
Because the oldest supported kernel version on the ar71xx target is 4.4, the condition that the kernel version is smaller than 4.2.0 is always false. Remove the obsolete check from ag71xx_main.c to clean up the code a bit. Signed-off-by: Gabor Juhos --- .../ar71xx/files/drivers/net/ethernet

[LEDE-DEV] [PATCH 1/3] ar71xx: remove obsolete '< KERNEL_VERSION(3, 15, 0)' checks

2018-01-09 Thread Gabor Juhos
Because the oldest supported kernel version on the ar71xx target is 4.4, the condition that the kernel version is smaller than 3.15.0 is always false. Remove the obsolete checks from the target specific source files to clean up the code a bit. Signed-off-by: Gabor Juhos --- target/linux/ar71xx

[LEDE-DEV] [PATCH 3/3] ar71xx: remove obsolete '< KERNEL_VERSION(4, 4, 0)' check

2018-01-09 Thread Gabor Juhos
Because the oldest supported kernel version on the ar71xx target is 4.4, the condition that the kernel version is smaller than 4.4.0 is always false. Remove the obsolete check from mach-rb4xx.c to clean up the code a bit. Signed-off-by: Gabor Juhos --- target/linux/ar71xx/files/arch/mips/ath79

[LEDE-DEV] [PATCH] ar71xx: mach-rbspi: simplify reset button registration

2018-01-15 Thread Gabor Juhos
registration. Signed-off-by: Gabor Juhos --- .../ar71xx/files/arch/mips/ath79/mach-rbspi.c | 94 +++--- 1 file changed, 30 insertions(+), 64 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c

[LEDE-DEV] [PATCH] ar71xx: fix format of the 701-MIPS-ath79-add-routerboard-detection patches

2018-01-15 Thread Gabor Juhos
4 ("ar71xx: add support for MikroTik RouterBOARD wAPG-5HacT2HnD (wAP AC") Signed-off-by: Gabor Juhos --- .../ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch | 2 +- .../ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch | 2 +- 2 files changed, 2 insert

[LEDE-DEV] [PATCH] ar71xx: fix format of the 741-MIPS-ath79-add-PCI-for-QCA9556-SoC patches

2018-01-15 Thread Gabor Juhos
;ar71xx: kernel: enable PCI on QCA9556 SoC") Signed-off-by: Gabor Juhos --- .../patches-4.4/741-MIPS-ath79-add-PCI-for-QCA9556-SoC.patch | 12 ++-- .../patches-4.9/741-MIPS-ath79-add-PCI-for-QCA9556-SoC.patch | 12 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff -

[LEDE-DEV] [PATCH 2/4] ar71xx: mach-rbspi: return rb_info from rbspi_platform_setup

2018-01-18 Thread Gabor Juhos
that those handle the new return value correctly. Signed-off-by: Gabor Juhos --- .../ar71xx/files/arch/mips/ath79/mach-rbspi.c | 26 +++--- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux

[LEDE-DEV] [PATCH 3/4] ar71xx: make leds-gpio usable with single-ended GPIOs

2018-01-18 Thread Gabor Juhos
Add patches for the leds-gpio driver to make it usable with open-drain and open-source kind of GPIO lines. This type of functionality is required by various MikroTik boards. Signed-off-by: Gabor Juhos --- ...llow-to-use-OPEN_-DRAIN-SOURCE-flags-with.patch | 45 ++ ...llow

[LEDE-DEV] [PATCH 0/4] ar71xx: add support for the MikroTik RB911 Lite2/Lite5 boards

2018-01-18 Thread Gabor Juhos
The patch set add support for the MikroTik RB911 Lite2 (RB911-2Hn) and MikroTik RB911 Lite5 (RB911-5Hn) boards. Gabor Juhos (4): ar71xx: add definitions for RouterBOARD hardware option bits ar71xx: mach-rbspi: return rb_info from rbspi_platform_setup ar71xx: make leds-gpio usable with

[LEDE-DEV] [PATCH 4/4] ar71xx: add support for the MikroTik RB911-2Hn/5Hn boards

2018-01-18 Thread Gabor Juhos
: Gabor Juhos --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 + .../linux/ar71xx/base-files/etc/board.d/02_network | 2 + target/linux/ar71xx/base-files/etc/diag.sh | 2 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 6 ++ .../ar71xx/base-files/lib/upgrade

[LEDE-DEV] [PATCH 1/4] ar71xx: add definitions for RouterBOARD hardware option bits

2018-01-18 Thread Gabor Juhos
, introduce two helper functions what make the processing of the hardware options easy. Signed-off-by: Gabor Juhos --- .../ar71xx/files/arch/mips/ath79/routerboot.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/routerboot.h

[LEDE-DEV] [PATCH] kernel/4.{4, 9}: add manufacturer ID for Winbond NANDs

2018-01-18 Thread Gabor Juhos
patch from 4.11 to show the manufacturer correctly: nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1 nand: Winbond NAND 128MiB 3,3V 8-bit nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 Tested on a MikroTik R951Ui-2HnD board. Signed-off-by: Gabor Juhos