Re: [PATCH 0/4] ARM: sun7i: Convert A20 GMAC driver to CCU

From: Priit Laes
Date: Mon Apr 20 2020 - 08:33:33 EST


On Sat, Apr 18, 2020 at 01:17:26AM +0300, Priit Laes wrote:
> This serie converts Allwinner A20 (sun7i) GMAC driver to CCU
> while still retaining compatibility with existing devicetrees.
>
> First two patches contain preliminary work which convert
> sun4i/sun7i clock drivers to platform devices and creates regmap
> to access gmac register from the sun7i gmac driver.
>
> Third patch implements syscon-based regmap to allow driver manage
> its own clock source.
>
> Fourth patch updates the devicetree and drops the unused clocks.
>
> While testing the driver I noticed following bugs with the existing
> sun7i gmac driver:
> - driver relies on u-boot for initialization (fixed in this
> implementation)

Scratch that.. this is actually due to unhandled rx and tx delays,
which I "accidentally" fixed by copying the value BIT(12) from the
u-boot..

> - `systemctl restart networking` fails to bring the link up again.
>
>
> Priit Laes (4):
> clk: sunxi-ng: a10/a20: rewrite init code to a platform driver
> clk: sunxi-ng: a20: export a regmap to access the GMAC register
> net: stmmac: dwmac-sunxi: Implement syscon-based clock handling
> ARM: dts: sun7i: Use syscon-based implementation for gmac
>
> arch/arm/boot/dts/sun7i-a20.dtsi | 36 +----
> drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 108 ++++++++++++---
> .../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 124 ++++++++++++++++--
> 3 files changed, 206 insertions(+), 62 deletions(-)
>
> --
> 2.25.2
>