hw/dma/rc4030: Move RC4030 declarations to its own 'rc4030.h' header
PATCH 1/1 hw/dma/rc4030: Move RC4030 declarations to its own 'rc4030.h' header
RC4030 declarations are not MIPS specific, no need to have them in all MIPS boards.
---
Based-on: <[email protected]>
"hw/pci-host/bonito: Housekeeping"
--- hw/dma/rc4030.c | 2 +- hw/mips/jazz.c | 1 + include/hw/dma/rc4030.h | 21 +++++++++++++++++++++ include/hw/mips/mips.h | 9 --------- 4 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 include/hw/dma/rc4030.h
hw/dma/rc4030.c +1 -1
@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "qemu/units.h" #include "hw/irq.h" -#include "hw/mips/mips.h" +#include "hw/dma/rc4030.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qapi/error.h"
hw/mips/jazz.c +1 -0
@@ -29,6 +29,7 @@#include "hw/mips/cpudevs.h" #include "hw/intc/i8259.h" #include "hw/dma/i8257.h" +#include "hw/dma/rc4030.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" #include "hw/isa/isa.h"
include/hw/dma/rc4030.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* QEMU JAZZ RC4030 chipset +* +* Copyright (c) 2007-2013 Hervé Poussineau +* +* SPDX-License-Identifier: MIT +*/ + +#ifndef HW_DMA_RC4030_H +#define HW_DMA_RC4030_H + +#include "exec/memory.h" + +/* rc4030.c */ +typedef struct rc4030DMAState *rc4030_dma ; +void rc4030_dma_read (void *dma,uint8_t *buf,int len); +void rc4030_dma_write (void *dma,uint8_t *buf,int len); + +DeviceState *rc4030_init (rc4030_dma **dmas,IOMMUMemoryRegion **dma_mr); + +#endif
include/hw/mips/mips.h +0 -9
@@ -7,13 +7,4 @@/* Kernels can be configured with 64KB pages */ #define INITRD_PAGE_SIZE (64 * KiB) -#include "exec/memory.h" - -/* rc4030.c */ -typedef struct rc4030DMAState *rc4030_dma ; -void rc4030_dma_read (void *dma,uint8_t *buf,int len); -void rc4030_dma_write (void *dma,uint8_t *buf,int len); - -DeviceState *rc4030_init (rc4030_dma **dmas,IOMMUMemoryRegion **dma_mr); -#endif
Signature · 1 line
2.38.1
Le 05/01/2023 à 14:10, Philippe Mathieu-Daudé a écrit :
Quoted 7 lines
RC4030 declarations are not MIPS specific, no need to have them in all MIPS boards.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Based-on: <[email protected]>
"hw/pci-host/bonito: Housekeeping"
Quoted 7 lines
--- hw/dma/rc4030.c | 2 +- hw/mips/jazz.c | 1 + include/hw/dma/rc4030.h | 21 +++++++++++++++++++++ include/hw/mips/mips.h | 9 --------- 4 files changed, 23 insertions(+), 10 deletions(-)create mode 100644
include/hw/dma/rc4030.h
Quoted 71 lines
hw/dma/rc4030.c +1
-1@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "qemu/units.h" #include "hw/irq.h" -#include "hw/mips/mips.h" +#include "hw/dma/rc4030.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qapi/error.h" hw/mips/jazz.c +1
-0@@ -29,6 +29,7 @@#include "hw/mips/cpudevs.h" #include "hw/intc/i8259.h" #include "hw/dma/i8257.h" +#include "hw/dma/rc4030.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" #include "hw/isa/isa.h" include/hw/dma/rc4030.h new file +21
-0@@ -0,0 +1,21 @@ +/* +* QEMU JAZZ RC4030 chipset +* +* Copyright (c) 2007-2013 Hervé Poussineau +* +* SPDX-License-Identifier: MIT +*/ + +#ifndef HW_DMA_RC4030_H +#define HW_DMA_RC4030_H + +#include "exec/memory.h" + +/* rc4030.c */ +typedef struct rc4030DMAState *rc4030_dma ; +void rc4030_dma_read (void *dma,uint8_t *buf,int len); +void rc4030_dma_write (void *dma,uint8_t *buf,int len); + +DeviceState *rc4030_init (rc4030_dma **dmas,IOMMUMemoryRegion **dma_mr); + +#endif include/hw/mips/mips.h +0
-9@@ -7,13 +7,4 @@/* Kernels can be configured with 64KB pages */ #define INITRD_PAGE_SIZE (64 * KiB) -#include "exec/memory.h" - -/* rc4030.c */ -typedef struct rc4030DMAState *rc4030_dma ; -void rc4030_dma_read (void *dma,uint8_t *buf,int len); -void rc4030_dma_write (void *dma,uint8_t *buf,int len); - -DeviceState *rc4030_init (rc4030_dma **dmas,IOMMUMemoryRegion **dma_mr); -#endif
Am 5. Januar 2023 13:10:38 UTC schrieb "Philippe Mathieu-Daudé" <[email protected]>:
Quoted 75 lines
RC4030 declarations are not MIPS specific, no need to have them in all MIPS boards.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Based-on: <[email protected]>
"hw/pci-host/bonito: Housekeeping"
---hw/dma/rc4030.c | 2 +- hw/mips/jazz.c | 1 + include/hw/dma/rc4030.h | 21 +++++++++++++++++++++ include/hw/mips/mips.h | 9 --------- 4 files changed, 23 insertions(+), 10 deletions(-)create mode 100644
include/hw/dma/rc4030.hhw/dma/rc4030.c +1
-1@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "qemu/units.h" #include "hw/irq.h" -#include "hw/mips/mips.h" +#include "hw/dma/rc4030.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qapi/error.h" hw/mips/jazz.c +1
-0@@ -29,6 +29,7 @@#include "hw/mips/cpudevs.h" #include "hw/intc/i8259.h" #include "hw/dma/i8257.h" +#include "hw/dma/rc4030.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" #include "hw/isa/isa.h" include/hw/dma/rc4030.h new file +21
-0@@ -0,0 +1,21 @@ +/* +* QEMU JAZZ RC4030 chipset +* +* Copyright (c) 2007-2013 Hervé Poussineau +* +* SPDX-License-Identifier: MIT +*/ + +#ifndef HW_DMA_RC4030_H +#define HW_DMA_RC4030_H + +#include "exec/memory.h" + +/* rc4030.c */ +typedef struct rc4030DMAState *rc4030_dma ; +void rc4030_dma_read (void *dma,uint8_t *buf,int len); +void rc4030_dma_write (void *dma,uint8_t *buf,int len); + +DeviceState *rc4030_init (rc4030_dma **dmas,IOMMUMemoryRegion **dma_mr); + +#endif include/hw/mips/mips.h +0
-0@@ -7,13 +7,4 @@/* Kernels can be configured with 64KB pages */ #define INITRD_PAGE_SIZE (64 * KiB)
include/hw/mips/mips.h line 10
Quoted 10 lines
include/hw/mips/mips.h +0
-9-#include "exec/memory.h" - -/* rc4030.c */ -typedef struct rc4030DMAState *rc4030_dma ; -void rc4030_dma_read (void *dma,uint8_t *buf,int len); -void rc4030_dma_write (void *dma,uint8_t *buf,int len); - -DeviceState *rc4030_init (rc4030_dma **dmas,IOMMUMemoryRegion **dma_mr); -#endif