From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>,
qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Guenter Roeck <linux@roeck-us.net>,
Paolo Bonzini <pbonzini@redhat.com>,
Bernhard Beschow <shentey@gmail.com>
Subject: [PATCH v2 0/5] Consolidate lan9118 phy implementations
Date: Wed, 16 Oct 2024 23:24:02 +0200 [thread overview]
Message-ID: <20241016212407.139390-1-shentey@gmail.com> (raw)
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.
v2:
* QOM'ify + mention boards whose migratability will be broken (Peter)
Bernhard Beschow (5):
hw/resettable: Add SOFT reset type
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 | 9 +-
include/hw/net/lan9118_phy.h | 36 ++++++
include/hw/net/mii.h | 6 +
include/hw/resettable.h | 1 +
hw/net/imx_fec.c | 146 +++---------------------
hw/net/lan9118.c | 137 ++++------------------
hw/net/lan9118_phy.c | 215 +++++++++++++++++++++++++++++++++++
hw/net/Kconfig | 5 +
hw/net/meson.build | 1 +
hw/net/trace-events | 10 +-
10 files changed, 311 insertions(+), 255 deletions(-)
create mode 100644 include/hw/net/lan9118_phy.h
create mode 100644 hw/net/lan9118_phy.c
--
2.47.0
next reply other threads:[~2024-10-16 21:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 21:24 Bernhard Beschow [this message]
2024-10-16 21:24 ` [PATCH v2 1/5] hw/resettable: Add SOFT reset type Bernhard Beschow
2024-10-17 9:31 ` Peter Maydell
2024-10-16 21:24 ` [PATCH v2 2/5] hw/net/lan9118: Extract lan9118_phy Bernhard Beschow
2024-10-16 21:24 ` [PATCH v2 3/5] hw/net/lan9118_phy: Reuse in imx_fec and consolidate implementations Bernhard Beschow
2024-10-16 21:24 ` [PATCH v2 4/5] hw/net/lan9118_phy: Reuse MII constants Bernhard Beschow
2024-10-16 21:24 ` [PATCH v2 5/5] hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement Bernhard Beschow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241016212407.139390-1-shentey@gmail.com \
--to=shentey@gmail.com \
--cc=jasowang@redhat.com \
--cc=linux@roeck-us.net \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).