[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 19/40] sh4: r2d: use generic cpu_model parsing
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 19/40] sh4: r2d: use generic cpu_model parsing |
Date: |
Thu, 5 Oct 2017 15:50:53 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
CC: Magnus Damm <address@hidden>
CC: Aurelien Jarno <address@hidden>
---
hw/sh4/r2d.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 16b9ed2..458ed83 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -225,7 +225,6 @@ static struct QEMU_PACKED
static void r2d_init(MachineState *machine)
{
- const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
@@ -242,11 +241,7 @@ static void r2d_init(MachineState *machine)
MemoryRegion *address_space_mem = get_system_memory();
PCIBus *pci_bus;
- if (cpu_model == NULL) {
- cpu_model = "SH7751R";
- }
-
- cpu = SUPERH_CPU(cpu_generic_init(TYPE_SUPERH_CPU, cpu_model));
+ cpu = SUPERH_CPU(cpu_create(machine->cpu_type));
env = &cpu->env;
reset_info = g_malloc0(sizeof(ResetData));
@@ -365,6 +360,7 @@ static void r2d_machine_init(MachineClass *mc)
mc->desc = "r2d-plus board";
mc->init = r2d_init;
mc->block_default_type = IF_IDE;
+ mc->default_cpu_type = TYPE_SH7751R_CPU;
}
DEFINE_MACHINE("r2d", r2d_machine_init)
--
2.7.4
- [Qemu-devel] [PATCH v2 05/40] alpha: use generic cpu_model parsing, (continued)
- [Qemu-devel] [PATCH v2 05/40] alpha: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 10/40] lm32: lm32_boards: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 09/40] lm32: milkymist: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 13/40] m68k: mcf5208: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 12/40] m68k: an5206: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 11/40] m68k: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 15/40] moxie: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 18/40] openrisc: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 14/40] moxie: fix qemu-system-moxie failing to start with CLI "-cpu MoxieLite", Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 19/40] sh4: r2d: use generic cpu_model parsing,
Igor Mammedov <=
- [Qemu-devel] [PATCH v2 16/40] moxie: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 17/40] openrisc: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 22/40] sh4: simplify superh_cpu_class_by_name(), Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 23/40] sh4: remove SuperHCPUClass::name field, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 20/40] sh4: shix: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 24/40] xtensa: cleanup cpu type name composition, Igor Mammedov, 2017/10/05