[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/17] hw/char/parallel: Export struct ParallelState
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 13/17] hw/char/parallel: Export struct ParallelState |
Date: |
Tue, 13 Jun 2023 11:38:18 +0200 |
From: Bernhard Beschow <shentey@gmail.com>
Exporting ParallelState is a precondition for exporing TYPE_ISA_PARALLEL to be
performed in the next patch.
Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230612081238.1742-2-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/char/parallel.h | 21 +++++++++++++++++++++
hw/char/parallel.c | 20 --------------------
2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/include/hw/char/parallel.h b/include/hw/char/parallel.h
index 29d2876d00..9f76edca81 100644
--- a/include/hw/char/parallel.h
+++ b/include/hw/char/parallel.h
@@ -1,9 +1,30 @@
#ifndef HW_PARALLEL_H
#define HW_PARALLEL_H
+#include "exec/ioport.h"
+#include "exec/memory.h"
#include "hw/isa/isa.h"
+#include "hw/irq.h"
+#include "chardev/char-fe.h"
#include "chardev/char.h"
+typedef struct ParallelState {
+ MemoryRegion iomem;
+ uint8_t dataw;
+ uint8_t datar;
+ uint8_t status;
+ uint8_t control;
+ qemu_irq irq;
+ int irq_pending;
+ CharBackend chr;
+ int hw_driver;
+ int epp_timeout;
+ uint32_t last_read_offset; /* For debugging */
+ /* Memory-mapped interface */
+ int it_shift;
+ PortioList portio_list;
+} ParallelState;
+
#define TYPE_ISA_PARALLEL "isa-parallel"
void parallel_hds_isa_init(ISABus *bus, int n);
diff --git a/hw/char/parallel.c b/hw/char/parallel.c
index 3d32589bb3..e75fc5019d 100644
--- a/hw/char/parallel.c
+++ b/hw/char/parallel.c
@@ -27,10 +27,7 @@
#include "qapi/error.h"
#include "qemu/module.h"
#include "chardev/char-parallel.h"
-#include "chardev/char-fe.h"
#include "hw/acpi/acpi_aml_interface.h"
-#include "hw/irq.h"
-#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#include "hw/qdev-properties-system.h"
#include "migration/vmstate.h"
@@ -76,23 +73,6 @@
#define PARA_CTR_SIGNAL
(PARA_CTR_SELECT|PARA_CTR_INIT|PARA_CTR_AUTOLF|PARA_CTR_STROBE)
-typedef struct ParallelState {
- MemoryRegion iomem;
- uint8_t dataw;
- uint8_t datar;
- uint8_t status;
- uint8_t control;
- qemu_irq irq;
- int irq_pending;
- CharBackend chr;
- int hw_driver;
- int epp_timeout;
- uint32_t last_read_offset; /* For debugging */
- /* Memory-mapped interface */
- int it_shift;
- PortioList portio_list;
-} ParallelState;
-
OBJECT_DECLARE_SIMPLE_TYPE(ISAParallelState, ISA_PARALLEL)
struct ISAParallelState {
--
2.38.1
- [PULL 05/17] accel/hvf: Report HV_DENIED error, (continued)
- [PULL 05/17] accel/hvf: Report HV_DENIED error, Philippe Mathieu-Daudé, 2023/06/13
- [PULL 06/17] target/hppa/meson: Only build int_helper.o with system emulation, Philippe Mathieu-Daudé, 2023/06/13
- [PULL 07/17] target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation, Philippe Mathieu-Daudé, 2023/06/13
- [PULL 08/17] target/i386/helper: Shuffle do_cpu_init(), Philippe Mathieu-Daudé, 2023/06/13
- [PULL 09/17] target/i386: Rename helper template headers as '.h.inc', Philippe Mathieu-Daudé, 2023/06/13
- [PULL 10/17] hw/i2c: Enable an id for the pca954x devices, Philippe Mathieu-Daudé, 2023/06/13
- [PULL 11/17] hw/ide/ahci: Remove stray backslash, Philippe Mathieu-Daudé, 2023/06/13
- [PULL 15/17] exec/ram_addr: Return number of dirty pages in cpu_physical_memory_set_dirty_lebitmap(), Philippe Mathieu-Daudé, 2023/06/13
- [PULL 17/17] exec/memory: Introduce RAM_NAMED_FILE flag, Philippe Mathieu-Daudé, 2023/06/13
- [PULL 14/17] hw/char/parallel-isa: Export struct ISAParallelState, Philippe Mathieu-Daudé, 2023/06/13
- [PULL 13/17] hw/char/parallel: Export struct ParallelState,
Philippe Mathieu-Daudé <=
- [PULL 12/17] hw/scsi/megasas: Silent GCC duplicated-cond warning, Philippe Mathieu-Daudé, 2023/06/13
- [PULL 16/17] hw/vfio: Add number of dirty pages to vfio_get_dirty_bitmap tracepoint, Philippe Mathieu-Daudé, 2023/06/13
- Re: [PULL 00/17] Misc patches for 2023-06-13, Richard Henderson, 2023/06/14