summaryrefslogtreecommitdiff
path: root/hw/m68k
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-08-24 18:31:34 +0200
committerEduardo Habkost <ehabkost@redhat.com>2017-09-01 11:54:24 -0300
commitf47cf4e31cac4e670e26226b549c379c982e223a (patch)
treee68ee0bc9a917dce78b6f6078d4f457c6b098e58 /hw/m68k
parent8fc24ad5dd081e5655ad0e87fbea2e0812235f5a (diff)
downloadqemu-f47cf4e31cac4e670e26226b549c379c982e223a.tar.gz
m68k: replace cpu_m68k_init() with cpu_generic_init()
call register_m68k_insns() at realize time which makes cpu_m68k_init() typical object creation function. As result we can replace it with cpu_generic_init() which does the same job, reducing code duplication a bit. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Thomas Huth <huth@tuxfamily.org> Acked-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <1503592308-93913-12-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/m68k')
-rw-r--r--hw/m68k/an5206.c2
-rw-r--r--hw/m68k/mcf5208.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index c76244176f..7b9b15d6c4 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -42,7 +42,7 @@ static void an5206_init(MachineState *machine)
if (!cpu_model) {
cpu_model = "m5206";
}
- cpu = cpu_m68k_init(cpu_model);
+ cpu = M68K_CPU(cpu_generic_init(TYPE_M68K_CPU, cpu_model));
if (!cpu) {
error_report("Unable to find m68k CPU definition");
exit(1);
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index f4b1387c0d..1a0f18073a 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -232,7 +232,7 @@ static void mcf5208evb_init(MachineState *machine)
if (!cpu_model) {
cpu_model = "m5208";
}
- cpu = cpu_m68k_init(cpu_model);
+ cpu = M68K_CPU(cpu_generic_init(TYPE_M68K_CPU, cpu_model));
if (!cpu) {
fprintf(stderr, "Unable to find m68k CPU definition\n");
exit(1);