aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bmips/files
Commit message (Collapse)AuthorAgeFilesLines
* bmips: document GPIO external interruptsÁlvaro Fernández Rojas2023-04-276-11/+45
| | | | | | | BCM63xx SoCs have an external interrupt controller which can be used for specific GPIO keys. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: leds-sercomm-msp430: improve driverÁlvaro Fernández Rojas2023-04-231-3/+7
| | | | | | | - Add missing module functions. - Fix infinite pattern trigger by converting negative values to 0. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: enet: add missing module functionsÁlvaro Fernández Rojas2023-04-232-3/+14
| | | | | | | | | - Add missing MODULE_DEVICE_TABLE(). - Switch bcm6348-iudma to module_platform_driver(). - Add missing MODULE_AUTHOR, MODULE_DESCRIPTION, MODULE_LICENSE and MODULE_ALIAS. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: pci: use standard module functionsÁlvaro Fernández Rojas2023-04-233-24/+21
| | | | | | | late_initcall_sync() is no longer needed so standard module functions can be used on all bmips PCI/PCIe drivers. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: drop custom b43-sprom fixupsÁlvaro Fernández Rojas2023-04-231-1193/+0
| | | | | | b43-sprom fixups and no longer used and can be removed from bmips targets. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: pci-bcm6348: load IO resource from DT rangesÁlvaro Fernández Rojas2023-04-181-18/+8
| | | | | | Correctly load IO resource from DT ranges and remove the specific IO resource. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: drop unneeded ath9k fixupÁlvaro Fernández Rojas2023-04-181-242/+0
| | | | | | | We no longer need the custom ath9k fixup now that we're using the standard kmod-owl-loader. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: b43-sprom: fix build when SSB/BCMA disabledÁlvaro Fernández Rojas2023-04-101-16/+16
| | | | | | Fix build of B43 SPROM fallback when SSB or BCMA are disabled. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add support for Sercomm SHG2500Álvaro Fernández Rojas2023-04-091-0/+380
| | | | | | | | Sercomm SHG2500 is a BCM63168 with 128M of RAM, 256M of NAND, an external BCM53124S switch for the LAN ports and internal/external Broadcom wifi. LEDs are connected to an external MSP430G2513 MCU controlled via SPI. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6348-enet: register emac driver from iudmaÁlvaro Fernández Rojas2023-03-291-2/+15
| | | | | | | | Register the ethernet driver from iudma, which avoids the attempt to probe the emac driver before iudma and its consequent deferral. The ethernet driver can't work without iudma anyway. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6348-enet: add PHY supportÁlvaro Fernández Rojas2023-03-291-0/+112
| | | | | | | We should ensure that the PHY is properly configured. This is specially needed in devices using the internal PHY for ethernet0. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add basic BCM6358 ethernet supportÁlvaro Fernández Rojas2023-03-281-0/+1594
| | | | | | | | The MDIO bus is supported but there are errors when trying to probe and configure the external BCM5325E switch through B53 DSA. Therefore, let's add basic ethernet (but working) support for now. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6368-enetsw: refactor probeÁlvaro Fernández Rojas2023-03-281-23/+29
| | | | | | | | | - Switch to devm functions where possible. - Fix probing when no resets provided. - Properly check pointers (IS_ERR_OR_NULL/PTR_ERR). - Add probe info. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6368-enetsw: remove unneeded variablesÁlvaro Fernández Rojas2023-03-281-35/+16
| | | | | | Change the code to use defines instead of variables. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: bcm6368-enetsw: harmonize dev variablesÁlvaro Fernández Rojas2023-03-281-76/+83
| | | | | | | | The current implementation of bcm6368-enetsw is a mess of dev, ndev and kdev variables, which have refer to different things depending on the function. This commit harmonizes it and resolves the issue. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: disable B53 MMAP phy read/write opsÁlvaro Fernández Rojas2023-03-211-1/+1
| | | | | | | | | | Without this change, internal and external B53 switches couldn't coexist as reported in https://github.com/openwrt/openwrt/issues/10313. In order to fix this we need to force the B53 MMAP DSA switch driver to use bcm6368-mdio-mux for accessing the PHY registers instead of its own phy_read() and phy_write() functions. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: check for DMA error when refilling RxSieng-Piaw Liew2023-03-041-8/+20
| | | | | | | dma_mapping_error() should be called as dma_map_single() could fail and return error. Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
* bmips: fix Tx cleanup when NAPI poll budget is zeroSieng-Piaw Liew2023-03-041-4/+5
| | | | | | | | | | | | NAPI poll() function may be passed a budget value of zero, i.e. during netpoll, which isn't NAPI context. Therefore, napi_consume_skb() must be given budget value instead of !force to truly discern netpoll-like scenarios. https://lore.kernel.org/netdev/20220707141056.2644-1-liew.s.piaw@gmail.com/t/#m470f5c20225e76fb08c44d6cfa2f1b739ffaaea4 Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com> [improve code format] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add BQL supportSieng Piaw Liew2023-03-041-0/+8
| | | | | | Add Byte Queue Limits support to reduce/remove bufferbloat. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: batch process eth_type_trans() in rx pathSieng Piaw Liew2023-03-041-2/+3
| | | | | | Improve cache efficiency by running eth_type_trans() in its own loop. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: batch process rx pathSieng Piaw Liew2023-03-041-1/+5
| | | | | | | Use netif_receive_skb_list() to batch process rx skb. This improves cache efficiency. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: improve rx loopSieng Piaw Liew2023-03-041-2/+3
| | | | | | | | | Use existing rx processed count to track against budget, thereby making budget decrement operation redundant. rx_desc_count can be calculated outside the rx loop, making the loop a bit smaller. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: switch to napi_build_skb() to reuse skbuff_headsSieng Piaw Liew2023-03-041-2/+2
| | | | | | | | | | napi_build_skb() reuses NAPI skbuff_head cache in order to save some cycles on freeing/allocating skbuff_heads on every new rx or completed tx. Use napi_consume_skb() to feed the cache with skbuff_heads of completed tx so it's never empty. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: check NAPI context when refilling rx SKBSieng Piaw Liew2023-03-041-6/+10
| | | | | | | | | | | Check if we're in NAPI context when refilling rx. Normally we're almost always running in NAPI context. Dispatch to napi_alloc_frag() directly instead of relying on netdev_alloc_frag() which does the same but with the overhead of local_bh_disable/enable. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com> [improve code format] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: convert to build_skb()Sieng Piaw Liew2023-03-041-41/+61
| | | | | | | | | | | | | We can increase the efficiency of rx path by using buffers to receive packets then build SKBs around them just before passing into the network stack. In contrast, preallocating SKBs too early reduces CPU cache efficiency. Performance is slightly increased but the changes allow more potential optimizations. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com> [improve code format] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: use netdev_alloc_skb() for copybreakSieng Piaw Liew2023-03-041-1/+1
| | | | | | | | | | | bmips is using Broadcom B53 DSA driver which means the ethernet driver must compensate for 6 bytes tags from the internal switch. This means using NET_IP_ALIGN actually misaligns the skb, lowering performance significantly. Therefore napi_alloc_skb() which uses NET_IP_ALIGN is changed to netdev_alloc_skb(). Performance in iperf3 is increased from ~47Mbps to 52Mbps. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
* bmips: remove linux 5.10 compatibilityÁlvaro Fernández Rojas2022-05-203-22/+0
| | | | | | | A devent amount of patches have been upstreamed, so maintaining linux 5.10 on this target makes no sense. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add linux v5.15 supportÁlvaro Fernández Rojas2022-05-204-4/+35
| | | | | | | | Build system: x86_64 Build-tested: generic, nand Run-tested: generic/AR-5387un, nand/VR-3032u Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* treewide: backport support for nvmem on non platform devicesAnsuel Smith2021-08-053-12/+6
| | | | | | | | | | | | In the current state, nvmem cells are only detected on platform device. To quickly fix the problem, we register the affected problematic driver with the of_platform but that is more an hack than a real solution. Backport from net-next the required patch so that nvmem can work also with non-platform devices and rework our current patch. Drop the mediatek and dsa workaround and rework the ath10k patches. Rework every driver that use the of_get_mac_address api. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* bmips: add ATH9K PCI fixupsÁlvaro Fernández Rojas2021-03-231-0/+240
| | | | | | | Add support for registering ATH9K PCI fixups needed to bring up wifi on some devices. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add B43 SPROM PCI fixupsÁlvaro Fernández Rojas2021-03-231-0/+1195
| | | | | | Add support for registering fallback BCMA/SSB B43 SPROMs. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add experimental PCI/PCIe supportÁlvaro Fernández Rojas2021-03-234-0/+1657
| | | | | | | | These PCI drivers are a bit hacky and definitely not suitable for upstreaming, but hopefully we can use them as a base for developing proper upstream PCI drivers. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: minor ethernet driver cleanups and fixesÁlvaro Fernández Rojas2021-03-141-62/+35
| | | | | | Add some minor ethernet driver cleanups and fixes to improve code quality. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add experimental ethernet supportÁlvaro Fernández Rojas2021-03-141-0/+1116
| | | | | | | | | | | | | | | | | | This adds experimental ethernet support for BCM6318, BCM6328, BCM6362, BCM6368 and BCM63268. BCM6358 needs a different driver, so there's no support for now. Working devices: - Comtrend AR-5315u - Comtrend AR-5387un - Comtrend VR-3025u - Comtrend VR-3032u Not working devices: - Netgear DGND3700 v2 (no idea on how the external switch is connected) - Huawei HG556a ver B (BCM6358 needs a separate driveer) Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* bmips: add new targetÁlvaro Fernández Rojas2021-02-226-0/+418
This target has full device tree support, thus reducing the number of patches needed for bcm63xx, in which there's a patch for every board. The intention is to start with a minimal amount of downstream patches and start upstreaming all of them. Current status: - Enabling EHCI/OHCI on BCM6358 causes a kernel panic. - BCM63268 lacks Timer Clocks/Reset support. - No PCI/PCIe drivers. - No ethernet drivers. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>