aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers
Commit message (Collapse)AuthorAgeFilesLines
* ar71xx: rename ethernet pdata->builtin_switch to use_flow_controlFelix Fietkau2016-10-111-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: enable flow control for ethernet MACs with built-in switchFelix Fietkau2016-10-111-1/+4
| | | | | | | | Should fix LAN speed issues on some devices. This is an updated version of the previously reverted commit with the same name. It improves the check for MACs connected to a built-in switch Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Revert "ar71xx: enable flow control for ethernet MACs with built-in switch"Zoltan HERPAI2016-10-111-9/+1
| | | | | | | | This reverts commit fca52fb7f382d25307d8633d1ed171f79989f65d. It was found to cause the WAN port to fail on some AR934x devices Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: enable flow control for ethernet MACs with built-in switchFelix Fietkau2016-06-221-1/+9
| | | | | | Should fix LAN speed issues on some devices Signed-off-by: Felix Fietkau <nbd@nbd.name>
* treewide: fix replace nbd@openwrt.org with nbd@nbd.nameFelix Fietkau2016-06-192-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@nbd.name> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49379 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: reset ethernet tx ring on fast reset to prevent packet loss / irq issuesFelix Fietkau2016-02-221-3/+11
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48753 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ag71xx: fix build error with debugfs codeFelix Fietkau2016-02-111-5/+7
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48695 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ag71xx: increase rx ring size to improve performanceFelix Fietkau2016-02-111-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48694 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ag71xx: store ring size order instead of ring size to avoid div/modFelix Fietkau2016-02-113-41/+58
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48693 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ag71xx: increase tx ring size to improve performanceFelix Fietkau2016-02-111-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48692 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ag71xx: optimize icache footprint of the receive poll functionFelix Fietkau2016-02-111-3/+10
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48691 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: use page fragment API in the ethernet driverFelix Fietkau2016-01-311-10/+24
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48578 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: fix a few include errorsFelix Fietkau2016-01-301-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48562 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: fix ethernet MAC reset on DMA hangFelix Fietkau2016-01-131-38/+55
| | | | | | | | | Fully reset the chip like on a full up/down, but without the PHY statemachine restart. Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48228 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: extend ethernet DMA stuck check to all ar724x (and newer) chipsFelix Fietkau2016-01-131-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48227 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: clean up ethernet tx queue after reset, wake queues when done - ↵Felix Fietkau2015-12-141-3/+8
| | | | | | | | fixes hangs reported in #18922 Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47892 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: add LED driver NU801John Crispin2015-12-111-0/+396
| | | | | | | | | The MR18 uses a 3-channel 16-bit PWM Constant Current Driver for its status LED. Signed-off-by: Chris R Blake <chrisrblake93@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47848 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: add 64kb bootloader mtd parser for tplinkpartJohn Crispin2015-08-171-6/+29
| | | | | | | | | | | Signed-off-by: Weijie Gao <hackpascal@gmail.com> This patch adds flash layout parser for TP-Link firmwares which have a 64kb bootloader. This is used for TP-Link TL-WDR6500 v2. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46662 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: remove the use of the obsolete IRQF_DISABLED flag in the NAND flash ↵Felix Fietkau2015-07-201-1/+1
| | | | | | | | driver (fixes #20125) Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46433 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx remove IRQF_DISABLEDJohn Crispin2015-07-091-1/+1
| | | | | | | | | | no-op since 2.6.35 removed in Kernel 4.1 see https://lwn.net/Articles/380931/ Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46280 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ar934x-nfc: allow ECC to be configured in software BCH modeFelix Fietkau2015-06-181-0/+4
| | | | | | | | | Some devices ship with NAND images that use BCH ECC. Let the driver know about that ECC mode so that it can be selected by machine files. Signed-off-by: Thomas Hebb <tommyhebb@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46022 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: return limit as number of processed frames when re-scheduling NAPI pollFelix Fietkau2015-06-141-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45971 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: generalize cybertan partition parserJohn Crispin2015-03-111-6/+0
| | | | | | | | | | By removing the NL16 signature check, the parser can be utilized by other devices like the WD My Net Wi-fi Range Extender. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44664 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: rename wrt160nl's trx partition parserJohn Crispin2015-03-111-18/+18
| | | | | | | | | This patch renames the partition parser from wrt160nl to more generic cybertan. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44663 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: fix gpio-latch driverJohn Crispin2015-03-101-1/+2
| | | | | | | | gpio api has changed. the remove call no longer returns a value. Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44650 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: fix mv88e6063 compile for 3.14John Crispin2015-02-151-1/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44459 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: add v3.18 supportJohn Crispin2015-02-152-1/+21
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44456 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: improve ethernet driver cache footprint by removing an unnecessary ↵Felix Fietkau2014-12-093-27/+36
| | | | | | | | pointer Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43588 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ag71xx: replace delay with sleep callsJohn Crispin2014-12-072-6/+6
| | | | | | | | | | | | I don't see that we're in an atomic context so there's no need to busy-wait. Therefore replace the delay with sleep calls. See also Documentation/timers/timers-howto.txt. It states: "In general, use of mdelay is discouraged and code should be refactored to allow for the use of msleep." Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43539 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ag71xx: replace fixed PHY reset wait time in ar7240sw_setupJohn Crispin2014-12-071-1/+28
| | | | | | | | | Replace the fixed wait time of 1s with polling for BMCR_RESET to be cleared on all PHYs. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43538 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ack completed tx descriptors only after the full frame has been ↵Felix Fietkau2014-09-101-10/+16
| | | | | | | | completed Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42457 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: re-enable descriptor splitting on ar716x after the previous bugfixes ↵Felix Fietkau2014-09-061-2/+0
| | | | | | | | (#13072) Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42429 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: fix off-by-one error in packet descriptor splitting (patch from #13072)Felix Fietkau2014-09-061-1/+6
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42428 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: on ar716x, split ethernet packets in 512 byte chunks instead of 256 ↵Felix Fietkau2014-09-061-1/+1
| | | | | | | | (improves performance) (patch from #13072) Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42427 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: disable ethernet descriptor splitting for now, as it seems to cause ↵Felix Fietkau2014-08-301-0/+2
| | | | | | | | tx hangs in some setups Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42333 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: split packets into multiple descriptors on ar716xFelix Fietkau2014-08-293-28/+105
| | | | | | | | | | | This improves performance when doing concurrent rx/tx on a single ethernet MAC, e.g. when routing between VLANs. Fixes #13072 Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42328 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: modify mtd related patches for 3.14Hauke Mehrtens2014-05-082-2/+6
| | | | | | | | | | | | | The change is the same as ("kernel/generic: modify mtd related patches"). Since these files are under files directory, not a files directory of specific kernel version, better to also change them. So it will avoid adding files to future specific files directory (e.g. files-3.14) for this mtd related change. Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40732 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: rb91x-nand: rewrite to use GPIO APIGabor Juhos2014-02-231-114/+136
| | | | | | | | | Rewrite tha rb91x-nand driver to use GPIO API to modify the NAND control lines. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39700 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: add a generic GPIO latch driverGabor Juhos2014-02-221-0/+219
| | | | | | | | It will be used for the Mikrotik boards. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39697 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: increase calculated max frame length valueGabor Juhos2014-01-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The r39147 commit introduces a regression: at lease on some routers with ar8216 switch large packets get lost if 802.1q tagged port is used on the interface connected to the aforementioned switch. The r39147 changes code in the way so interface is set to accept packets no longer than max ethernet frame length for a given mtu. Unfortunately ar8216 has a feature: it sends two additional bytes as a packet header and those this header needs to be added to the max frame length. Otherwise long enough packets get lost. The problem only manuifests itself if interface is used in vlan tagged mode. If interface is untagged then ar8216's header fits into space used by 802.1q tag and not packets are lost. Include two additional bytes in the max frame length calculation to fix the issue. This patch is tested and works with Trendnet TEW-632BRP. Signed-off-by Nikolay Martynov <mar.kolya@gmail.com> Patchwork: http://patchwork.openwrt.org/patch/4656/ [juhosg: - simplify the patch to include the additional bytes of the switch header unconditionally, - change subject and update commit message] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39219 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: fix max frame length setup of the built-in switchesGabor Juhos2013-12-201-5/+12
| | | | | | | | | | | | | The currently used bitmask of the maximum frame length field is wrong for both models. On AR724x/AR933x the largest frame size is 2047 bytes, on the AR934x it is 16383 bytes. Make the MTU setup code model specific, and use the correct bitmask for both models. Also change the value to the maximum. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39148 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: calculate max frame len register value from the MTUGabor Juhos2013-12-201-3/+15
| | | | | | | | | | | | | | | Set the MAX_FRAME_LEN register to zero in ag71xx_hw_init() and write the correct value into that from the ag71xx_open() and ag71xx_fast_reset() functions. Also recalculate the RX buffer size based on the actual maximum frame length value to optimize memory allocation. Additionaly, disallow to change the MTU value while the interface it running. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39147 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: add ag71xx_max_frame_len() helperGabor Juhos2013-12-201-2/+8
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39146 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: get max_frame_len and desc_pktlen_mask from platform dataGabor Juhos2013-12-201-2/+5
| | | | | | | | This will allow to use SoC specific values for both. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39145 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: store descriptor packet length mask in ag71xx structGabor Juhos2013-12-202-7/+5
| | | | | | | | | | | | | | | The currently used bitmask is not correct for all SoCs. Introduce a new field in struct ag71xx and store the bitmask in that. Use the current value for now, it will be adjusted for each SoCs in further patches. Aslo use the new field directly in the ag71xx_rx_packets and ag71xx_hard_start_xmit() functions and remove the ag71xx_desc_pktlen() helper. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39144 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: implement callback in mdio resetGabor Juhos2013-12-171-0/+3
| | | | | | | | | | | This enables us to add fixups to the board specific code for boards that require special treatment of PHYs on mdio bus reset. Signed-off-by: Felix Kaechele <heffer@fedoraproject.org> http://patchwork.openwrt.org/patch/4614/ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39127 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: compute the RX buffer size from the maximum frame sizeGabor Juhos2013-12-172-3/+1
| | | | | | | | | | | | | | | | Currently, the AG71XX_RX_PKT_SIZE value limits the received frame size to 1514/1516 bytes with/without a VLAN header respectively. However the hardware limit is controlled by the value the AG71XX_REG_MAC_MFL register which contains the value of the max_frame_len field. Compute the RX buffer size from the max_frame_len field to get rid of the 1514/1516 byte limitation. Also remove the unused AG71XX_RX_PKT_SIZE definition. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39121 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: store RX buffer size in the ag71xx structGabor Juhos2013-12-172-6/+8
| | | | | | | | This allows to change the value dynamically. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39120 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: store maximum frame length in the ag71xx structGabor Juhos2013-12-172-2/+8
| | | | | | | | | This will allow to use different values for the different SoCs. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39117 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ag71xx: use mdio bus name in ar7240_probe messagesGabor Juhos2013-12-171-4/+4
| | | | | | | | | | | | | | | The ar7240_probe function uses the network device name in the kernel log messages, however the name is not yet initialized when the ar7240_probe function is called. Use the mdio bus name in the messages to avoid ugly log lines like the following one: eth%d: Found an AR7240/AR9330 built-in switch Reported-by: Ronald Wahl <ronald.wahl@raritan.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39116 3c298f89-4303-0410-b956-a3cf2f4a3e73