
In order to add bcm6348-enet support, dma-uclass must be extended to support dma channels and reworked to operate like the other dm uclass (clk, reset...).
v5: Fix issues reported by Grygorii Strashko and other fixes: - Fix build of ti-edma3. - Remove unused bcm6348-iudma defines. - Increment bcm6348-iudma rx descriptors. - Fix bcm6348-iudma flow control issues. - bcm6348-iudma error checking now depends on hw. - Remove unneeded bcm6348-iudma interrupts. - Receive as much packets as possible from bcm6348-eth and cache them in net_rx_packets. This is needed in order to fix flow control issues. v4: Fix issues reported by Grygorii Strashko and other fixes: - Remove usage of net_rx_packets as buffer from bcm6348-iudma. - Allocate dynamic rx buffer on bcm6348-iudma. - Copy received dma buffer to net_rx_packets in order to avoid possible dma overwrites. - Check dma errors and discard invalid packets. - Reset dma rx channel when sending a new packet to prevent flow control issues. - Fix packet casting on bcm6348_eth_recv/send. v3: Introduce changes reported by Simon Glass: - Improve dma-uclass.h documentation. - Switch to live tree API. v2: Introduce changes reported by Vignesh: - Respect current dma implementation. - Let dma_memcpy find a compatible dma device. Other changes: - Fix bcm6348-iudma rx burst config.
Álvaro Fernández Rojas (15): dma: move dma_ops to dma-uclass.h dma: add channels support dma: add bcm6348-iudma support bmips: bcm6338: add bcm6348-iudma support bmips: bcm6348: add bcm6348-iudma support bmips: bcm6358: add bcm6348-iudma support phy: add support for internal phys net: add support for bcm6348-enet bmips: bcm6338: add support for bcm6348-enet bmips: enable f@st1704 enet support bmips: bcm6348: add support for bcm6348-enet bmips: enable ct-5361 enet support bmips: bcm6358: add support for bcm6348-enet bmips: enable hg556a enet support bmips: enable nb4-ser enet support
arch/mips/dts/brcm,bcm6338.dtsi | 29 ++ arch/mips/dts/brcm,bcm6348.dtsi | 42 +++ arch/mips/dts/brcm,bcm6358.dtsi | 46 +++ arch/mips/dts/comtrend,ct-5361.dts | 12 + arch/mips/dts/huawei,hg556a.dts | 12 + arch/mips/dts/sagem,f@st1704.dts | 12 + arch/mips/dts/sfr,nb4-ser.dts | 24 ++ configs/comtrend_ct5361_ram_defconfig | 8 +- configs/huawei_hg556a_ram_defconfig | 8 +- configs/sagem_f@st1704_ram_defconfig | 9 +- configs/sfr_nb4-ser_ram_defconfig | 8 +- drivers/dma/Kconfig | 16 + drivers/dma/Makefile | 1 + drivers/dma/bcm6348-iudma.c | 532 +++++++++++++++++++++++++++++++ drivers/dma/dma-uclass.c | 190 ++++++++++- drivers/dma/ti-edma3.c | 2 +- drivers/net/Kconfig | 10 + drivers/net/Makefile | 1 + drivers/net/bcm6348-eth.c | 575 ++++++++++++++++++++++++++++++++++ include/configs/bmips_common.h | 5 +- include/dma-uclass.h | 117 +++++++ include/dma.h | 196 ++++++++++-- include/dt-bindings/dma/bcm6338-dma.h | 15 + include/dt-bindings/dma/bcm6348-dma.h | 17 + include/dt-bindings/dma/bcm6358-dma.h | 17 + include/phy.h | 2 + 26 files changed, 1869 insertions(+), 37 deletions(-) create mode 100644 drivers/dma/bcm6348-iudma.c create mode 100644 drivers/net/bcm6348-eth.c create mode 100644 include/dma-uclass.h create mode 100644 include/dt-bindings/dma/bcm6338-dma.h create mode 100644 include/dt-bindings/dma/bcm6348-dma.h create mode 100644 include/dt-bindings/dma/bcm6358-dma.h