提交 0f550c5c 编写于 作者: I Igor Mammedov 提交者: Eduardo Habkost

tricore: use generic cpu_model parsing

Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1507211474-188400-31-git-send-email-imammedo@redhat.com>
Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
上级 b9ad9d5b
......@@ -71,10 +71,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id)
MemoryRegion *pcp_data = g_new(MemoryRegion, 1);
MemoryRegion *pcp_text = g_new(MemoryRegion, 1);
if (!machine->cpu_model) {
machine->cpu_model = "tc1796";
}
cpu = TRICORE_CPU(cpu_generic_init(TYPE_TRICORE_CPU, machine->cpu_model));
cpu = TRICORE_CPU(cpu_create(machine->cpu_type));
env = &cpu->env;
memory_region_init_ram(ext_cram, NULL, "powerlink_ext_c.ram",
2 * 1024 * 1024, &error_fatal);
......@@ -114,6 +111,7 @@ static void ttb_machine_init(MachineClass *mc)
mc->desc = "a minimal TriCore board";
mc->init = tricoreboard_init;
mc->is_default = 0;
mc->default_cpu_type = TRICORE_CPU_TYPE_NAME("tc1796");
}
DEFINE_MACHINE("tricore_testboard", ttb_machine_init)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册