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>
This commit is contained in:
Laurent Vivier 2021-03-12 22:41:44 +01:00
parent 2fde99ee31
commit 0791bc02b8
6 changed files with 212 additions and 0 deletions

View file

@ -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