All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/14] mediatek: add support for MediaTek Ethernet MAC
@ 2020-05-11 15:07 ` Bartosz Golaszewski
  0 siblings, 0 replies; 69+ messages in thread
From: Bartosz Golaszewski @ 2020-05-11 15:07 UTC (permalink / raw)
  To: Rob Herring, David S . Miller, Matthias Brugger, John Crispin,
	Sean Wang, Mark Lee, Jakub Kicinski, Arnd Bergmann,
	Fabien Parent, Heiner Kallweit, Edwin Peer
  Cc: devicetree, linux-kernel, netdev, linux-arm-kernel,
	linux-mediatek, Stephane Le Provost, Pedro Tsai, Andrew Perepech,
	Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This adds support for the Ethernet Controller present on MediaTeK SoCs
from the MT8* family.

The first two patches add binding documents for the PERICFG syscon and
for the MAC itself.

Patches 3/14 & 4/14 do some cleanup of the mediatek ethernet drivers
directory.

Patch 5/14 provides a new helper that allows to retrieve the address of
the net_device associated with given private data address.

Patches 6-8/14 introduce the managed variant of register_netdev().

Patch 9/11 adds the new ethernet driver.

The rest of the patches add DT fixups for the boards already supported
upstream.

v1 -> v2:
- add a generic helper for retrieving the net_device associated with given
  private data
- fix several typos in commit messages
- remove MTK_MAC_VERSION and don't set the driver version
- use NET_IP_ALIGN instead of a magic number (2) but redefine it as it defaults
  to 0 on arm64
- don't manually turn the carrier off in mtk_mac_enable()
- process TX cleanup in napi poll callback
- configure pause in the adjust_link callback
- use regmap_read_poll_timeout() instead of handcoding the polling
- use devres_find() to verify that struct net_device is managed by devres in
  devm_register_netdev()
- add a patch moving all networking devres helpers into net/devres.c
- tweak the dma barriers: remove where unnecessary and add comments to the
  remaining barriers
- don't reset internal counters when enabling the NIC
- set the net_device's mtu size instead of checking the framesize in
  ndo_start_xmit() callback
- fix a race condition in waking up the netif queue
- don't emit log messages on OOM errors
- use dma_set_mask_and_coherent()
- use eth_hw_addr_random()
- rework the receive callback so that we reuse the previous skb if unmapping
  fails, like we already do if skb allocation fails
- rework hash table operations: add proper timeout handling and clear bits when
  appropriate

Bartosz Golaszewski (14):
  dt-bindings: arm: add a binding document for MediaTek PERICFG
    controller
  dt-bindings: net: add a binding document for MediaTek Ethernet MAC
  net: ethernet: mediatek: rename Kconfig prompt
  net: ethernet: mediatek: remove unnecessary spaces from Makefile
  net: core: provide priv_to_netdev()
  net: move devres helpers into a separate source file
  net: devres: define a separate devres structure for
    devm_alloc_etherdev()
  net: devres: provide devm_register_netdev()
  net: ethernet: mtk-eth-mac: new driver
  ARM64: dts: mediatek: add pericfg syscon to mt8516.dtsi
  ARM64: dts: mediatek: add the ethernet node to mt8516.dtsi
  ARM64: dts: mediatek: add an alias for ethernet0 for pumpkin boards
  ARM64: dts: mediatek: add ethernet pins for pumpkin boards
  ARM64: dts: mediatek: enable ethernet on pumpkin boards

 .../arm/mediatek/mediatek,pericfg.yaml        |   34 +
 .../bindings/net/mediatek,eth-mac.yaml        |   80 +
 arch/arm64/boot/dts/mediatek/mt8516.dtsi      |   17 +
 .../boot/dts/mediatek/pumpkin-common.dtsi     |   34 +
 drivers/net/ethernet/mediatek/Kconfig         |    8 +-
 drivers/net/ethernet/mediatek/Makefile        |    3 +-
 drivers/net/ethernet/mediatek/mtk_eth_mac.c   | 1561 +++++++++++++++++
 include/linux/netdevice.h                     |   14 +
 net/Makefile                                  |    2 +-
 net/devres.c                                  |   95 +
 net/ethernet/eth.c                            |   28 -
 11 files changed, 1845 insertions(+), 31 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml
 create mode 100644 Documentation/devicetree/bindings/net/mediatek,eth-mac.yaml
 create mode 100644 drivers/net/ethernet/mediatek/mtk_eth_mac.c
 create mode 100644 net/devres.c

-- 
2.25.0


^ permalink raw reply	[flat|nested] 69+ messages in thread

end of thread, other threads:[~2020-05-20  9:20 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 15:07 [PATCH v2 00/14] mediatek: add support for MediaTek Ethernet MAC Bartosz Golaszewski
2020-05-11 15:07 ` Bartosz Golaszewski
2020-05-11 15:07 ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 01/14] dt-bindings: arm: add a binding document for MediaTek PERICFG controller Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-19 18:28   ` Rob Herring
2020-05-19 18:28     ` Rob Herring
2020-05-19 18:28     ` Rob Herring
2020-05-20  9:19     ` Bartosz Golaszewski
2020-05-20  9:19       ` Bartosz Golaszewski
2020-05-20  9:19       ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 02/14] dt-bindings: net: add a binding document for MediaTek Ethernet MAC Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 03/14] net: ethernet: mediatek: rename Kconfig prompt Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 04/14] net: ethernet: mediatek: remove unnecessary spaces from Makefile Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 05/14] net: core: provide priv_to_netdev() Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 16:39   ` Andrew Lunn
2020-05-11 16:39     ` Andrew Lunn
2020-05-11 16:39     ` Andrew Lunn
2020-05-11 20:41   ` David Miller
2020-05-11 20:41     ` David Miller
2020-05-11 20:41     ` David Miller
2020-05-12  6:04     ` Bartosz Golaszewski
2020-05-12  6:04       ` Bartosz Golaszewski
2020-05-12  6:04       ` Bartosz Golaszewski
2020-05-12 19:30       ` David Miller
2020-05-12 19:30         ` David Miller
2020-05-12 19:30         ` David Miller
2020-05-11 15:07 ` [PATCH v2 06/14] net: move devres helpers into a separate source file Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 07/14] net: devres: define a separate devres structure for devm_alloc_etherdev() Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 08/14] net: devres: provide devm_register_netdev() Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 09/14] net: ethernet: mtk-eth-mac: new driver Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 19:24   ` Florian Fainelli
2020-05-11 19:24     ` Florian Fainelli
2020-05-11 19:24     ` Florian Fainelli
2020-05-12  6:35     ` Bartosz Golaszewski
2020-05-12  6:35       ` Bartosz Golaszewski
2020-05-12  6:35       ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 10/14] ARM64: dts: mediatek: add pericfg syscon to mt8516.dtsi Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 11/14] ARM64: dts: mediatek: add the ethernet node " Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 12/14] ARM64: dts: mediatek: add an alias for ethernet0 for pumpkin boards Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 13/14] ARM64: dts: mediatek: add ethernet pins " Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07 ` [PATCH v2 14/14] ARM64: dts: mediatek: enable ethernet on " Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski
2020-05-11 15:07   ` Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.