aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx
Commit message (Collapse)AuthorAgeFilesLines
* build: replace uses of OpenWrt with $(VERSION_DIST)Felix Fietkau2018-02-051-2/+2
| | | | | | This makes the distribution name more configurable. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* cns3xxx: switch to kernel 4.14Koen Vandeputte2018-01-171-1/+1
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: refresh patchesKoen Vandeputte2018-01-178-21/+21
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: remove deprecated uart flagsKoen Vandeputte2018-01-171-0/+29
| | | | | | | | Flag UPF_NO_TXEN_TEST is deprecated. Remove it. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: fix ethernet IRQ imbalance in 4.14Koen Vandeputte2018-01-171-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel 4.14 contains more warnings regarding NAPI usage, which showed following warning: [ 4016.420000] ------------[ cut here ]------------ [ 4016.430000] WARNING: CPU: 1 PID: 14 at kernel/irq/manage.c:525 __enable_irq+0x3c/0x78 [ 4016.440000] Unbalanced enable for IRQ 51 [ 4016.440000] Modules linked in: ath9k ath9k_common pppoe ppp_async ath9k_hw ath pppox ppp_generic nf_conntrack_ipv6 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG slhc nf_reject_ipv4 nf_nat_redirs [ 4016.500000] CPU: 1 PID: 14 Comm: ksoftirqd/1 Tainted: G W 4.14.11 #0 [ 4016.500000] Hardware name: Gateworks Corporation Laguna Platform [ 4016.510000] Backtrace: [ 4016.510000] [<c010a28c>] (dump_backtrace) from [<c010a56c>] (show_stack+0x18/0x1c) [ 4016.520000] r7:c059df4b r6:00000000 r5:60000093 r4:00000000 [ 4016.530000] [<c010a554>] (show_stack) from [<c048b04c>] (dump_stack+0x94/0xb4) [ 4016.530000] [<c048afb8>] (dump_stack) from [<c011760c>] (__warn+0xc8/0xf8) [ 4016.540000] r7:c059df4b r6:c015144c r5:00000000 r4:cf863e08 [ 4016.550000] [<c0117544>] (__warn) from [<c011767c>] (warn_slowpath_fmt+0x40/0x48) [ 4016.550000] r9:cf863eb0 r8:00000036 r7:00000000 r6:c0636360 r5:00000033 r4:cf80a500 [ 4016.560000] [<c0117640>] (warn_slowpath_fmt) from [<c015144c>] (__enable_irq+0x3c/0x78) [ 4016.570000] r3:00000033 r2:c059e0c5 [ 4016.570000] [<c0151410>] (__enable_irq) from [<c01514ec>] (enable_irq+0x64/0x7c) [ 4016.580000] [<c0151488>] (enable_irq) from [<c0335c14>] (eth_poll+0x28c/0x558) [ 4016.590000] r5:d08926c0 r4:cf894488 [ 4016.590000] [<c0335988>] (eth_poll) from [<c03b1718>] (net_rx_action+0xfc/0x2e8) [ 4016.600000] r10:cf863eb8 r9:cf863eb0 r8:00000001 r7:0f7b5000 r6:c0636360 r5:cfdeb360 [ 4016.610000] r4:cf894488 [ 4016.610000] [<c03b161c>] (net_rx_action) from [<c0101510>] (__do_softirq+0xe0/0x228) [ 4016.620000] r10:00000100 r9:c070204c r8:c0702040 r7:00000003 r6:00000008 r5:40000003 [ 4016.620000] r4:cf862000 [ 4016.630000] [<c0101430>] (__do_softirq) from [<c011ae28>] (run_ksoftirqd+0x34/0x58) [ 4016.630000] r10:c0133964 r9:00000000 r8:00000001 r7:00000000 r6:c070b44c r5:cf862000 [ 4016.640000] r4:cf8037e0 [ 4016.640000] [<c011adf4>] (run_ksoftirqd) from [<c0133adc>] (smpboot_thread_fn+0x178/0x190) [ 4016.650000] [<c0133964>] (smpboot_thread_fn) from [<c013099c>] (kthread+0x11c/0x138) [ 4016.660000] r9:cf8037e0 r8:cf802cdc r7:cf839df8 r6:cf803800 r5:00000000 r4:cf802cc0 [ 4016.670000] [<c0130880>] (kthread) from [<c0107218>] (ret_from_fork+0x14/0x3c) [ 4016.680000] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0130880 [ 4016.680000] r4:cf803800 r3:cf862000 [ 4016.690000] ---[ end trace 51114df08f429115 ]--- This is triggered by calling eth_schedule_poll(sw) after the IRQ has been re-enabled. Rework the network code to only enable IRQ's again if NAPI agrees it's safe to do so. Also only re-enable IRQ *after* cleaning up the RX ring and re-enabling DMA, which otherwise resulted in ugly warnings regarding dirty page fragments. These popped up nearly immediately when building the kernel with O2 iso Os. --> Note that this change fixes stability issues, at the cost of ~8% throughput performance. While at it, also change the iface name being used in warning prints, making it more obvious: "switch%d" --> "cns3xxx_eth" The changes have been tested on 4 boards, each moving ~30TB of data Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: update patches for 4.14Koen Vandeputte2018-01-176-64/+85
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: refresh kernel 4.14 configKoen Vandeputte2018-01-171-7/+97
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: copy patches for kernel 4.14Koen Vandeputte2018-01-1724-0/+1170
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: copy config for kernel 4.14Koen Vandeputte2018-01-171-0/+300
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.9 to 4.9.72Kevin Darbyshire-Bryant2017-12-261-1/+1
| | | | | | | | Refresh patches. Runtime tested: ar71xx - Archer C7 v2 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* kernel: bump 4.9 to 4.9.67Stijn Tintel2017-12-071-1/+1
| | | | | | | | | | | | | | | | | | | Refresh patches. Remove upstreamed patches: - generic/190-1-5-e1000e-Fix-error-path-in-link-detection.patch - generic/190-3-5-e1000e-Fix-return-value-test.patch - generic/190-4-5-e1000e-Separate-signaling-for-link-check-link-up.patch - generic/190-5-5-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch - ramips/0102-MIPS-ralink-Fix-MT7628-pinmux.patch - ramips/0103-MIPS-ralink-Fix-typo-in-mt7628-pinmux-function Update patches that no longer apply: - layerscape/815-spi-support-layerscape.patch - ramips/0099-pci-mt7620.patch Compile-tested on ar71xx, brcm2708/bcm2708, octeon and x86/64. Runtime-tested on ar71xx, brcm2708/bcm2708, octeon and x86/64. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* cns3xxx: refresh kernel configKoen Vandeputte2017-11-151-6/+0
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.9 to 4.9.57Kevin Darbyshire-Bryant2017-10-181-1/+1
| | | | | | | | | | | | | | | | Refresh patches. Compile-tested for ar71xx - Archer C7 v2 Runtime-tested on ar71xx - Archer C7 v2 Fixes the following CVEs: - CVE-2017-7518 - CVE-2017-0786 - CVE-2017-1000255 - CVE-2017-12188 - CVE-2017-15265 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* cns3xxx: fix GPIO controller interrupt enableTim Harvey2017-09-111-3/+3
| | | | | | | | | | | | | The cns3xxx interrupt controller uses a single register and as such the 'mask' reg/functions must be used as opposed to the 'enable'/'disable' reg/functions. This fixes an issue that occurs if more than one GPIO on a specific controller (there is GPIOA and GPIOB each having 32 GPIO's) uses interrupts. When one would get enabled all others would be disabled prior to this patch. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* treewide: drop target board_name functionsMathias Kresin2017-07-151-9/+0
| | | | | | They are not used any longer. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: do board detection during preinitMathias Kresin2017-07-152-6/+30
| | | | | | Do the board detection during preinit to unify it across all targets. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: update kernel 4.9 to 4.9.37Koen Vandeputte2017-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Refreshed all patches - Removed upstreamed - Adapted 4 patches: 473-fix-marvell-phy-initialization-issues.patch ----------------------------------------------- Removed hunk 5 which got upstreamed 403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch 404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch -------------------------------------------------------------- Adapted these 2 RFC patches, merging the delta's from an upstream commit (see below) which made it before these 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux- stable.git/commit/?h=v4.9.36&id=97ace183074d306942b903a148aebd5d061758f0 180-usb-xhci-add-support-for-performing-fake-doorbell.patch ----------------------------------------------------------- - Moved fake_doorbell bitmask due to new item Compile tested on: cns3xxx, imx6 Run tested on: cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: cleanup CONFIG_SCHED_HRTICKStijn Tintel2017-06-291-1/+0
| | | | | | | Remove CONFIG_SCHED_HRTICK from target configs, as it was added to the generic config in b47fd7656336162360ebf66147326763ddae3f8d. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* kernel: update kernel 4.9 to 4.9.34Koen Vandeputte2017-06-271-1/+1
| | | | | | | | | | | | - Refreshed all patches - Adapted 1 (0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch) Compile tested on: brcm2708, cns3xxx, imx6 Run tested on: brcm2708, cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> [Compile and run tested on brcm2708] Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* kernel: disable CONFIG_SG_POOL by defaultSergey Ryazanov2017-06-071-0/+1
| | | | | | | | CONFIG_SG_POOL symbol is selected only by CONFIG_SCSI, since the last one is disabled by default then disable CONFIG_SG_POOL by default too. And explicitly enable it only for platforms that use CONFIG_SCSI. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* cns3xxx: enable mpcore watchdogKoen Vandeputte2017-04-121-1/+1
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: fix mpcore watchdogKoen Vandeputte2017-04-121-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original implementation loaded the count register with (wrong) semi- random values due to its implemenation nature. If the wrongly calulated value was below the kickrate, the WD was triggered and rebooted the system. Rework this, partly based on upstream patches, to dynamically fetch the current clockrate and calculate the proper offset for the WD countdown register. Before: [ 143.800000] count val: 27219720 [ 148.820000] count val: 50623201 [ 153.830000] count val: 96425250 [ 158.830000] count val: 89735401 [ 163.840000] count val: 4756110 After: [ 0.700000] MPCore WD init. clockrate: 299984500 prescaler: 256 countrate: 1171814 timeout: 60s [ 358.530000] count val: 35154751 [ 363.540000] count val: 35154750 [ 368.540000] count val: 35154751 [ 373.550000] count val: 35154750 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: refresh kernel configKoen Vandeputte2017-04-121-1/+0
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: remove linux 4.4 supportKoen Vandeputte2017-04-1224-1294/+0
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: update kernel 4.4 to 4.4.59Hauke Mehrtens2017-04-021-1/+1
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: update kernel 4.9 to 4.9.17Hauke Mehrtens2017-03-261-1/+1
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: update kernel 4.9 to version 4.9.10Hauke Mehrtens2017-02-161-3/+3
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* cns3xxx: disable watchdog until it is fixedFelix Fietkau2017-02-131-1/+1
| | | | | | It has been reported to cause random reboots on some devices Signed-off-by: Felix Fietkau <nbd@nbd.name>
* cns3xxx: clean up patchesFelix Fietkau2017-02-113-73/+13
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* cns3xxx: add back watchdog supportFelix Fietkau2017-02-114-68/+150
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* cns3xxx: switch to linux 4.9Koen Vandeputte2017-02-101-1/+1
| | | | Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: add preliminary 4.9 supportKoen Vandeputte2017-02-1027-0/+1420
| | | | | | | | | | | | | | | Adds preliminary kernel 4.9 support for this target. - Refreshed/Updated all patches Added 3 new patches: - 093 --> Add virtual PCI MMIO mapping - 230 --> Remove deprecated code - 240 --> Rework AT24 eeprom code to use the new NVMEM API Compiled & tested on cns3xxx (gw2388) Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: use proper macro's for ID handlingKoen Vandeputte2017-02-071-3/+3
| | | | | | Compiled & tested on cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: update kernel 4.4 to version 4.4.47Stijn Tintel2017-02-061-1/+1
| | | | | | | | | | Refresh patches for all targets that support kernel 4.4. Compile-tested on all targets that use kernel 4.4 and aren't marked broken, except arc770 and arch38 due to broken toolchain. Runtime-tested on ar71xx, octeon, ramips and x86/64. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* kernel: bump to 4.4.46Koen Vandeputte2017-02-021-1/+1
| | | | | | | | | | Refreshed patches for all supported targets. Compile-tested on ar71xx, cns3xxx, imx6, mt7621, oxnas and x86/64. Run-tested on ar71xx, cns3xxx, imx6 and mt7621. Tested-by: Stijn Segers <francesco.borromini@inventati.org> Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump to 4.4.45Koen Vandeputte2017-01-272-3/+3
| | | | | | | | Refreshed patches for all supported targets. Compiled & tested on cns3xxx & imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: split up 980-arm_openwrt_machtypes.patch and move to target foldersFelix Fietkau2017-01-271-0/+7
| | | | | | This is only required for non-DT platforms Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: bump to 4.4.38Kevin Darbyshire-Bryant2016-12-131-1/+1
| | | | | | | | Bump & refresh patches for all 4.4 supported targets. Compile & run tested: ar71xx - Archer C7 v2 Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* cns3xxx: fix UART resource overlapKoen Vandeputte2016-11-051-2/+2
| | | | | | | | | | | | Port 1 registers the same IO resources as port 2 in the kernel resource tree, which is wrong. Fix this by using it's own resources as indicated in the overview (cns3xxx.h). Compiled & Tested on several GW2388-4 laguna boards which utilizes all 3 ports. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* cns3xxx: eliminate hardcoded kernel/rootfs partition splitFelix Fietkau2016-09-194-171/+36
| | | | | | | | | | | | | | This changes the sysupgrade format. To support upgrades from the old firmware to the new one, legacy images are provided. Because of the old partition split, these have to be specific to the NOR or SPI device. The new sysupgrade images are suitable for begin put on flash directly, and they are independent of NOR vs SPI flash variant. Flashing back to old firmware is supported via using the old full-flash images instead of the old sysupgrade images. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* cns3xxx: move laguna.c changes out of patches, update it in files/Felix Fietkau2016-09-193-133/+64
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* cns3xxx: Enable driver support for onboard m25p80 SPI flashKoen Vandeputte2016-09-151-0/+2
| | | | | | | | | | | | | | | | | This device is present on the Gateworks Laguna cns3xxx family. As the SPI bus master is enabled, also enable driver support for this typical slave. [ 3.920000] m25p80 spi1.0: found m25p32, expected m25p80 [ 3.930000] m25p80 spi1.0: m25p32 (4096 Kbytes) [ 3.930000] Creating 4 MTD partitions on "spi1.0": [ 3.940000] 0x000000000000-0x000000040000 : "uboot" [ 3.940000] 0x000000040000-0x000000080000 : "params" [ 3.950000] 0x000000080000-0x000000200000 : "kernel" [ 3.950000] 0x000000200000-0x000000400000 : "rootfs" Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: update kernel 4.4 to version 4.4.20Álvaro Fernández Rojas2016-09-152-5/+5
| | | | | | | Refresh patches for all targets that support kernel 4.4. Compile-tested on brcm2708 only. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* cns3xxx: add GW2386 supportTim Harvey2016-09-081-0/+20
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* cns3xxx: add GW2394 SupportTim Harvey2016-09-081-1/+3
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* build: fix subtarget descriptionsFelix Fietkau2016-09-041-2/+2
| | | | | | Move Target/Description above the target.mk include Signed-off-by: Felix Fietkau <nbd@nbd.name>
* cns3xxx: remove obsolete jffs2 image build codeFelix Fietkau2016-07-201-16/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* cns3xxx: fix RX softIRQ loopKoen Vandeputte2016-06-171-2/+2
| | | | | | | | | | Already reschedule when 1 or more frames came in. Checking for a full queue could produce a re-schedule loop as the checked RX ring location could contain undefined values depending on activity in previous loops. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* treewide: replace nbd@openwrt.org with nbd@nbd.nameFelix Fietkau2016-06-071-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: update kernel 4.4 to version 4.4.10Álvaro Fernández Rojas2016-05-111-19/+0
| | | | Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>