mbox series

[v2,00/10] stmmac: Add Loongson platform support

Message ID cover.1690439335.git.chenfeiyang@loongson.cn (mailing list archive)
Headers show
Series stmmac: Add Loongson platform support | expand

Message

Feiyang Chen July 27, 2023, 7:15 a.m. UTC
Extend stmmac functions and macros for Loongson DWMAC.
Add LS7A support for dwmac_loongson.

Feiyang Chen (10):
  net: stmmac: Pass stmmac_priv and chan in some callbacks
  net: stmmac: dwmac1000: Allow platforms to choose some register
    offsets
  net: stmmac: dwmac1000: Add multi-channel support
  net: stmmac: dwmac1000: Add 64-bit DMA support
  net: stmmac: dwmac1000: Add Loongson register definitions
  net: stmmac: Add Loongson HWIF entry
  net: stmmac: dwmac-loongson: Add LS7A support
  net: stmmac: dwmac-loongson: Disable flow control for GMAC
  net: stmmac: dwmac-loongson: Add 64-bit DMA and multi-vector support
  net: stmmac: dwmac-loongson: Add GNET support

 .../net/ethernet/stmicro/stmmac/chain_mode.c  |  28 +-
 drivers/net/ethernet/stmicro/stmmac/common.h  |   3 +
 drivers/net/ethernet/stmicro/stmmac/descs.h   |   7 +
 .../net/ethernet/stmicro/stmmac/descs_com.h   |  49 +++-
 .../ethernet/stmicro/stmmac/dwmac-loongson.c  | 246 +++++++++++++-----
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |  20 +-
 .../net/ethernet/stmicro/stmmac/dwmac1000.h   |   4 +-
 .../ethernet/stmicro/stmmac/dwmac1000_core.c  |  63 +++--
 .../ethernet/stmicro/stmmac/dwmac1000_dma.c   | 110 +++++++-
 .../ethernet/stmicro/stmmac/dwmac100_core.c   |  12 +-
 .../ethernet/stmicro/stmmac/dwmac100_dma.c    |   2 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_core.c |  11 +-
 .../ethernet/stmicro/stmmac/dwmac4_descs.c    |  19 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |   8 +-
 .../net/ethernet/stmicro/stmmac/dwmac_dma.h   | 210 ++++++++-------
 .../net/ethernet/stmicro/stmmac/dwmac_lib.c   | 156 +++++++++--
 .../ethernet/stmicro/stmmac/dwxgmac2_core.c   |  11 +-
 .../ethernet/stmicro/stmmac/dwxgmac2_descs.c  |  17 +-
 .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |   8 +-
 .../net/ethernet/stmicro/stmmac/enh_desc.c    |  38 ++-
 drivers/net/ethernet/stmicro/stmmac/hwif.c    |  48 +++-
 drivers/net/ethernet/stmicro/stmmac/hwif.h    |  77 +++---
 .../net/ethernet/stmicro/stmmac/norm_desc.c   |  17 +-
 .../net/ethernet/stmicro/stmmac/ring_mode.c   | 105 ++++++--
 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |   6 +
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  38 ++-
 include/linux/stmmac.h                        |  54 ++++
 27 files changed, 997 insertions(+), 370 deletions(-)

Comments

Jose Abreu July 27, 2023, 9:02 a.m. UTC | #1
From: Feiyang Chen <chenfeiyang@loongson.cn>
Date: Thu, Jul 27, 2023 at 08:15:44

> Extend stmmac functions and macros for Loongson DWMAC.
> Add LS7A support for dwmac_loongson.
> 
> Feiyang Chen (10):
>   net: stmmac: Pass stmmac_priv and chan in some callbacks
>   net: stmmac: dwmac1000: Allow platforms to choose some register
>     offsets
>   net: stmmac: dwmac1000: Add multi-channel support
>   net: stmmac: dwmac1000: Add 64-bit DMA support
>   net: stmmac: dwmac1000: Add Loongson register definitions
>   net: stmmac: Add Loongson HWIF entry
>   net: stmmac: dwmac-loongson: Add LS7A support
>   net: stmmac: dwmac-loongson: Disable flow control for GMAC
>   net: stmmac: dwmac-loongson: Add 64-bit DMA and multi-vector support
>   net: stmmac: dwmac-loongson: Add GNET support

I took a quick look at your patches and I'm thinking whether this is the correct way to go.
You are mixing up the stmmac generic layer by adding the Loongson HWIF entry.
The whole idea of HWIF was to have it independent of vendor specific logic.

Can you devise another alternative without mixing up the HWIF?

Thanks,
Jose
Feiyang Chen July 28, 2023, 1:36 a.m. UTC | #2
On Thu, Jul 27, 2023 at 5:02 PM Jose Abreu <Jose.Abreu@synopsys.com> wrote:
>
> From: Feiyang Chen <chenfeiyang@loongson.cn>
> Date: Thu, Jul 27, 2023 at 08:15:44
>
> > Extend stmmac functions and macros for Loongson DWMAC.
> > Add LS7A support for dwmac_loongson.
> >
> > Feiyang Chen (10):
> >   net: stmmac: Pass stmmac_priv and chan in some callbacks
> >   net: stmmac: dwmac1000: Allow platforms to choose some register
> >     offsets
> >   net: stmmac: dwmac1000: Add multi-channel support
> >   net: stmmac: dwmac1000: Add 64-bit DMA support
> >   net: stmmac: dwmac1000: Add Loongson register definitions
> >   net: stmmac: Add Loongson HWIF entry
> >   net: stmmac: dwmac-loongson: Add LS7A support
> >   net: stmmac: dwmac-loongson: Disable flow control for GMAC
> >   net: stmmac: dwmac-loongson: Add 64-bit DMA and multi-vector support
> >   net: stmmac: dwmac-loongson: Add GNET support
>
> I took a quick look at your patches and I'm thinking whether this is the correct way to go.
> You are mixing up the stmmac generic layer by adding the Loongson HWIF entry.
> The whole idea of HWIF was to have it independent of vendor specific logic.
>
> Can you devise another alternative without mixing up the HWIF?
>

Hi, Jose,

OK, I will try.

Thanks,
Feiyang

> Thanks,
> Jose