diff options
author | Bernhard Beschow <shentey@gmail.com> | 2024-12-11 15:30:51 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-12-11 15:30:51 +0000 |
commit | c01194e17a01b2a17805dfa0c710aad7c05eab69 (patch) | |
tree | 8a7b8e85ab89f8797b74bd41ebe759092af13364 /include | |
parent | c0cf6b412ecb099d49fe040d32fd5dd149f770d7 (diff) | |
download | qemu-c01194e17a01b2a17805dfa0c710aad7c05eab69.zip qemu-c01194e17a01b2a17805dfa0c710aad7c05eab69.tar.gz qemu-c01194e17a01b2a17805dfa0c710aad7c05eab69.tar.bz2 |
hw/net/lan9118_phy: Reuse in imx_fec and consolidate implementations
imx_fec models the same PHY as lan9118_phy. The code is almost the same with
imx_fec having more logging and tracing. Merge these improvements into
lan9118_phy and reuse in imx_fec to fix the code duplication.
Some migration state how resides in the new device model which breaks migration
compatibility for the following machines:
* imx25-pdk
* sabrelite
* mcimx7d-sabre
* mcimx6ul-evk
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20241102125724.532843-3-shentey@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/net/imx_fec.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/hw/net/imx_fec.h b/include/hw/net/imx_fec.h index 2d13290..83b2163 100644 --- a/include/hw/net/imx_fec.h +++ b/include/hw/net/imx_fec.h @@ -31,6 +31,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(IMXFECState, IMX_FEC) #define TYPE_IMX_ENET "imx.enet" #include "hw/sysbus.h" +#include "hw/net/lan9118_phy.h" +#include "hw/irq.h" #include "net/net.h" #define ENET_EIR 1 @@ -264,11 +266,8 @@ struct IMXFECState { uint32_t tx_descriptor[ENET_TX_RING_NUM]; uint32_t tx_ring_num; - uint32_t phy_status; - uint32_t phy_control; - uint32_t phy_advertise; - uint32_t phy_int; - uint32_t phy_int_mask; + Lan9118PhyState mii; + IRQState mii_irq; uint32_t phy_num; bool phy_connected; struct IMXFECState *phy_consumer; |