hw/net: Move MV88W8618 network device out of hw/arm/ directory
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/.
I was expecting for this to get merged before posting a generic network code rework series, then figured I never posted it >_<
Philippe Mathieu-Daudé (2):
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 | 16 ++ hw/arm/musicpal.c | 380 +----------------------------- hw/net/mv88w8618_eth.c | 406 +++++++++++++++++++++++++++++++++ MAINTAINERS | 2 + hw/net/meson.build | 1 + 5 files changed, 426 insertions(+), 379 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 1/2 hw/arm/musicpal: Fix coding style of code related to MV88W8618 device
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 2/2 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 | 16 ++ hw/arm/musicpal.c | 380 +----------------------------- hw/net/mv88w8618_eth.c | 406 +++++++++++++++++++++++++++++++++ MAINTAINERS | 2 + hw/net/meson.build | 1 + 5 files changed, 426 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 +16 -0
@@ -0,0 +1,16 @@ +/* +* Marvell MV88W8618 / Freecom MusicPal emulation. +* +* Copyright (c) 2008 Jan Kiszka +* +* This code is licensed under the GNU GPL v2. +* +* Contributions after 2012-01-13 are licensed under the terms of the +* GNU GPL, version 2 or (at your option) any later version. +*/ +#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 +406 -0
406 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_MUSICPAL', 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 20 lines · 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.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/net/mv88w8618_eth.h | 16 ++ hw/arm/musicpal.c | 380 +----------------------------- hw/net/mv88w8618_eth.c | 406 +++++++++++++++++++++++++++++++++ MAINTAINERS | 2 + hw/net/meson.build | 1 + 5 files changed, 426 insertions(+), 379 deletions(-) create mode 100644 include/hw/net/mv88w8618_eth.h create mode 100644 hw/net/mv88w8618_eth.cinclude/hw/net/mv88w8618_eth.h new file +0
-0
include/hw/net/mv88w8618_eth.h line 9
Quoted 9 lines
include/hw/net/mv88w8618_eth.h new file +9
-0@@ -0,0 +1,16 @@ +/* +* Marvell MV88W8618 / Freecom MusicPal emulation. +* +* Copyright (c) 2008 Jan Kiszka +* +* This code is licensed under the GNU GPL v2. +* +* Contributions after 2012-01-13 are licensed under the terms of the +* GNU GPL, version 2 or (at your option) any later version.
These 2 lines are probably irrelevant here.
Quoted 7 lines
include/hw/net/mv88w8618_eth.h new file +7
-0+*/ +#ifndef HW_NET_MV88W8618_H +#define HW_NET_MV88W8618_H + +#define TYPE_MV88W8618_ETH "mv88w8618_eth" + +#endif