mbox series

[LEDE-DEV,0/4] ar71xx: add support for kernel 4.9

Message ID 20171007212049.11361-1-hauke@hauke-m.de
Headers show
Series ar71xx: add support for kernel 4.9 | expand

Message

Hauke Mehrtens Oct. 7, 2017, 9:20 p.m. UTC
This adds support for kernel 4.9.
Please test this, I am lacking especially NAND devices.

The most recent version of these patches can be found here:
https://git.lede-project.org/?p=lede/hauke/staging.git;a=shortlog;h=refs/heads/ar71xx

Hauke Mehrtens (4):
  ar71xx: Copy kernel 4.4 code for kernel 4.9
  ar71xx: make the target compile with kernel 4.9
  ar71xx: fix section mismatches
  ar71xx: switch to kernel 4.9 by default

 target/linux/ar71xx/Makefile                       |   2 +-
 target/linux/ar71xx/config-4.9                     | 485 +++++++++++
 .../files/arch/mips/ath79/mach-archer-c25-v1.c     |   2 +-
 .../files/arch/mips/ath79/mach-archer-c59-v1.c     |   2 +-
 .../ar71xx/files/arch/mips/ath79/mach-archer-c7.c  |   2 +-
 .../linux/ar71xx/files/arch/mips/ath79/mach-c60.c  |  56 ++
 .../ar71xx/files/arch/mips/ath79/mach-mynet-n750.c |   2 +-
 .../ar71xx/files/arch/mips/ath79/mach-rb2011.c     |  60 +-
 .../ar71xx/files/arch/mips/ath79/mach-rb91x.c      |   2 +-
 .../ar71xx/files/arch/mips/ath79/mach-rb922.c      |  58 ++
 .../ar71xx/files/arch/mips/ath79/mach-rb95x.c      |  56 ++
 .../ar71xx/files/arch/mips/ath79/mach-rbspi.c      |   2 +-
 .../ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c  |  58 ++
 .../ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c |   2 +-
 .../files/arch/mips/ath79/mach-tl-wr942n-v1.c      |   2 +-
 .../ar71xx/files/drivers/gpio/gpio-nxp-74hc153.c   |   4 +
 .../linux/ar71xx/files/drivers/leds/leds-nu801.c   |   8 +-
 .../linux/ar71xx/files/drivers/mtd/cybertan_part.c |   5 +
 .../ar71xx/files/drivers/mtd/nand/ar934x_nfc.c     |  62 +-
 .../ar71xx/files/drivers/mtd/nand/rb4xx_nand.c     |  56 ++
 .../ar71xx/files/drivers/mtd/nand/rb750_nand.c     |  56 ++
 .../ar71xx/files/drivers/mtd/nand/rb91x_nand.c     |  56 ++
 target/linux/ar71xx/files/drivers/mtd/tplinkpart.c |  13 +
 .../linux/ar71xx/files/drivers/net/dsa/mv88e6063.c | 104 +--
 .../net/ethernet/atheros/ag71xx/ag71xx_mdio.c      |   4 +
 .../net/ethernet/atheros/ag71xx/ag71xx_phy.c       |  28 +-
 .../ar71xx/files/drivers/spi/spi-rb4xx-cpld.c      |   5 +
 target/linux/ar71xx/mikrotik/config-default        |   2 +-
 target/linux/ar71xx/nand/config-default            |   2 +-
 .../linux/ar71xx/patches-4.9/001-spi-cs-gpio.patch |  20 +
 .../002-add_back_gpio_function_select.patch        |  92 +++
 .../004-register_gpio_driver_earlier.patch         |  15 +
 ...th79-Avoid-using-unitialized-reg-variable.patch |  42 +
 ...fix-register-address-in-ath79_ddr_wb_flus.patch |  23 +
 ...79-support-multiple-internal-chip-select-.patch |  70 ++
 ...79-use-gpio_set_value_cansleep-for-GPIO-c.patch |  19 +
 ...h79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch |  29 +
 ...PS-ath79-do-AR724x-PCIe-root-complex-init.patch | 113 +++
 .../200-MIPS-ath79-fix-ar933x-wmac-reset.patch     |  30 +
 .../201-ar913x_wmac_external_reset.patch           |  31 +
 .../202-MIPS-ath79-ar934x-wmac-revision.patch      |  11 +
 .../patches-4.9/203-MIPS-ath79-fix-restart.patch   |  20 +
 .../220-add_cpu_feature_overrides.patch            |  28 +
 .../300-MIPS-add-MIPS_MACHINE_NONAME-macro.patch   |  21 +
 .../310-lib-add-rle-decompression.patch            | 124 +++
 .../401-mtd-physmap-add-lock-unlock.patch          |  94 +++
 .../patches-4.9/402-mtd-SST39VF6401B-support.patch |  29 +
 .../403-mtd_fix_cfi_cmdset_0002_status_check.patch |  69 ++
 .../patches-4.9/404-mtd-cybertan-trx-parser.patch  |  25 +
 .../405-mtd-tp-link-partition-parser.patch         |  25 +
 ...low-to-pass-probe-types-via-platform-data.patch |  34 +
 .../408-mtd-redboot_partition_scan.patch           |  44 +
 .../patches-4.9/409-mtd-rb4xx_nand_driver.patch    |  21 +
 .../patches-4.9/410-mtd-rb750-nand-driver.patch    |  21 +
 .../411-mtd-cfi_cmdset_0002-force-word-write.patch |  61 ++
 .../patches-4.9/413-mtd-ar934x-nand-driver.patch   |  25 +
 .../patches-4.9/414-mtd-rb91x-nand-driver.patch    |  23 +
 .../patches-4.9/420-net-ar71xx_mac_driver.patch    |  28 +
 .../patches-4.9/423-dsa-add-88e6063-driver.patch   |  24 +
 .../430-drivers-link-spi-before-mtd.patch          |  12 +
 .../patches-4.9/432-spi-rb4xx-spi-driver.patch     |  25 +
 .../patches-4.9/433-spi-rb4xx-cpld-driver.patch    |  26 +
 .../patches-4.9/435-spi-vsc7385_driver.patch       |  24 +
 .../440-leds-wndr3700-usb-led-driver.patch         |  26 +
 .../patches-4.9/441-leds-rb750-led-driver.patch    |  23 +
 .../450-gpio-nxp-74hc153-gpio-chip-driver.patch    |  25 +
 ...io-74x164-improve-platform-device-support.patch | 117 +++
 .../452-gpio-add-gpio-latch-driver.patch           |  22 +
 .../461-spi-ath79-add-fast-flash-read.patch        |  54 ++
 ...MIPS-ath79-swizzle-pci-address-for-ar71xx.patch | 111 +++
 .../490-usb-ehci-add-quirks-for-qca-socs.patch     | 103 +++
 .../ar71xx/patches-4.9/500-MIPS-fw-myloader.patch  |  22 +
 ...9-add-mac-argument-to-ath79_register_wmac.patch |  70 ++
 ...504-MIPS-ath79-add-ath79_device_reset_get.patch |  42 +
 ...MIPS-ath79-add-ath79_gpio_function_select.patch |  39 +
 .../506-MIPS-ath79-prom-parse-redboot-args.patch   |  42 +
 .../507-MIPS-ath79-prom-add-myloader-support.patch |  55 ++
 ...8-MIPS-ath79-prom-image-command-line-hack.patch |  73 ++
 ...09-MIPS-ath79-process-board-kernel-option.patch |  11 +
 ...0-MIPS-ath79-init-gpio-pin-of-wmac-device.patch |  14 +
 .../520-MIPS-ath79-enable-UART-function.patch      |  18 +
 ...1-MIPS-ath79-enable-UART-for-early_serial.patch |  61 ++
 ...h79-add-ath79_wmac_register_simple-helper.patch |  21 +
 .../patches-4.9/523-MIPS-ath79-OTP-support.patch   | 192 +++++
 ...th79-add-ath79_wmac_disable_25ghz-helpers.patch |  31 +
 .../525-MIPS-ath79-enable-qca-usb-quirks.patch     | 101 +++
 .../601-MIPS-ath79-add-more-register-defines.patch | 455 +++++++++++
 .../602-MIPS-ath79-add-openwrt-stuff.patch         |  49 ++
 .../patches-4.9/603-MIPS-ath79-ap121-fixes.patch   | 149 ++++
 .../patches-4.9/605-MIPS-ath79-db120-fixes.patch   | 204 +++++
 .../patches-4.9/606-MIPS-ath79-pb44-fixes.patch    | 146 ++++
 .../patches-4.9/607-MIPS-ath79-ubnt-xm-fixes.patch |  14 +
 .../608-MIPS-ath79-ubnt-xm-add-more-boards.patch   |  20 +
 .../patches-4.9/609-MIPS-ath79-ap136-fixes.patch   | 300 +++++++
 .../patches-4.9/611-MIPS-ath79-wdt-timeout.patch   |  25 +
 .../612-MIPS-ath79-set-buffalo-txgain.patch        |  24 +
 ...-add-ath79_wmac_setup_ext_lna_gpio-helper.patch |  76 ++
 ...20-MIPS-ath79-add-support-for-QCA953x-SoC.patch | 705 ++++++++++++++++
 ...21-MIPS-ath79-add-support-for-QCA956x-SoC.patch | 717 +++++++++++++++++
 ...add-more-register-defines-for-QCA956x-SoC.patch |  38 +
 .../630-MIPS-ath79-fix-chained-irq-disable.patch   | 106 +++
 .../631-MIPS-ath79-wmac-enable-set-led-pin.patch   |  24 +
 .../632-MIPS-ath79-gpio-enable-set-direction.patch |  32 +
 .../640-MIPS-ath79-add-QCA955x-wmac-reset.patch    |  82 ++
 .../700-MIPS-ath79-add-openwrt-Kconfig.patch       |  11 +
 .../701-MIPS-ath79-add-routerboard-detection.patch |  30 +
 ...79-add-gpio-func-register-for-QCA955x-SoC.patch |  38 +
 .../740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch   |  44 +
 .../818-MIPS-ath79-add-nu801-led-driver.patch      |  26 +
 .../820-MIPS-ath79-add_gpio_function2_setup.patch  |  67 ++
 .../900-mdio_bitbang_ignore_ta_value.patch         |  32 +
 ...tbang-prevent-rescheduling-during-command.patch |  61 ++
 .../902-at803x-add-reset-gpio-pdata.patch          |  68 ++
 .../patches-4.9/910-unaligned_access_hacks.patch   | 888 +++++++++++++++++++++
 .../920-usb-chipidea-AR933x-platform-support.patch | 123 +++
 .../ar71xx/patches-4.9/930-chipidea-pullup.patch   |  72 ++
 116 files changed, 8312 insertions(+), 81 deletions(-)
 create mode 100644 target/linux/ar71xx/config-4.9
 create mode 100644 target/linux/ar71xx/patches-4.9/001-spi-cs-gpio.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/002-add_back_gpio_function_select.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/004-register_gpio_driver_earlier.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/100-MIPS-ath79-Avoid-using-unitialized-reg-variable.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/104-spi-spi-ath79-support-multiple-internal-chip-select-.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/105-spi-spi-ath79-use-gpio_set_value_cansleep-for-GPIO-c.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/106-02-MIPS-ath79-do-AR724x-PCIe-root-complex-init.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/200-MIPS-ath79-fix-ar933x-wmac-reset.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/201-ar913x_wmac_external_reset.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/202-MIPS-ath79-ar934x-wmac-revision.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/203-MIPS-ath79-fix-restart.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/220-add_cpu_feature_overrides.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/300-MIPS-add-MIPS_MACHINE_NONAME-macro.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/310-lib-add-rle-decompression.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/401-mtd-physmap-add-lock-unlock.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/402-mtd-SST39VF6401B-support.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/404-mtd-cybertan-trx-parser.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/405-mtd-tp-link-partition-parser.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/408-mtd-redboot_partition_scan.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/409-mtd-rb4xx_nand_driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/410-mtd-rb750-nand-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/411-mtd-cfi_cmdset_0002-force-word-write.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/413-mtd-ar934x-nand-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/414-mtd-rb91x-nand-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/420-net-ar71xx_mac_driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/423-dsa-add-88e6063-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/430-drivers-link-spi-before-mtd.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/432-spi-rb4xx-spi-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/433-spi-rb4xx-cpld-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/435-spi-vsc7385_driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/440-leds-wndr3700-usb-led-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/441-leds-rb750-led-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/451-gpio-74x164-improve-platform-device-support.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/461-spi-ath79-add-fast-flash-read.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/470-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/490-usb-ehci-add-quirks-for-qca-socs.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/500-MIPS-fw-myloader.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/504-MIPS-ath79-add-ath79_device_reset_get.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/505-MIPS-ath79-add-ath79_gpio_function_select.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/506-MIPS-ath79-prom-parse-redboot-args.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/507-MIPS-ath79-prom-add-myloader-support.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/508-MIPS-ath79-prom-image-command-line-hack.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/509-MIPS-ath79-process-board-kernel-option.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/510-MIPS-ath79-init-gpio-pin-of-wmac-device.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/520-MIPS-ath79-enable-UART-function.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/521-MIPS-ath79-enable-UART-for-early_serial.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/522-MIPS-ath79-add-ath79_wmac_register_simple-helper.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/523-MIPS-ath79-OTP-support.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/524-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/525-MIPS-ath79-enable-qca-usb-quirks.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/601-MIPS-ath79-add-more-register-defines.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/602-MIPS-ath79-add-openwrt-stuff.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/603-MIPS-ath79-ap121-fixes.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/605-MIPS-ath79-db120-fixes.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/606-MIPS-ath79-pb44-fixes.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/607-MIPS-ath79-ubnt-xm-fixes.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/608-MIPS-ath79-ubnt-xm-add-more-boards.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/609-MIPS-ath79-ap136-fixes.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/611-MIPS-ath79-wdt-timeout.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/612-MIPS-ath79-set-buffalo-txgain.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/620-MIPS-ath79-add-support-for-QCA953x-SoC.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/621-MIPS-ath79-add-support-for-QCA956x-SoC.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/630-MIPS-ath79-fix-chained-irq-disable.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/631-MIPS-ath79-wmac-enable-set-led-pin.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/632-MIPS-ath79-gpio-enable-set-direction.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/640-MIPS-ath79-add-QCA955x-wmac-reset.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/700-MIPS-ath79-add-openwrt-Kconfig.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/818-MIPS-ath79-add-nu801-led-driver.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/820-MIPS-ath79-add_gpio_function2_setup.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/900-mdio_bitbang_ignore_ta_value.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/901-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/902-at803x-add-reset-gpio-pdata.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/920-usb-chipidea-AR933x-platform-support.patch
 create mode 100644 target/linux/ar71xx/patches-4.9/930-chipidea-pullup.patch

