[PATCH 0/4] Consolidate lan9118 phy implementations

Bernhard Beschow posted 4 patches 1 month, 2 weeks ago
There is a newer version of this series
include/hw/net/imx_fec.h     |   7 +-
include/hw/net/lan9118_phy.h |  31 +++++++
include/hw/net/mii.h         |   6 ++
hw/net/imx_fec.c             | 141 +++--------------------------
hw/net/lan9118.c             | 133 +++++----------------------
hw/net/lan9118_phy.c         | 168 +++++++++++++++++++++++++++++++++++
hw/net/Kconfig               |   5 ++
hw/net/meson.build           |   1 +
hw/net/trace-events          |  10 ++-
9 files changed, 254 insertions(+), 248 deletions(-)
create mode 100644 include/hw/net/lan9118_phy.h
create mode 100644 hw/net/lan9118_phy.c
[PATCH 0/4] Consolidate lan9118 phy implementations
Posted by Bernhard Beschow 1 month, 2 weeks ago
hw/net/imx_fec and hw/net/lan9118 implement the same Ethernet PHY with similar
but not quite the same code. This series consolidates the implementations into
one to fix code duplication. It then continues to make the code more readable by
reusing some existing constants.

Having a dedicated module for the PHY allows it to be reused in even further
device models.

Bernhard Beschow (4):
  hw/net/lan9118: Extract lan9118_phy
  hw/net/lan9118_phy: Reuse in imx_fec and consolidate implementations
  hw/net/lan9118_phy: Reuse MII constants
  hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement

 include/hw/net/imx_fec.h     |   7 +-
 include/hw/net/lan9118_phy.h |  31 +++++++
 include/hw/net/mii.h         |   6 ++
 hw/net/imx_fec.c             | 141 +++--------------------------
 hw/net/lan9118.c             | 133 +++++----------------------
 hw/net/lan9118_phy.c         | 168 +++++++++++++++++++++++++++++++++++
 hw/net/Kconfig               |   5 ++
 hw/net/meson.build           |   1 +
 hw/net/trace-events          |  10 ++-
 9 files changed, 254 insertions(+), 248 deletions(-)
 create mode 100644 include/hw/net/lan9118_phy.h
 create mode 100644 hw/net/lan9118_phy.c

-- 
2.46.2

Re: [PATCH 0/4] Consolidate lan9118 phy implementations
Posted by Bernhard Beschow 1 month, 1 week ago

Am 5. Oktober 2024 20:57:44 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>hw/net/imx_fec and hw/net/lan9118 implement the same Ethernet PHY with similar
>
>but not quite the same code. This series consolidates the implementations into
>
>one to fix code duplication. It then continues to make the code more readable by
>
>reusing some existing constants.
>
>
>
>Having a dedicated module for the PHY allows it to be reused in even further
>
>device models.
>

Ping

>
>
>Bernhard Beschow (4):
>
>  hw/net/lan9118: Extract lan9118_phy
>
>  hw/net/lan9118_phy: Reuse in imx_fec and consolidate implementations
>
>  hw/net/lan9118_phy: Reuse MII constants
>
>  hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement
>
>
>
> include/hw/net/imx_fec.h     |   7 +-
>
> include/hw/net/lan9118_phy.h |  31 +++++++
>
> include/hw/net/mii.h         |   6 ++
>
> hw/net/imx_fec.c             | 141 +++--------------------------
>
> hw/net/lan9118.c             | 133 +++++----------------------
>
> hw/net/lan9118_phy.c         | 168 +++++++++++++++++++++++++++++++++++
>
> hw/net/Kconfig               |   5 ++
>
> hw/net/meson.build           |   1 +
>
> hw/net/trace-events          |  10 ++-
>
> 9 files changed, 254 insertions(+), 248 deletions(-)
>
> create mode 100644 include/hw/net/lan9118_phy.h
>
> create mode 100644 hw/net/lan9118_phy.c
>
>
>
>-- >
>2.46.2
>
>
>