hw/net: Move MV88W8618 network device out of hw/arm/ directory
v3 cover hw/net: Move MV88W8618 network device out of hw/arm/ directory
This series simply extract the MV88W8618 device from the ARM machine in hw/arm/ and move it to hw/net/.
Since v2:
- declare MARVELL_88W8618 in hw/arm/Kconfig
- use MARVELL_88W8618 Kconfig (rth)
Since v1:
- update (c) notice
Philippe Mathieu-Daudé (3):
hw: Move MARVELL_88W8618 Kconfig from audio/ to arm/ hw/arm/musicpal: Fix coding style of code related to MV88W8618 device hw/net: Move MV88W8618 network device out of hw/arm/ directory
include/hw/net/mv88w8618_eth.h | 12 + hw/arm/musicpal.c | 380 +------------------------------ hw/net/mv88w8618_eth.c | 402 +++++++++++++++++++++++++++++++++ MAINTAINERS | 2 + hw/arm/Kconfig | 3 + hw/audio/Kconfig | 3 - hw/net/meson.build | 1 + 7 files changed, 421 insertions(+), 382 deletions(-) create mode 100644 include/hw/net/mv88w8618_eth.h create mode 100644 hw/net/mv88w8618_eth.c
Signature · 1 line
2.33.1
PATCH v3 1/3 hw: Move MARVELL_88W8618 Kconfig from audio/ to arm/
The Marvell 88W8618 is a system-on-chip with an ARM core. We implement its audio codecs and network interface. Homogeneous SoC Kconfig are usually defined in the hw/$ARCH directory. Move it there.
--- hw/arm/Kconfig | 3 +++ hw/audio/Kconfig | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)
hw/arm/Kconfig +3 -0
@@ -94,6 +94,9 @@ config MUSCA select SPLIT_IRQ select UNIMP +config MARVELL_88W8618 + bool + config MUSICPAL bool select OR_IRQ
hw/audio/Kconfig +0 -3
@@ -47,6 +47,3 @@ config PL041 config CS4231 bool - -config MARVELL_88W8618 - bool
Signature · 1 line
2.33.1
Re: [PATCH v3 1/3] hw: Move MARVELL_88W8618 Kconfig from audio/ to arm/
Quoted 11 lines · Philippe Mathieu-Daudé
The Marvell 88W8618 is a system-on-chip with an ARM core. We implement its audio codecs and network interface. Homogeneous SoC
Kconfigare usually defined in the hw/$ARCH directory. Move it there.Suggested-by Richard Henderson<[email protected]>Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- hw/arm/Kconfig | 3 +++ hw/audio/Kconfig | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)
r~
PATCH v3 2/3 hw/arm/musicpal: Fix coding style of code related to MV88W8618 device
In reply to Philippe Mathieu-DaudéWe are going to move this code, so fix its style first to avoid:
ERROR: spaces required around that '/' (ctx:VxV)
--- hw/arm/musicpal.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
hw/arm/musicpal.c +7 -7
@@ -309,13 +309,13 @@ static uint64_t mv88w8618_eth_read(void *opaque, hwaddr offset,return s->imr; case MP_ETH_FRDP0 ... MP_ETH_FRDP3: -return s->frx_queue[(offset -MP_ETH_FRDP0 )/4 ]; +return s->frx_queue[(offset -MP_ETH_FRDP0 ) /4 ]; case MP_ETH_CRDP0 ... MP_ETH_CRDP3: -return s->rx_queue[(offset -MP_ETH_CRDP0 )/4 ]; +return s->rx_queue[(offset -MP_ETH_CRDP0 ) /4 ]; case MP_ETH_CTDP0 ... MP_ETH_CTDP1: -return s->tx_queue[(offset -MP_ETH_CTDP0 )/4 ]; +return s->tx_queue[(offset -MP_ETH_CTDP0 ) /4 ];default :return 0 ;
@@ -360,16 +360,16 @@ static void mv88w8618_eth_write(void *opaque, hwaddr offset,break ; case MP_ETH_FRDP0 ... MP_ETH_FRDP3: - s->frx_queue[(offset -MP_ETH_FRDP0 )/4 ] = value; + s->frx_queue[(offset -MP_ETH_FRDP0 ) /4 ] = value;break ; case MP_ETH_CRDP0 ... MP_ETH_CRDP3: - s->rx_queue[(offset -MP_ETH_CRDP0 )/4 ] = - s->cur_rx[(offset -MP_ETH_CRDP0 )/4 ] = value; + s->rx_queue[(offset -MP_ETH_CRDP0 ) /4 ] = + s->cur_rx[(offset -MP_ETH_CRDP0 ) /4 ] = value;break ; case MP_ETH_CTDP0 ... MP_ETH_CTDP1: - s->tx_queue[(offset -MP_ETH_CTDP0 )/4 ] = value; + s->tx_queue[(offset -MP_ETH_CTDP0 ) /4 ] = value;break ; } }
Signature · 1 line
2.33.1
PATCH v3 3/3 hw/net: Move MV88W8618 network device out of hw/arm/ directory
In reply to Philippe Mathieu-DaudéThe Marvell 88W8618 network device is hidden in the Musicpal machine. Move it into a new unit file under the hw/net/ directory.
--- include/hw/net/mv88w8618_eth.h | 12 + hw/arm/musicpal.c | 380 +------------------------------ hw/net/mv88w8618_eth.c | 402 +++++++++++++++++++++++++++++++++ MAINTAINERS | 2 + hw/net/meson.build | 1 + 5 files changed, 418 insertions(+), 379 deletions(-) create mode 100644 include/hw/net/mv88w8618_eth.h create mode 100644 hw/net/mv88w8618_eth.c
include/hw/net/mv88w8618_eth.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Marvell MV88W8618 / Freecom MusicPal emulation. +* +* Copyright (c) 2008-2021 QEMU contributors +*/ +#ifndef HW_NET_MV88W8618_H +#define HW_NET_MV88W8618_H + +#define TYPE_MV88W8618_ETH "mv88w8618_eth" + +#endif
hw/arm/musicpal.c +1 -379
403 lines not on this page · raw message
hw/net/mv88w8618_eth.c new file +402 -0
402 lines not on this page · raw message
MAINTAINERS +2 -0
@@ -781,6 +781,8 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/musicpal.c +F: hw/net/mv88w8618_eth.c +F: include/hw/net/mv88w8618_eth.h F: docs/system/arm/musicpal.rst Nuvoton NPCM7xx
hw/net/meson.build +1 -0
@@ -26,6 +26,7 @@ softmmu_ss.add(when: 'CONFIG_ALLWINNER_SUN8I_EMAC', if_true: files('allwinner-sun8i-emac.c')) softmmu_ss.add(when: 'CONFIG_IMX_FEC', if_true: files('imx_fec.c')) softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-emac.c')) +softmmu_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('mv88w8618_eth.c')) softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_gem.c')) softmmu_ss.add(when: 'CONFIG_STELLARIS_ENET', if_true: files('stellaris_enet.c'))
Signature · 1 line
2.33.1
Quoted 10 lines · Philippe Mathieu-Daudé
This series simply extract the MV88W8618 device from the ARM machine in hw/arm/ and move it to hw/net/.
Since v2:
- declareMARVELL_88W8618in hw/arm/Kconfig
- useMARVELL_88W8618Kconfig(rth)Since v1:
- update (c) notice
Looks like the code-movement in this patchset has a clash with your other series that's now in master that changed the signature of dma_memory_read/dma_memory_write; could I ask you to respin, please?
thanks
-- PMM
Quoted 9 lines · Peter Maydell
Quoted 8 lines · Philippe Mathieu-Daudé
This series simply extract the MV88W8618 device from the ARM machine in hw/arm/ and move it to hw/net/.
Since v2:
- declareMARVELL_88W8618in hw/arm/Kconfig
- useMARVELL_88W8618Kconfig(rth)
Quoted 7 lines
Quoted 2 lines
Since v1:
- update (c) noticeLooks like the code-movement in this patchset has a clash with your other series that's now in master that changed the signature of dma_memory_read/dma_memory_write; could I ask you to respin, please?
Oops I didn't notice, sorry. Sure, will respin.