| 46dd6af2 | 10-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Map TX_LEN as MMIO
Declare TX registers as MMIO region, split it out of the current mixed RAM/MMIO region.
The memory flat view becomes:
(qemu) info mtree -f FlatView #0
hw/net/xilinx_ethlite: Map TX_LEN as MMIO
Declare TX registers as MMIO region, split it out of the current mixed RAM/MMIO region.
The memory flat view becomes:
(qemu) info mtree -f FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, i/o): xlnx.xps-ethernetlite 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-00000000810007f7 (prio 0, i/o): ethlite.tx[0]io 00000000810007f8-0000000081000ff3 (prio 0, i/o): xlnx.xps-ethernetlite @00000000000007f8 0000000081000ff4-0000000081000ff7 (prio 0, i/o): ethlite.tx[1]io 0000000081000ff8-00000000810017fb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000000ff8 00000000810017fc-00000000810017ff (prio 0, i/o): ethlite.rx[0]io 0000000081001800-0000000081001ffb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000001800 0000000081001ffc-0000000081001fff (prio 0, i/o): ethlite.rx[1]io
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-17-philmd@linaro.org>
show more ...
|
| 72294962 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Map RX_CTRL as MMIO
Declare RX registers as MMIO region, split it out of the current mixed RAM/MMIO region. The memory flat view becomes:
(qemu) info mtree -f FlatView #0
hw/net/xilinx_ethlite: Map RX_CTRL as MMIO
Declare RX registers as MMIO region, split it out of the current mixed RAM/MMIO region. The memory flat view becomes:
(qemu) info mtree -f FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, i/o): xlnx.xps-ethernetlite 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-00000000810017fb (prio 0, i/o): xlnx.xps-ethernetlite @00000000000007f4 00000000810017fc-00000000810017ff (prio 0, i/o): ethlite.rx[0]io 0000000081001800-0000000081001ffb (prio 0, i/o): xlnx.xps-ethernetlite @0000000000001800 0000000081001ffc-0000000081001fff (prio 0, i/o): ethlite.rx[1]io
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20241112181044.92193-16-philmd@linaro.org>
show more ...
|
| a3750669 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Access TX_CTRL register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_CTRL. This will help to m
hw/net/xilinx_ethlite: Access TX_CTRL register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_CTRL. This will help to map the RAM as RAM (keeping MMIO as MMIO) in few commits.
Previous s->regs[R_TX_CTRL0] and s->regs[R_TX_CTRL1] are now unused. Not a concern, this array will soon disappear.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-15-philmd@linaro.org>
show more ...
|
| c6297918 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Access TX_LEN register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_LEN. This will help to map
hw/net/xilinx_ethlite: Access TX_LEN register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_LEN. This will help to map the RAM as RAM (keeping MMIO as MMIO) in few commits.
Previous s->regs[R_TX_LEN0] and s->regs[R_TX_LEN1] are now unused. Not a concern, this array will soon disappear.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-14-philmd@linaro.org>
show more ...
|
| 64fdbae7 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Access TX_GIE register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_GIE. This will help to map
hw/net/xilinx_ethlite: Access TX_GIE register for each port
Rather than accessing the registers within the mixed RAM/MMIO region as indexed register, declare a per-port TX_GIE. This will help to map the RAM as RAM (keeping MMIO as MMIO) in few commits.
Previous s->regs[R_TX_GIE0] and s->regs[R_TX_GIE1] are now unused. Not a concern, this array will soon disappear.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-13-philmd@linaro.org>
show more ...
|
| 785fd1a9 | 11-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Introduce rxbuf_ptr() helper
rxbuf_ptr() points to the beginning of a (RAM) RX buffer within the device state.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Revie
hw/net/xilinx_ethlite: Introduce rxbuf_ptr() helper
rxbuf_ptr() points to the beginning of a (RAM) RX buffer within the device state.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-11-philmd@linaro.org>
show more ...
|
| 8d956610 | 11-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Introduce txbuf_ptr() helper
For a particular physical address within the EthLite MMIO range, addr_to_port_index() returns which port is accessed.
txbuf_ptr() points to the b
hw/net/xilinx_ethlite: Introduce txbuf_ptr() helper
For a particular physical address within the EthLite MMIO range, addr_to_port_index() returns which port is accessed.
txbuf_ptr() points to the beginning of a (RAM) TX buffer within the device state.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-10-philmd@linaro.org>
show more ...
|
| fa3ca9aa | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Map MDIO registers (as unimplemented)
Rather than handling the MDIO registers as RAM, map them as unimplemented I/O within the device MR.
The memory flat view becomes:
(qe
hw/net/xilinx_ethlite: Map MDIO registers (as unimplemented)
Rather than handling the MDIO registers as RAM, map them as unimplemented I/O within the device MR.
The memory flat view becomes:
(qemu) info mtree -f FlatView #0 Root memory region: system 0000000081000000-00000000810007e3 (prio 0, i/o): xlnx.xps-ethernetlite 00000000810007e4-00000000810007f3 (prio 0, i/o): ethlite.mdio 00000000810007f4-0000000081001fff (prio 0, i/o): xlnx.xps-ethernetlite @00000000000007f4
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-7-philmd@linaro.org>
show more ...
|
| 0798e09f | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Rename rxbuf -> port_index
'rxbuf' is the index of the dual port RAM used. Rename it as 'port_index'.
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Signed-off-by: P
hw/net/xilinx_ethlite: Rename rxbuf -> port_index
'rxbuf' is the index of the dual port RAM used. Rename it as 'port_index'.
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20241112181044.92193-8-philmd@linaro.org>
show more ...
|
| 7eb77fa4 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Correct maximum RX buffer size
The current max RX bufsize is set to 0x800. This is invalid, since it contains the MMIO registers region. Add the correct definition (valid for
hw/net/xilinx_ethlite: Correct maximum RX buffer size
The current max RX bufsize is set to 0x800. This is invalid, since it contains the MMIO registers region. Add the correct definition (valid for both TX & RX, see datasheet p. 20, Table 11 "XPS Ethernet Lite MAC Memory Map") and use it.
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20241112181044.92193-6-philmd@linaro.org>
show more ...
|
| 0fb867ed | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Update QOM style
Use XlnxXpsEthLite typedef, OBJECT_DECLARE_SIMPLE_TYPE macro; convert type_init() to DEFINE_TYPES().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org
hw/net/xilinx_ethlite: Update QOM style
Use XlnxXpsEthLite typedef, OBJECT_DECLARE_SIMPLE_TYPE macro; convert type_init() to DEFINE_TYPES().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-5-philmd@linaro.org>
show more ...
|
| 9dd886c0 | 09-Nov-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/net/xilinx_ethlite: Remove unuseful debug logs
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-
hw/net/xilinx_ethlite: Remove unuseful debug logs
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-Id: <20241112181044.92193-4-philmd@linaro.org>
show more ...
|
| 973a2fac | 11-Dec-2024 |
Bernhard Beschow <shentey@gmail.com> |
hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement
The real device advertises this mode and the device model already advertises 100 mbps half duplex and 10 mbps full+half duplex. So
hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement
The real device advertises this mode and the device model already advertises 100 mbps half duplex and 10 mbps full+half duplex. So advertise this mode to make the model more realistic.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Message-id: 20241102125724.532843-6-shentey@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 212a52c8 | 11-Dec-2024 |
Bernhard Beschow <shentey@gmail.com> |
hw/net/lan9118_phy: Reuse MII constants
Prefer named constants over magic values for better readability.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Bernhard Beschow <shent
hw/net/lan9118_phy: Reuse MII constants
Prefer named constants over magic values for better readability.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Message-id: 20241102125724.532843-5-shentey@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| bbaaee8c | 11-Dec-2024 |
Bernhard Beschow <shentey@gmail.com> |
hw/net/lan9118_phy: Fix off-by-one error in MII_ANLPAR register
Turns 0x70 into 0xe0 (== 0x70 << 1) which adds the missing MII_ANLPAR_TX and fixes the MSB of selector field to be zero, as specified
hw/net/lan9118_phy: Fix off-by-one error in MII_ANLPAR register
Turns 0x70 into 0xe0 (== 0x70 << 1) which adds the missing MII_ANLPAR_TX and fixes the MSB of selector field to be zero, as specified in the datasheet.
Fixes: 2a424990170b "LAN9118 emulation" 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-4-shentey@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| c01194e1 | 11-Dec-2024 |
Bernhard Beschow <shentey@gmail.com> |
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
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>
show more ...
|