Comments

Arjen de Korte Oct. 8, 2017, 10:03 a.m. UTC | #1
Citeren Hauke Mehrtens <hauke@hauke-m.de>:

> This adds support for kernel 4.9.
> Please test this, I am lacking especially NAND devices.
>
> The most recent version of these patches can be found here:
> https://git.lede-project.org/?p=lede/hauke/staging.git;a=shortlog;h=refs/heads/ar71xx
>
> Hauke Mehrtens (4):
>   ar71xx: Copy kernel 4.4 code for kernel 4.9
>   ar71xx: make the target compile with kernel 4.9
>   ar71xx: fix section mismatches
>   ar71xx: switch to kernel 4.9 by default

I checked the above patches on a WNDR4300 (a NAND device). No issues  
when building, but the device entered a bootloop after flashing with  
sysupgrade. Since this is a production system, I didn't have time to  
dig into what is exactly causing this.
Andrey Jr. Melnikov Oct. 8, 2017, 11:31 a.m. UTC | #2
Arjen de Korte <arjen+lede@de-korte.org> wrote:
> Citeren Hauke Mehrtens <hauke@hauke-m.de>:

> > This adds support for kernel 4.9.
> > Please test this, I am lacking especially NAND devices.
> >
> > The most recent version of these patches can be found here:
> > https://git.lede-project.org/?p=lede/hauke/staging.git;a=shortlog;h=refs/heads/ar71xx
> >
> > Hauke Mehrtens (4):
> >   ar71xx: Copy kernel 4.4 code for kernel 4.9
> >   ar71xx: make the target compile with kernel 4.9
> >   ar71xx: fix section mismatches
> >   ar71xx: switch to kernel 4.9 by default

