summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLaurent Vivier2021-03-12 22:41:44 +0100
committerLaurent Vivier2021-03-15 21:02:57 +0100
commit0791bc02b8fbf9d55626b57f45255ba1b6ea83d5 (patch)
treeac7d6fdf6f66a3843ffbb057c7facc08554cbe3a /include
parentm68k: add an interrupt controller (diff)
downloadqemu-0791bc02b8fbf9d55626b57f45255ba1b6ea83d5.tar.gz
qemu-0791bc02b8fbf9d55626b57f45255ba1b6ea83d5.tar.xz
qemu-0791bc02b8fbf9d55626b57f45255ba1b6ea83d5.zip
m68k: add a system controller
Add a system controller for the m68k-virt machine. This controller allows the kernel to power off or reset the machine. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210312214145.2936082-5-laurent@vivier.eu>
Diffstat (limited to 'include')
-rw-r--r--include/hw/misc/virt_ctrl.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/hw/misc/virt_ctrl.h b/include/hw/misc/virt_ctrl.h
new file mode 100644
index 0000000000..edfadc4695
--- /dev/null
+++ b/include/hw/misc/virt_ctrl.h
@@ -0,0 +1,22 @@
+/*
+ * SPDX-License-Identifer: GPL-2.0-or-later
+ *
+ * Virt system Controller
+ */
+
+#ifndef VIRT_CTRL_H
+#define VIRT_CTRL_H
+
+#define TYPE_VIRT_CTRL "virt-ctrl"
+OBJECT_DECLARE_SIMPLE_TYPE(VirtCtrlState, VIRT_CTRL)
+
+struct VirtCtrlState {
+ SysBusDevice parent_obj;
+
+ MemoryRegion iomem;
+ qemu_irq irq;
+
+ uint32_t irq_enabled;
+};
+
+#endif