From 0f550c5cc7869b3099d55e27f4eb8b7787df5150 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Thu, 5 Oct 2017 15:51:04 +0200 Subject: tricore: use generic cpu_model parsing Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé Message-Id: <1507211474-188400-31-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost --- hw/tricore/tricore_testboard.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'hw') diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c index 0486f8a1d9..ac75eb2128 100644 --- a/hw/tricore/tricore_testboard.c +++ b/hw/tricore/tricore_testboard.c @@ -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) -- cgit v1.2.3-55-g7522