> I checked the above patches on a WNDR4300 (a NAND device). No issues  
> when building, but the device entered a bootloop after flashing with  
> sysupgrade. Since this is a production system, I didn't have time to  
> dig into what is exactly causing this.

ar934x NAND driver missing cmd_ctrl() function - so NAND devices not work at all.

[    3.575549] nand: chip.cmd_ctrl() callback is not provided
[    3.581103] ar934x-nfc ar934x-nfc: nand_scan_ident failed, err:-22
[    3.587515] ar934x-nfc: probe of ar934x-nfc failed with error -22
Hauke Mehrtens Oct. 8, 2017, 1:08 p.m. UTC | #3
On 10/08/2017 01:31 PM, Andrey Jr. Melnikov wrote:
> Arjen de Korte <arjen+lede@de-korte.org> wrote:
>> Citeren Hauke Mehrtens <hauke@hauke-m.de>:
> 
>>> This adds support for kernel 4.9.
>>> Please test this, I am lacking especially NAND devices.
>>>
>>> The most recent version of these patches can be found here:
>>> https://git.lede-project.org/?p=lede/hauke/staging.git;a=shortlog;h=refs/heads/ar71xx
>>>
>>> Hauke Mehrtens (4):
>>>   ar71xx: Copy kernel 4.4 code for kernel 4.9
>>>   ar71xx: make the target compile with kernel 4.9
>>>   ar71xx: fix section mismatches
>>>   ar71xx: switch to kernel 4.9 by default
> 
>> I checked the above patches on a WNDR4300 (a NAND device). No issues  
>> when building, but the device entered a bootloop after flashing with  
>> sysupgrade. Since this is a production system, I didn't have time to  
>> dig into what is exactly causing this.
> 
> ar934x NAND driver missing cmd_ctrl() function - so NAND devices not work at all.
> 
> [    3.575549] nand: chip.cmd_ctrl() callback is not provided
> [    3.581103] ar934x-nfc ar934x-nfc: nand_scan_ident failed, err:-22
> [    3.587515] ar934x-nfc: probe of ar934x-nfc failed with error -22

