aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2023-06-12 10:12:38 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-06-13 11:28:58 +0200
commit9cc44d9bd6fb8ceb75f8ae898a0d167f6305e511 (patch)
treec0121d6dc1be4d8c3572f20da48ec5a9face1a5b /include
parent8ff98e09f3ad447255368eccaac7412dd15e8777 (diff)
hw/char/parallel-isa: Export struct ISAParallelState
Allows the struct to be embedded directly into device models without additional allocation. 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-3-shentey@gmail.com> [PMD: Update MAINTAINERS entry and use SPDX license identifier] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/char/parallel-isa.h30
-rw-r--r--include/hw/char/parallel.h2
2 files changed, 30 insertions, 2 deletions
diff --git a/include/hw/char/parallel-isa.h b/include/hw/char/parallel-isa.h
new file mode 100644
index 0000000000..d24ccecf05
--- /dev/null
+++ b/include/hw/char/parallel-isa.h
@@ -0,0 +1,30 @@
+/*
+ * QEMU ISA Parallel PORT emulation
+ *
+ * Copyright (c) 2003-2005 Fabrice Bellard
+ * Copyright (c) 2007 Marko Kohtala
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#ifndef HW_PARALLEL_ISA_H
+#define HW_PARALLEL_ISA_H
+
+#include "parallel.h"
+
+#include "hw/isa/isa.h"
+#include "qom/object.h"
+
+#define TYPE_ISA_PARALLEL "isa-parallel"
+OBJECT_DECLARE_SIMPLE_TYPE(ISAParallelState, ISA_PARALLEL)
+
+struct ISAParallelState {
+ ISADevice parent_obj;
+
+ uint32_t index;
+ uint32_t iobase;
+ uint32_t isairq;
+ ParallelState state;
+};
+
+#endif /* HW_PARALLEL_ISA_H */
diff --git a/include/hw/char/parallel.h b/include/hw/char/parallel.h
index 9f76edca81..7b5a309a03 100644
--- a/include/hw/char/parallel.h
+++ b/include/hw/char/parallel.h
@@ -25,8 +25,6 @@ typedef struct ParallelState {
PortioList portio_list;
} ParallelState;
-#define TYPE_ISA_PARALLEL "isa-parallel"
-
void parallel_hds_isa_init(ISABus *bus, int n);
bool parallel_mm_init(MemoryRegion *address_space,