Consolidate lan9118 phy implementations
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest5 patches 9 repliesIn review
- v25 patches 1 replySuperseded
- v14 patches 8 repliesSuperseded
Changes in v3 from the cover letter
* Don't add SOFT reset, use device-specific method instead (Peter)
* Reuse MII constants for MII_ANLPAR register which was previously missed
* Fix off-by-one error in MII_ANLPAR register which prevented MII constants to be reused
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | hw/net/lan9118: Extract lan9118_phyhw/ hw/ hw/ +2 more | +233 | 2 replies | |
| 2/5 | hw/net/lan9118_phy: Reuse in imx_fec and consolidate implementationshw/ hw/ hw/ +2 more | +85 | 2 replies | |
| 3/5 | hw/net/lan9118_phy: Fix off-by-one error in MII_ANLPAR registerhw/ | +1 | 2 replies | |
| 4/5 | hw/net/lan9118_phy: Reuse MII constantshw/ include/ | +46 | 1 reply | |
| 5/5 | hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisementhw/ | +2 | 1 reply |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Peter Maydell | Guenter Roeck |
|---|---|---|
| 1/5 | R-b | T-b |
| 2/5 | R-b | T-b |
| 3/5 | R-b | T-b |
| 4/5 | R-b | T-b |
| 5/5 | R-b | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/5] Consolidate lan9118 phy implementations
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.
Testing done:
* Run my usual sabrelite load and verify that network works.
* Build and run Buildroot's qemu_arm_vexpress_defconfig which includes lan9118 and check on serial console that IP address gets assigned.
v3:
* Don't add SOFT reset, use device-specific method instead (Peter)
* Reuse MII constants for MII_ANLPAR register which was previously missed
* Fix off-by-one error in MII_ANLPAR register which prevented MII constants to be reused
v2:
* QOM'ify + mention boards whose migratability will be broken (Peter)
Bernhard Beschow (5):
hw/net/lan9118: Extract lan9118_phy
hw/net/lan9118_phy: Reuse in imx_fec and consolidate implementations hw/net/lan9118_phy: Fix off-by-one error in MII_ANLPAR register hw/net/lan9118_phy: Reuse MII constants hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement
include/hw/net/imx_fec.h | 9 +- include/hw/net/lan9118_phy.h | 37 ++++++ include/hw/net/mii.h | 6 + hw/net/imx_fec.c | 146 +++-------------------- hw/net/lan9118.c | 137 ++++----------------- hw/net/lan9118_phy.c | 222 +++++++++++++++++++++++++++++++++++ hw/net/Kconfig | 5 + hw/net/meson.build | 1 + hw/net/trace-events | 10 +- 9 files changed, 318 insertions(+), 255 deletions(-) create mode 100644 include/hw/net/lan9118_phy.h create mode 100644 hw/net/lan9118_phy.c
Signature · 1 line
2.47.0