Hi,

Thanks for testing and reporting back.

I tried to fix this problem, can you please try the most recent version
from my git tree. This now has this additional change:
https://git.lede-project.org/?p=lede/hauke/staging.git;a=commitdiff;h=42a49cbca96875be43913688da60d637cbdff604

Hauke
Arjen de Korte Oct. 8, 2017, 4:52 p.m. UTC | #4
Citeren Hauke Mehrtens <hauke@hauke-m.de>:

> On 10/08/2017 01:31 PM, Andrey Jr. Melnikov wrote:
>> Arjen de Korte <arjen+lede@de-korte.org> wrote:
>>> Citeren Hauke Mehrtens <hauke@hauke-m.de>:
>>
>>>> This adds support for kernel 4.9.
>>>> Please test this, I am lacking especially NAND devices.
>>>>
>>>> The most recent version of these patches can be found here:
>>>> https://git.lede-project.org/?p=lede/hauke/staging.git;a=shortlog;h=refs/heads/ar71xx
>>>>
>>>> Hauke Mehrtens (4):
>>>>   ar71xx: Copy kernel 4.4 code for kernel 4.9
>>>>   ar71xx: make the target compile with kernel 4.9
>>>>   ar71xx: fix section mismatches
>>>>   ar71xx: switch to kernel 4.9 by default
>>
>>> I checked the above patches on a WNDR4300 (a NAND device). No issues
>>> when building, but the device entered a bootloop after flashing with
>>> sysupgrade. Since this is a production system, I didn't have time to
>>> dig into what is exactly causing this.
>>
>> ar934x NAND driver missing cmd_ctrl() function - so NAND devices  
>> not work at all.
>>
>> [    3.575549] nand: chip.cmd_ctrl() callback is not provided
>> [    3.581103] ar934x-nfc ar934x-nfc: nand_scan_ident failed, err:-22
>> [    3.587515] ar934x-nfc: probe of ar934x-nfc failed with error -22
>
> Hi,
>
> Thanks for testing and reporting back.
>
> I tried to fix this problem, can you please try the most recent version
> from my git tree. This now has this additional change:
> https://git.lede-project.org/?p=lede/hauke/staging.git;a=commitdiff;h=42a49cbca96875be43913688da60d637cbdff604

