mbox series

[0/5] Move Loongson1 MAC arch-code to the driver dir

Message ID 20230812151135.1028780-1-keguang.zhang@gmail.com (mailing list archive)
Headers show
Series Move Loongson1 MAC arch-code to the driver dir | expand

Message

Keguang Zhang Aug. 12, 2023, 3:11 p.m. UTC
From: Kelvin Zhang <kelvin.zhang@amlogic.com>

In order to convert Loongson1 MAC platform devices to the devicetree
nodes, Loongson1 MAC arch-code should be moved to the driver dir.
    
In other words, this patchset is a preparation for converting
Loongson1 platform devices to devicetree.

Keguang Zhang (5):
  MIPS: loongson32: Remove Loongson1 MAC arch-code
  dt-bindings: mfd: syscon: Add compatibles for Loongson-1 syscon
  dt-bindings: net: Add Loongson-1 DWMAC glue layer
  net: stmmac: Add glue layer for Loongson-1 SoC
  MAINTAINERS: Add entry for Loongson-1 DWMAC

 .../devicetree/bindings/mfd/syscon.yaml       |   2 +
 .../bindings/net/loongson,ls1x-dwmac.yaml     |  98 +++++++
 .../devicetree/bindings/net/snps,dwmac.yaml   |   2 +
 MAINTAINERS                                   |   2 +
 arch/mips/loongson32/common/platform.c        | 127 ++-------
 drivers/net/ethernet/stmicro/stmmac/Kconfig   |  11 +
 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 .../ethernet/stmicro/stmmac/dwmac-loongson1.c | 257 ++++++++++++++++++
 8 files changed, 396 insertions(+), 104 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/loongson,ls1x-dwmac.yaml
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-loongson1.c


base-commit: 21ef7b1e17d039053edaeaf41142423810572741

Comments

Andrew Lunn Aug. 13, 2023, 3:24 p.m. UTC | #1
On Sat, Aug 12, 2023 at 11:11:30PM +0800, Keguang Zhang wrote:
> From: Kelvin Zhang <kelvin.zhang@amlogic.com>
> 
> In order to convert Loongson1 MAC platform devices to the devicetree
> nodes, Loongson1 MAC arch-code should be moved to the driver dir.
>     
> In other words, this patchset is a preparation for converting
> Loongson1 platform devices to devicetree.

It is a long time since i converted an ARM system from platform data
to DT. But what we tended to do was to allow both for a period of
time.

Does a system using platform data still work after this change? The
first patch seems to delete a lot of code, not just move it around.

Can you restructure this patchset to add the glue layer and DT binding
in parallel with platform data. Then have a patchset which convert all
in tree machines to using DT. And then a patchset, submitted in maybe
6 months time, to remove support for platform data.

	Andrew
Keguang Zhang Aug. 14, 2023, 2:39 a.m. UTC | #2
On Sun, Aug 13, 2023 at 11:24 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Sat, Aug 12, 2023 at 11:11:30PM +0800, Keguang Zhang wrote:
> > From: Kelvin Zhang <kelvin.zhang@amlogic.com>
> >
> > In order to convert Loongson1 MAC platform devices to the devicetree
> > nodes, Loongson1 MAC arch-code should be moved to the driver dir.
> >
> > In other words, this patchset is a preparation for converting
> > Loongson1 platform devices to devicetree.
>
> It is a long time since i converted an ARM system from platform data
> to DT. But what we tended to do was to allow both for a period of
> time.
>
> Does a system using platform data still work after this change? The
> first patch seems to delete a lot of code, not just move it around.
>
> Can you restructure this patchset to add the glue layer and DT binding
> in parallel with platform data. Then have a patchset which convert all
> in tree machines to using DT. And then a patchset, submitted in maybe
> 6 months time, to remove support for platform data.
>
Sure, I will keep the platform data from the next version.
Thanks!

>         Andrew