提交 25a20b36 编写于 作者: I Igor Mammedov 提交者: Eduardo Habkost

m68k: an5206: use generic cpu_model parsing

Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
Acked-by: NThomas Huth <huth@tuxfamily.org>
Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
Message-Id: <1507211474-188400-13-git-send-email-imammedo@redhat.com>
Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
上级 f61797bd
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
static void an5206_init(MachineState *machine) static void an5206_init(MachineState *machine)
{ {
ram_addr_t ram_size = machine->ram_size; ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename; const char *kernel_filename = machine->kernel_filename;
M68kCPU *cpu; M68kCPU *cpu;
CPUM68KState *env; CPUM68KState *env;
...@@ -39,10 +38,7 @@ static void an5206_init(MachineState *machine) ...@@ -39,10 +38,7 @@ static void an5206_init(MachineState *machine)
MemoryRegion *ram = g_new(MemoryRegion, 1); MemoryRegion *ram = g_new(MemoryRegion, 1);
MemoryRegion *sram = g_new(MemoryRegion, 1); MemoryRegion *sram = g_new(MemoryRegion, 1);
if (!cpu_model) { cpu = M68K_CPU(cpu_create(machine->cpu_type));
cpu_model = "m5206";
}
cpu = M68K_CPU(cpu_generic_init(TYPE_M68K_CPU, cpu_model));
env = &cpu->env; env = &cpu->env;
/* Initialize CPU registers. */ /* Initialize CPU registers. */
...@@ -94,6 +90,7 @@ static void an5206_machine_init(MachineClass *mc) ...@@ -94,6 +90,7 @@ static void an5206_machine_init(MachineClass *mc)
{ {
mc->desc = "Arnewsh 5206"; mc->desc = "Arnewsh 5206";
mc->init = an5206_init; mc->init = an5206_init;
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5206");
} }
DEFINE_MACHINE("an5206", an5206_machine_init) DEFINE_MACHINE("an5206", an5206_machine_init)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册