qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/dma/rc4030: Move RC4030 declarations to its own 'rc4030.h' header
@ 2023-01-05 13:10 Philippe Mathieu-Daudé
  2023-01-05 22:11 ` Hervé Poussineau
  2023-01-05 22:25 ` Bernhard Beschow
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-01-05 13:10 UTC (permalink / raw)
  To: qemu-devel
  Cc: Bernhard Beschow, Hervé Poussineau,
	Philippe Mathieu-Daudé, Aleksandar Rikalo

RC4030 declarations are not MIPS specific, no need to
have them in all MIPS boards.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
Based-on: <20230105130710.49264-1-philmd@linaro.org>
          "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

diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
index aa1d323a36..6dbf6652ab 100644
--- a/hw/dma/rc4030.c
+++ b/hw/dma/rc4030.c
@@ -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"
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index 6aefe9a61b..03882b5275 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -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"
diff --git a/include/hw/dma/rc4030.h b/include/hw/dma/rc4030.h
new file mode 100644
index 0000000000..e58f94576e
--- /dev/null
+++ b/include/hw/dma/rc4030.h
@@ -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
diff --git a/include/hw/mips/mips.h b/include/hw/mips/mips.h
index 4d2db99952..34dd583500 100644
--- a/include/hw/mips/mips.h
+++ b/include/hw/mips/mips.h
@@ -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
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-05 22:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-05 13:10 [PATCH] hw/dma/rc4030: Move RC4030 declarations to its own 'rc4030.h' header Philippe Mathieu-Daudé
2023-01-05 22:11 ` Hervé Poussineau
2023-01-05 22:25 ` Bernhard Beschow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).