[U-Boot] [PATCH v11 00/28] bmips: add iudma/enet support

Álvaro Fernández Rojas noltari at gmail.com
Sat Dec 1 18:00:14 UTC 2018


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...).

v11: Introduce change suggested by Daniel Schwierzeck:
 - Avoid trimming ethernet FCS from DMA driver.
v10: Introduce changes suggested by Daniel Schwierzeck:
 - Fix license identifiers.
 bcm6348-iudma:
  - Move DMAD_ST defines out of dma desc struct definition.
  - Remove unneded aigned attribute from dma desc struct definition.
  - Fill dma ring from consumer driver instead of allocating a new buffer.
  - Correctly check clock/reset errors while probing.
  - Switch to live DM live tree.
 bcm6348-enet:
  - Remove packet queue.
  - Move dma_prepare_rcv_buf to free_pkt.
  - Switch to live DM live tree.
 bcm6368-enet:
  - Remove packet queue.
  - Move dma_prepare_rcv_buf to free_pkt.
  - Pad packets smaller than ETH_ZLEN.
  - Switch to live DM live tree.
v9: Separate generic dma channels support from bmips enet support
 bcm6348-iudma:
  - bcm6348_iudma_chan_stop: switch to mdelay when resetting channel.
  - bcm6348_iudma_receive: track dirty dma descriptors and no longer trigger
   dma rx channel.
  - bcm6348_iudma_send: reorder to properly flush cache and set dma descriptor
   config.
  - bcm6348_iudma_prepare_rcv_buf: implemented to clear dirty dma descriptors.
 bcm6348-enet:
  - bcm6348_eth_recv: clear dirty dma descriptors only when packets are copied
   from rx dma.
  - bcm6348_eth_send: remove dma rx channel reset when sending packet.
 bcm6368-enet:
  - introduce rx packets caching functionality from bcm6348-eth to fix flow
   control issues.
  - code style fixes.
v8: Introduce bcm6368-enet driver support.
v5: Fix issues reported by Grygorii Strashko and other fixes:
 - 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: Switch to live tree API.
v2: Fix bcm6348-iudma rx burst config.

Álvaro Fernández Rojas (28):
  dma: add bcm6348-iudma support
  bmips: bcm6338: add bcm6348-iudma support
  bmips: bcm6348: add bcm6348-iudma support
  bmips: bcm6358: add bcm6348-iudma support
  bmips: bcm6368: add bcm6348-iudma support
  bmips: bcm6328: add bcm6348-iudma support
  bmips: bcm6362: add bcm6348-iudma support
  bmips: bcm63268: add bcm6348-iudma support
  bmips: bcm6318: add bcm6348-iudma support
  net: add support for bcm6348-enet
  bmips: bcm6338: add support for bcm6348-enet
  bmips: enable f at 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
  net: add support for bcm6368-enet
  bmips: bcm6368: add support for bcm6368-enet
  bmips: enable wap-5813n enet support
  bmips: bcm6328: add support for bcm6368-enet
  bmips: enable ar-5387un enet support
  bmips: bcm6362: add support for bcm6368-enet
  bmips: enable dgnd3700v2 enet support
  bmips: bcm63268: add support for bcm6368-enet
  bmips: enable vr-3032u enet support
  bmips: bcm6318: add support for bcm6368-enet
  bmips: enable ar-5315u enet support

 arch/mips/dts/brcm,bcm6318.dtsi           |  38 ++
 arch/mips/dts/brcm,bcm63268.dtsi          |  38 ++
 arch/mips/dts/brcm,bcm6328.dtsi           |  30 ++
 arch/mips/dts/brcm,bcm6338.dtsi           |  29 ++
 arch/mips/dts/brcm,bcm6348.dtsi           |  42 ++
 arch/mips/dts/brcm,bcm6358.dtsi           |  46 +++
 arch/mips/dts/brcm,bcm6362.dtsi           |  32 ++
 arch/mips/dts/brcm,bcm6368.dtsi           |  32 ++
 arch/mips/dts/comtrend,ar-5315u.dts       |  32 ++
 arch/mips/dts/comtrend,ar-5387un.dts      |  32 ++
 arch/mips/dts/comtrend,ct-5361.dts        |  12 +
 arch/mips/dts/comtrend,vr-3032u.dts       |  32 ++
 arch/mips/dts/comtrend,wap-5813n.dts      |  14 +
 arch/mips/dts/huawei,hg556a.dts           |  12 +
 arch/mips/dts/netgear,dgnd3700v2.dts      |  14 +
 arch/mips/dts/sagem,f at st1704.dts          |  12 +
 arch/mips/dts/sfr,nb4-ser.dts             |  24 ++
 configs/comtrend_ar5315u_ram_defconfig    |   7 +-
 configs/comtrend_ar5387un_ram_defconfig   |   7 +-
 configs/comtrend_ct5361_ram_defconfig     |   8 +-
 configs/comtrend_vr3032u_ram_defconfig    |   7 +-
 configs/comtrend_wap5813n_ram_defconfig   |   8 +-
 configs/huawei_hg556a_ram_defconfig       |   8 +-
 configs/netgear_dgnd3700v2_ram_defconfig  |   8 +-
 configs/sagem_f at st1704_ram_defconfig      |   8 +-
 configs/sfr_nb4-ser_ram_defconfig         |   8 +-
 drivers/dma/Kconfig                       |   9 +
 drivers/dma/Makefile                      |   1 +
 drivers/dma/bcm6348-iudma.c               | 642 ++++++++++++++++++++++++++++++
 drivers/net/Kconfig                       |  18 +
 drivers/net/Makefile                      |   2 +
 drivers/net/bcm6348-eth.c                 | 537 +++++++++++++++++++++++++
 drivers/net/bcm6368-eth.c                 | 625 +++++++++++++++++++++++++++++
 include/configs/bmips_common.h            |   6 +-
 include/dt-bindings/clock/bcm6318-clock.h |  11 +
 include/dt-bindings/dma/bcm6318-dma.h     |  14 +
 include/dt-bindings/dma/bcm63268-dma.h    |  14 +
 include/dt-bindings/dma/bcm6328-dma.h     |  14 +
 include/dt-bindings/dma/bcm6338-dma.h     |  14 +
 include/dt-bindings/dma/bcm6348-dma.h     |  16 +
 include/dt-bindings/dma/bcm6358-dma.h     |  16 +
 include/dt-bindings/dma/bcm6362-dma.h     |  14 +
 include/dt-bindings/dma/bcm6368-dma.h     |  14 +
 43 files changed, 2497 insertions(+), 10 deletions(-)
 create mode 100644 drivers/dma/bcm6348-iudma.c
 create mode 100644 drivers/net/bcm6348-eth.c
 create mode 100644 drivers/net/bcm6368-eth.c
 create mode 100644 include/dt-bindings/dma/bcm6318-dma.h
 create mode 100644 include/dt-bindings/dma/bcm63268-dma.h
 create mode 100644 include/dt-bindings/dma/bcm6328-dma.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
 create mode 100644 include/dt-bindings/dma/bcm6362-dma.h
 create mode 100644 include/dt-bindings/dma/bcm6368-dma.h

-- 
2.11.0



More information about the U-Boot mailing list