Tested your staging tree on a WNDR4300, looking well. I'll keep an eye  
on it over the next few days.

Regards, Arjen
Hannu Nyman Oct. 8, 2017, 6:33 p.m. UTC | #5
Thanks.

I compiled kernel 4.9 for my old WNDR3700v2 and WNDR3800. Both routers booted 
ok and seem to work ok at the first glance.
Kevin Darbyshire-Bryant Oct. 9, 2017, 9:27 a.m. UTC | #6
On 07/10/17 22:20, Hauke Mehrtens wrote:
> This adds support for kernel 4.9.
> Please test this, I am lacking especially NAND devices.
> 
> The most recent version of these patches can be found here:
> https://git.lede-project.org/?p=lede/hauke/staging.git;a=shortlog;h=refs/heads/ar71xx

Tried your latest rebase 42a49cb on Archer C7 v2 - looks good - nothing 
exploded so far (sadly not NAND based) :-)

Kevin
Andrey Jr. Melnikov Oct. 9, 2017, 11:28 a.m. UTC | #7
Hauke Mehrtens <hauke@hauke-m.de> wrote:
> On 10/08/2017 01:31 PM, Andrey Jr. Melnikov wrote:
> > Arjen de Korte <arjen+lede@de-korte.org> wrote:
> >> Citeren Hauke Mehrtens <hauke@hauke-m.de>:
> > 
> >>> This adds support for kernel 4.9.
> >>> Please test this, I am lacking especially NAND devices.
> >>>
> >>> The most recent version of these patches can be found here:
> >>> https://git.lede-project.org/?p=lede/hauke/staging.git;a=shortlog;h=refs/heads/ar71xx
> >>>
> >>> Hauke Mehrtens (4):
> >>>   ar71xx: Copy kernel 4.4 code for kernel 4.9
> >>>   ar71xx: make the target compile with kernel 4.9
> >>>   ar71xx: fix section mismatches
> >>>   ar71xx: switch to kernel 4.9 by default
> > 
> >> I checked the above patches on a WNDR4300 (a NAND device). No issues  
> >> when building, but the device entered a bootloop after flashing with  
> >> sysupgrade. Since this is a production system, I didn't have time to  
> >> dig into what is exactly causing this.
> > 
> > ar934x NAND driver missing cmd_ctrl() function - so NAND devices not work at all.
> > 
> > [    3.575549] nand: chip.cmd_ctrl() callback is not provided
> > [    3.581103] ar934x-nfc ar934x-nfc: nand_scan_ident failed, err:-22
> > [    3.587515] ar934x-nfc: probe of ar934x-nfc failed with error -22

