summary refs log tree commit diff stats
path: root/include/hw/char/parallel.h
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2023-06-12 10:12:37 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-06-13 11:28:58 +0200
commit8ff98e09f3ad447255368eccaac7412dd15e8777 (patch)
tree9d983bbd4253aa4d87f8a2796d8e02c65e617ff3 /include/hw/char/parallel.h
parent48143e0fd2a57371e939750c14f9dd622f5c73a1 (diff)
downloadfocaccia-qemu-8ff98e09f3ad447255368eccaac7412dd15e8777.tar.gz
focaccia-qemu-8ff98e09f3ad447255368eccaac7412dd15e8777.zip
hw/char/parallel: Export struct ParallelState
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>
Diffstat (limited to 'include/hw/char/parallel.h')
-rw-r--r--include/hw/char/parallel.h21
1 files changed, 21 insertions, 0 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);