q800: move CPU object into Q800MachineState

Also change the instantiation of the CPU to use object_initialize_child()
followed by a separate realisation.
Restrict valid CPU types to m68040.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230621085353.113233-6-mark.cave-ayland@ilande.co.uk>
[lv: update commit message]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Mark Cave-Ayland 2023-06-21 09:53:34 +01:00 committed by Laurent Vivier
parent 1a514d3a8a
commit 36e2e338b3
2 changed files with 16 additions and 5 deletions

View file

@ -25,6 +25,7 @@
#include "hw/boards.h"
#include "qom/object.h"
#include "target/m68k/cpu-qom.h"
/*
* The main Q800 machine
@ -32,6 +33,8 @@
struct Q800MachineState {
MachineState parent_obj;
M68kCPU cpu;
};
#define TYPE_Q800_MACHINE MACHINE_TYPE_NAME("q800")