aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
Commit message (Collapse)AuthorAgeFilesLines
* ath79: add support for Buffalo WZR-HP-AG300HBernhard Frauendienst2018-09-107-27/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo WZR-HP-AG300H is a dual band router based on Qualcom Atheros AR7161 rev 2 Specification: - 680 MHz CPU (Qualcomm Atheros AR7161) - 128 MiB RAM (2x Samsung K4H511638G-LCCC) - 32 MiB Flash (2x Winbond 25Q128BVFG) - WiFi 5 GHz a/n (Atheros AR9220) - WiFi 2.4 GHz b/g/n (Atheros AR9223) - 1000Base-T WAN (Atheros AR7161) - 4x 1000Base-T Switch (Atheros AR8316) - 1x USB 2.0 - 3 Buttons (AOSS/WPS, Reset, USB Eject) - 2 Slide switches (Router (on/off/auto), Movie Engine (on/off)) - 9 LEDs (Power green, WLAN 2GHz green, WLAN 2GHz amber, WLAN 5GHz green, WLAN 5GHz LED amber, Router green, Diag red, Movie Engine blue, USB green) It is already supported by the ar71xx target. For more information on the device visit the wiki: <https://openwrt.org/toh/buffalo/wzr-hp-ag300h> Serial console: - The UART Header is next to Movie Engine Switch. - Pinout is RX - TX - GND - 3.3V (Square Pad is 3.3V) - The Serial setting is 115200-8-N-1. Installation of OpenWRT from vendor firmware: - Connect to the Web-interface at http://192.168.11.1 - Go to “Administration” → “Firmware Upgrade” - Upload the OpenWrt factory image Tested: - Ethernet (LAN, WAN) - WiFi - Installation - via TFTP rescue - via factory image - on firmware v1.77 (28-05-2012) - on pro firmware v24SP2 r30356 (26-03-2018) - via sysupgrade from ar71xx (wlan devices don't work because of new names) - via sysupgrade from itself - Buttons - LEDS - USB (Power control and device recognition) Signed-off-by: Bernhard Frauendienst <openwrt@nospam.obeliks.de>
* kernel: add driver for virtual mtd_concat devicesBernhard Frauendienst2018-09-103-0/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | Some systems require multiple flash chips to be concatenated and read as a single mtd device. The ar71xx target provides custom code to create such mtdconcat devices. When porting devices to ath79, however, there is no way to create such devices from within the device tree. This commit adds a driver for creating virtual mtd-concat devices to the ath79 target. Nodes must have a compatible = "virtual,mtd-concat" line, and define a list of devices to concat in the 'devices' property, for example: flash { compatible = "virtual,mtd-concat"; devices = <&flash0 &flash1>; }; The driver is added to the very end of the mtd Makefile to increase the likelyhood of all child devices already being loaded at the time of probing, preventing unnecessary deferred probes which might in turn cause other problems (like failure to load MAC addresses from art because the partitions are not loaded yet). Signed-off-by: Bernhard Frauendienst <openwrt@nospam.obeliks.de>
* ath79: add support for ELECOM WRC-300GHBK2-IINAGAKI Hiroshi2018-09-103-0/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-300GHBK2-I is a 2.4 GHz wireless router, based on Qualcomm Atheros QCA9563. Specification: - Qualcomm Atheros QCA9563 - 64 MB of RAM (DDR2) - 8 MB of Flash (SPI-NOR) - 2T2R 2.4 GHz wifi - SoC internal - 5x 10/100/1000 Mbps Ethernet - 3x LEDs, 4x keys(connected to GPIO: 3x) - UART header on PCB - TX, GND, RX, Vcc from ethernet port side - 115200n8 Flash instruction using factory image: 1. Boot the WRC-300GHBK2-I normaly and connect the computer to its LAN port 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新 手動更新(アップデート)") 3. Select the OpenWrt factory image and click apply ("適用") button to perform firmware update 4. On the (initramfs) factory image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with squashfs-sysupgrade image for WRC-300GHBK2-I 5. Wait ~150 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* kernel: backport i2c-gpio working over slow can_sleep GPIOsMartin Schiller2018-09-102-0/+168
| | | | Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* kernel: backport rtc ds1308 support to 4.9Martin Schiller2018-09-101-0/+51
| | | | Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* mvebu: Replace RTC initialization patch with upstreamed versionRosen Penev2018-09-103-74/+78
| | | | | | | | | While we're at it, rename the patches to their proper git format-patch name. Tested on a Turris Omnia. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ath79: add support for WD My Net Wi-Fi Range ExtenderChristian Lamparter2018-09-105-1/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch ports over support for the device from ar71xx. SOC: AR7370 (Wasp - AR9344 rev2 0001974c) RAM: Winbond W9725G6KB-25 32MiB FLASH: Winbond 25Q64FVSIG 8MiB WLAN: AR9380 Dual-Band 802.11abgn 3x3:3 INPUT: WPS, RESET button (hardware on/off toggle button) LED: Power, LAN, WiFi, 3 RSSI-Leds (low, medium, high) Serial: Header Next to the winbond flash chip (labeld JP1) Pinout is GND - NC - RX - TX - 3V3 (JP1) The Serial setting is 115200-8-N-1. - Installation via uboot's upgrade command 0. attach serial cable 1. interrupt uboot and enter "upgrade code.bin" into the u-boot prompt ar7240> upgrade code.bin 2. rename openwrt...sysupgrade.bin to code.bin on PC 3. run a tftp-client on the PC (shell)$ tftp 192.168.1.230 binary put code.bin 4. wait for the device to finish [...] Copy buff to Flash from 0x9f040000 length 0x79f000 Copy to Flash... write addr: 9f040000 done 5. enter "go" in the u-boot prompt ar7240> go - TFTP ramdisk image boot from the uboot prompt (tftp server defaults to serverip 192.168.1.254) => tftpboot 81000000 initramfs.bin => bootm Tested and working: - LEDs - Buttons - Ethernet - Wi-Fi - OpenWRT sysupgrade For flashing and debricking information see: <https://openwrt.org/toh/wd/rext> Users coming from ar71xx can use sysupgrade too. But I highly advise to no save the old configuration and start from a clean state. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: port cybertan_part from ar71xxChristian Lamparter2018-09-103-0/+183
| | | | | | | | | | | | | This patch ports the cybertan_part code from ar71xx and converts the driver to a DT-supported mtd parser. As a result, it will no longer add the u-boot, nvram and art partitions, which were never part of the special Cybertan header. Instead these partitions have to be specified in the DT, which has the upside of making it possible to add properties (i.e.: read-only), labels and references to these important partitions. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* zynq: rename zedboard with correct manufacturerLuis Araneda2018-09-103-9/+51
| | | | | | | | | The board is made by Avnet, so rename it accordingly as upstream has done it Also move the device to maintain alphabetic order Signed-off-by: Luis Araneda <luaraneda@gmail.com>
* zynq: add sdcard image supportLuis Araneda2018-09-103-2/+48
| | | | | | | | | | | | | | | Implement the generation of sdcard images with ext4 or squashfs + f2fs overlay, but only enable the latter automatically Additionally, add mkf2fs and e2fsprogs to default packages to manipulate ext4 and f2fs filesystems Finally, disable the automatic generation of initramfs and rootfs.tar.gz images, as they are no longer required (they can still be selected in menuconfig) Signed-off-by: Luis Araneda <luaraneda@gmail.com>
* zynq: enable kernel overlay and f2fs supportLuis Araneda2018-09-101-1/+6
| | | | | | | Select configs to enable build-in F2FS support and use the overlayfs provided by generic config Signed-off-by: Luis Araneda <luaraneda@gmail.com>
* zynq: remove bootargs from kernel configLuis Araneda2018-09-101-2/+0
| | | | | | | | Use options from generic instead of target-specific, as the bootargs are now passed by the bootloader and can be device-specific Signed-off-by: Luis Araneda <luaraneda@gmail.com>
* ar71xx: fix switch probing on kernel 4.14Koen Vandeputte2018-09-071-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bump to 4.14 changed the way mdio probes behind switches. While the board_info is added to the list, the code that actually inserted the list info into the phydev structure was missing. This resulted in non-working ethernet ports. Re-add it to fix switch probing. This mimics the exact behaviour as it was in kernel 4.9. Before: [ 1.066007] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0 [ 1.073409] Atheros AR8216/AR8236/AR8316: probe of ag71xx-mdio.0:00 failed with error -22 [ 1.102455] libphy: ag71xx_mdio: probed [ 1.737938] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Generic PHY] [ 1.747994] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII [ 2.377642] ag71xx-mdio.1: Found an AR934X built-in switch [ 2.429938] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII After: [ 11.163357] libphy: Fixed MDIO Bus: probed [ 11.319898] libphy: ag71xx_mdio: probed [ 11.360844] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0 [ 12.447398] libphy: ag71xx_mdio: probed [ 13.077402] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316] [ 13.088989] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII [ 13.717716] ag71xx-mdio.1: Found an AR934X built-in switch [ 13.769990] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.14 to 4.14.68Koen Vandeputte2018-09-0724-239/+162
| | | | | | | | | | | | | | | | Refreshed all patches. Remove upstream accepted: - 330-Revert-MIPS-BCM47XX-Enable-74K-Core-ExternalSync-for.patch Altered: - 303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch - 308-mips32r2_tune.patch Compile-tested on: cns3xxx, imx6 Runtime-tested on: cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.9 to 4.9.125Koen Vandeputte2018-09-073-4/+4
| | | | | | | | | Refreshed all patches. Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 3.18 to 3.18.121Koen Vandeputte2018-09-071-1/+1
| | | | | | | | | Refreshed all patches. Compile-tested on: adm5120 Runtime-tested on: none Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ramips: add support for TP-Link TL-MR3020 v3Carlo Nel2018-09-065-0/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-MR3020 v3 is a pocket-size router based on MediaTek MT7628N. This PR is based on the work of @meyergru[1], with his permission. Specification: - MediaTek MT7628N/N (575 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz - 1x 10/100 Mbps Ethernet Flash instruction: The only way to flash the image in TL-MR3020 v3 is to use tftp recovery mode in U-Boot: 1. Configure PC with static IP 192.168.0.225/24 and tftp server. 2. Rename "openwrt-ramips-mt76x8-tplink_tl-mr3020-v3-squashfs-tftp-recovery.bin" to "tp_recovery.bin" and place it in tftp server directory. 3. Connect PC with the LAN port, press the reset button, power up the router and keep button pressed for around 6-7 seconds, until device starts downloading the file. 4. Router will download file from server, write it to flash and reboot. [1] https://github.com/meyergru/lede-source/commits/TL-MR3020-V3 Signed-off-by: Carlo Nel <carlojnel@gmail.com>
* ath79: fix unaligned access panic in ag71xx_mdio_probeMatt Merhar2018-09-061-2/+2
| | | | | | | | | | | Without "syscon" being present in an ag71xx ethernet DT node's compatible property, a panic occurs at boot during probe citing "Unhandled kernel unaligned access". With this modification, the panic no longer occurs and instead the probe simply fails, allowing the boot process to continue. Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
* ath79: add syscon compatible property to ar7100 ethernet nodesMatt Merhar2018-09-062-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds "syscon" to the compatible properties for the eth0/eth1 nodes in ar7100.dtsi. Without this, a kernel panic is encountered on boot with some ar7100 boards. This for some reason wasn't an issue for the WNDR3800, which uses a Realtek switch chipset, but the panic was encountered on the RouterStation Pro (using an AR8216 switch) and some other boards that haven't yet been merged. The panic message mentions an unaligned access and happens in ag71xx_mdio_probe in drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c. Even if the unaligned access is fixed, the ag71xx_mdio probe still fails without the "syscon" property. This was already being worked around in ar7161_ubnt_routerstation-pro.dts by overriding the compatible property, so this commit removes that as well. All of the other ath79 .dtsi already have this property, so no changes are needed elsewhere. Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
* ramips: drop obsolete sd card driver codeMathias Kresin2018-09-062-20/+4
| | | | | | | | | | | | | | | | | The pinmux for all SoCs using this driver is now set via the pinmux. It makes this code obsolete. Some of the code targeting the mt76x8 SoCs is still required. The sd card pins share the pads with the EPHY. These pads need to be switched to digital mode if the pins are used for sd cards. The eMMC 8-bit mode has to be enabled via pinmux instead of a kernel option. The uart2 group need to be set to function "sdxc d5 d4", pwm1 to "sdxc d6" and pwm0 to "sdxc d7" to do so. It can't be done by as part of a default pinmux, as it would break the normal operation of uart2. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add mt7620/1 sdhci pinmuxMathias Kresin2018-09-068-16/+13
| | | | | | | Set the pins to the required mode via the pinmux driver. It allows to get rid of the pinmux related code in the sd card driver. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fix mt7620a ND/SD pins pinmuxesMathias Kresin2018-09-064-4/+4
| | | | | | | | | | Drop the nd_sd gpio pinmux in case sdcard is used. They're mutually exclusive and for most of the boards not even used as GPIOs. If the pins are in sdcard mode, the pins ND_WE_N and ND_CS_N are still GPIOs (#45 and #46). Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: reference node by labelMathias Kresin2018-09-061-4/+4
| | | | | | Reference the HC5661A sdhci node by label instead of by the full path. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add rt3352 SPI_CS1 pinmuxMathias Kresin2018-09-061-0/+45
| | | | | | | | The rt3352 has a pin that can be used as second spi chip select, watchdog reset or GPIO. The pinmux setup was missing the definition of said pin but it is already used in the SoC dtsi. Signed-off-by: Mathias Kresin <dev@kresin.me>
* imx6: use BUILD_DEVICES in uboot-imx6 for mx6cuboxiFelix Fietkau2018-09-051-1/+1
| | | | | | Fixes build with the default profile Signed-off-by: Felix Fietkau <nbd@nbd.name>
* imx6: rename Generic profile to Default, fixes u-boot image build issueFelix Fietkau2018-09-051-4/+4
| | | | | | | u-boot.mk checks for the Default profile to build images for all targets. This brings the target default profile in sync with other targets Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mpc85xx: add migration script for TP-Link TL-WDR4900 v1 WLAN PCI pathsMatthias Schiffer2018-09-041-0/+63
| | | | | | | | | | PCI paths of the WLAN devices have changed between kernel 4.4 and 4.9; migrate config so existing wifi-iface definitions don't break. This is implemented as a hotplug handler rather than a uci-defaults script as the migration script must run before the 10-wifi-detect hotplug handler. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* imx6: extend cubox support to hummingboard, add support for building full imagesFelix Fietkau2018-09-033-12/+54
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* imx6: enable f2fs and loopback support in preparation for squashfs with ↵Felix Fietkau2018-09-032-1/+8
| | | | | | overlay support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: ethernet: unify tx descriptor buffer splittingFelix Fietkau2018-09-031-75/+83
| | | | | | | | A buffer is split into multiple descriptors if it exceeds 16 KB. Apply the same split for the skb head as well (to deal with corner cases on fraglist support) Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Revert "ramips: mmc: Fix init for MT7628AN"Jo-Philipp Wich2018-08-302-16/+1
| | | | | | | | | | This reverts commit 3a8efaef00d6b7317c46fe6b7e923912d8bf3500. The change reportedly breaks UART2 on some boards. Furthermore it uses bitwise logic on an uninitialized variable and fails to explain what it is fixing exactly. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ramips: only limit lzma dictionary size on mt7621Jo-Philipp Wich2018-08-302-1/+2
| | | | | | | | | | | | | The changed dictionary size leads to a different LZMA header which breaks sysupgrade image magic checkibng on at least some RT288x boards. Since the commit message only mentions testing on MT7621 and since the change appears to break at least one other ramips subtarget, do not take any chances and restrict the size limitation to only MT7621. Fixes FS#1797 Fixes 09b6755946 ("ramips: limit dictionary size for lzma compression") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ramips: fix rt3883 pinmux for second SPIMathias Kresin2018-08-291-2/+2
| | | | | | | The rt3883 doesn't have a pinmux group named spi_cs1. The cs1 is part of the pci group. The function pci-func enables the second chip select. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fix rt3883 pci pinmuxMathias Kresin2018-08-291-1/+1
| | | | | | | | | | The PCI pins need to be set to "PCI Host support one device" to allow the use of one PCI device and flash memory. The pci-fnc function is intended to be used if no PCI is used but flash, nand or the codec functionality is. Signed-off-by: Mathias Kresin <dev@kresin.me>
* apm821xx: MBL: load kernel/dtb from SATA 0:1 firstFreddy Leitner2018-08-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | This remedies an issue with the MBL Duo if both disks are inserted and contain OpenWrt. kernel and dtb would be loaded from SATA 1:1 while rootfs (/dev/sda2) would be mounted on SATA 0:1. Such a mix&match would obviously only work if both OpenWrt versions/ builds are identical, and especially fail after sysupgrade upgraded the system disk on SATA 0:1. The fallback to SATA 1:1 needs to be kept for MBL Single (only has SATA 1:1) and MBL Duo with one disk inserted on SATA 1:1. To speed up booting in those cases, the unneccesarily doubled "sata init" will only be called once. (In theory it could be omitted completely since the on-flash boot script already initializes SATA to load the on-disk boot script.) Tested on MBL Duo (all possible combination of disks) and MBL Single Acked-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Freddy Leitner <hello@square.wf>
* ramips: drop pointless default led definitionsMathias Kresin2018-08-291-17/+0
| | | | | | | | | | | | | | | | The LEDs should be triggered/lit by any kind of state change instead of turned on/off unconditional. If LEDs really need to be turned off by default, it should be done via the default-state devicetree led property. The handling of the wndr3700v5 and wt3020 power led is at least strange. Something is for sure wrong with them. Either the leds are misnamed, the default off trigger is a typo or the polarity of the gpios is wrong. Drop the power led from userspace and wait for someone with access to the hardware to fix it properly. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: add missing zbt-cpe102 diag ledMathias Kresin2018-08-291-1/+6
| | | | | | | Based on the userspace led configuration it's quite obvious that the 4g-0 led should be used for boot status indication. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: express diag led handling via devicetreeMathias Kresin2018-08-296-9/+12
| | | | | | | Use the default-state property to express the desired led handling in the devicetree source file instead of the userspace. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: remove default on userspace trigger for diag ledsMathias Kresin2018-08-291-34/+0
| | | | | | | All the LEDs are turned on by diag.sh at the end of the boot process. No need to do the same via userspace configuration again. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: fix multi colour led handlingMathias Kresin2018-08-295-13/+14
| | | | | | | | All boards either have a multi colour led or a single lightpipe. It makes it impossible to handle the LEDs individual. Change the LED config for these boards to take it into account. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: rt-n12p: use the boardname helper variableMathias Kresin2018-08-291-4/+4
| | | | | | | Use the helper variable for the Asus RT-N12P as it is done by all boards. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: bump 4.14 to 4.14.67Koen Vandeputte2018-08-2817-64/+36
| | | | | | | | | | | | Refreshed all patches. Removed upstreamed patches: - 037-v4.18-0008-ARM-dts-BCM5301x-Fix-i2c-controller-interrupt-type.patch Compile-tested on: cns3xxx, imx6 Runtime-tested on: cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.9 to 4.9.124Koen Vandeputte2018-08-2811-17/+17
| | | | | | | | | Refreshed all patches. Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* mediatek: remove duplicate RPS patchKoen Vandeputte2018-08-281-90/+0
| | | | | | | | | | | | | | | Commit 7af1fb9faafb ("kernel: add a RPS balancer") introduces a RPS balancer for all targets. In the past however, this patch was already introduced for target "mediatek" in commit 7762c07c8898 ("mediatek: bump to v4.14") Remove the separate copy of the patch within the mediatek target, which otherwise is applied twice and results in a build error. Fixes: 7af1fb9faafb ("kernel: add a RPS balancer") Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: fix remove irq code from pci driver patchJohn Crispin2018-08-281-0/+141
| | | | | | This patch got mangled in the void while rebasing it. Signed-off-by: John Crispin <john@phrozen.org>
* generic: add flow_offload accountingJohn Crispin2018-08-281-0/+70
| | | | | | | This patch makes the flow offloading layer account for the traffic inside the conntack entries. Signed-off-by: John Crispin <john@phrozen.org>
* kernel: add a RPS balancerJohn Crispin2018-08-281-0/+93
| | | | | | | | | By default the RPS delegation will happen by masking the last few bits of skb->hash. This patch adds an inermediate hash bucket that maps the masked hash to a RPS core. This makes RPS results much more deterministic on SMP systems. Signed-off-by: John Crispin <john@phrozen.org>
* build: add mkrasimageDavid Bauer2018-08-283-3/+11
| | | | | | | | | | | | | | | The current make-ras.sh image generation script for the ZyXEL NBG6617 has portability issues with bash. Because of this, factory images are currently not built correctly by the OpenWRT buildbots. This commit replaces the make-ras.sh by C-written mkrasimage. The new mkrasimage is also compatible with other ZyXEL devices using the ras image-format. This is not tested with the NBG6616 but it correctly builds the header for ZyXEL factory image. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: fix ar7100 PCI IRQ handlingDmitry Tunin2018-08-282-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently all PCI devices get the same IRQ that affects performance badly. This commit adresses this problem and cleans the code. ar7100 has a special PCI interrupt controller@18060018 that works exactly the same way as misc interrupt controller. This patch does the following: 1. Defines pci-intc interrupt controller@18060018 in dtsi. 2. Removes interrupt-controller property from PCI node. 3. Sets a correct interrupt mask for PCI devices. 4. Removes all IRQ handling code from the PCI driver. "qca,ar7100-misc-intc" should be used as the compatible property, becuase on ar7100 the controlled status register is read-only and the ack method used in "qca,ar7240-misc-intc" won't work properly. There are two very minor downsides of this patch that don't affect perormance: 1. We allocate an IRQ domain of 32 IRQ, whan we need only 5. But ar7100 aren't tiny un terms of RAM and that is not very important and can be tuned if we implement "nr-interrupts" property". 2. It reuses the same irg chip name "MISC" for both controllers. Run tested on DIR-825 B1. Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
* ath79: ag71xx: apply interface mode to MII0/1_CTRL on ar71xx/ar913xChuanhong Guo2018-08-284-0/+73
| | | | | | | | | | | | | We currently don't have any code configuring interface mode in ath79, meaning that we relies on bootloader to set the correct interface mode. This patch added code to set interface correctly so that everything works even if bootloader configures it wrong.(e.g. on WNDR3800 u-boot set the second GMAC mode to RMII but it should be RGMII.) Introduced "qca,mac-idx" for the difference in MII_CTRL register value. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>