> Hi,

> Thanks for testing and reporting back.

> I tried to fix this problem, can you please try the most recent version
> from my git tree. This now has this additional change:
> https://git.lede-project.org/?p=lede/hauke/staging.git;a=commitdiff;h=42a49cbca96875be43913688da60d637cbdff604

Tested on mikrotik rb2011 (2011r5)

NAND working:

[    3.576007] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1  
[    3.582617] nand: Unknown NAND 128MiB 3,3V 8-bit
[    3.587387] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.595261] Scanning device for bad blocks
[    3.645341] Bad eraseblock 889 at 0x000006f20000
[    3.657026] Creating 3 MTD partitions on "ar934x-nfc":
[    3.662371] 0x000000000000-0x000000040000 : "booter"
[    3.669186] 0x000000040000-0x000000400000 : "kernel" 
[    3.676383] 0x000000400000-0x000008000000 : "ubi"
[    3.687064] libphy: Fixed MDIO Bus: probed

USB working, ethernet working, SFP not working.
Hauke Mehrtens Oct. 9, 2017, 10:16 p.m. UTC | #8
On 10/09/2017 01:28 PM, Andrey Jr. Melnikov wrote:
> Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> On 10/08/2017 01:31 PM, Andrey Jr. Melnikov wrote:
>>> Arjen de Korte <arjen+lede@de-korte.org> wrote:
>>>> Citeren Hauke Mehrtens <hauke@hauke-m.de>:
>>>
>>>>> This adds support for kernel 4.9.
>>>>> Please test this, I am lacking especially NAND devices.
>>>>>
>>>>> The most recent version of these patches can be found here:
>>>>> https://git.lede-project.org/?p=lede/hauke/staging.git;a=shortlog;h=refs/heads/ar71xx
>>>>>
>>>>> Hauke Mehrtens (4):
>>>>>   ar71xx: Copy kernel 4.4 code for kernel 4.9
>>>>>   ar71xx: make the target compile with kernel 4.9
>>>>>   ar71xx: fix section mismatches
>>>>>   ar71xx: switch to kernel 4.9 by default
>>>
>>>> I checked the above patches on a WNDR4300 (a NAND device). No issues  
>>>> when building, but the device entered a bootloop after flashing with  
>>>> sysupgrade. Since this is a production system, I didn't have time to  
>>>> dig into what is exactly causing this.
>>>
>>> ar934x NAND driver missing cmd_ctrl() function - so NAND devices not work at all.
>>>
>>> [    3.575549] nand: chip.cmd_ctrl() callback is not provided
>>> [    3.581103] ar934x-nfc ar934x-nfc: nand_scan_ident failed, err:-22
>>> [    3.587515] ar934x-nfc: probe of ar934x-nfc failed with error -22
> 
>> Hi,
> 
>> Thanks for testing and reporting back.
> 
>> I tried to fix this problem, can you please try the most recent version
>> from my git tree. This now has this additional change:
>> https://git.lede-project.org/?p=lede/hauke/staging.git;a=commitdiff;h=42a49cbca96875be43913688da60d637cbdff604
> 
> Tested on mikrotik rb2011 (2011r5)
> 
> NAND working:
> 
> [    3.576007] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1  
> [    3.582617] nand: Unknown NAND 128MiB 3,3V 8-bit
> [    3.587387] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
> [    3.595261] Scanning device for bad blocks
> [    3.645341] Bad eraseblock 889 at 0x000006f20000
> [    3.657026] Creating 3 MTD partitions on "ar934x-nfc":
> [    3.662371] 0x000000000000-0x000000040000 : "booter"
> [    3.669186] 0x000000040000-0x000000400000 : "kernel" 
> [    3.676383] 0x000000400000-0x000008000000 : "ubi"
> [    3.687064] libphy: Fixed MDIO Bus: probed
> 
> USB working, ethernet working, SFP not working.

Hi,

Was SFP working before?

If it was working with kernel 4.4, what does not work any more?

Hauke
Andrey Jr. Melnikov Oct. 10, 2017, 11:20 a.m. UTC | #9
Hauke Mehrtens <hauke@hauke-m.de> wrote:
> On 10/09/2017 01:28 PM, Andrey Jr. Melnikov wrote:
> > Hauke Mehrtens <hauke@hauke-m.de> wrote:
> >> On 10/08/2017 01:31 PM, Andrey Jr. Melnikov wrote:
> >>> Arjen de Korte <arjen+lede@de-korte.org> wrote:
> >>>> Citeren Hauke Mehrtens <hauke@hauke-m.de>:

[....]
 
> > USB working, ethernet working, SFP not working.

> Hi,

> Was SFP working before?

Don't know. There is four hardware revision G/L/LS/US/R5. 
Each board contains SPI bus (with flash and optional TouchScreen and LCD
device), I2C bus, GPIO controlled POE.

> If it was working with kernel 4.4, what does not work any more?
Maybe it work for other hardware revision, but not for R5. Still
investigate.