mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
sh7750: Change cpu field type to SuperHCPU
This brings us a step closer to QOM'ified SH7750 SoC and
fixes b350ab75
(target-sh4: Move PVR/PRR/CVR into SuperHCPUClass)
assuming SuperHCPU type for SUPERH_CPU_GET_CLASS().
Fix Coding Style issues while at it (indentation, braces).
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
06f3ed2698
commit
2f493fee18
4 changed files with 52 additions and 51 deletions
|
@ -41,7 +41,7 @@ static void shix_init(QEMUMachineInitArgs *args)
|
|||
{
|
||||
const char *cpu_model = args->cpu_model;
|
||||
int ret;
|
||||
CPUSH4State *env;
|
||||
SuperHCPU *cpu;
|
||||
struct SH7750State *s;
|
||||
MemoryRegion *sysmem = get_system_memory();
|
||||
MemoryRegion *rom = g_new(MemoryRegion, 1);
|
||||
|
@ -51,8 +51,8 @@ static void shix_init(QEMUMachineInitArgs *args)
|
|||
cpu_model = "any";
|
||||
|
||||
printf("Initializing CPU\n");
|
||||
env = cpu_init(cpu_model);
|
||||
if (env == NULL) {
|
||||
cpu = cpu_sh4_init(cpu_model);
|
||||
if (cpu == NULL) {
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ static void shix_init(QEMUMachineInitArgs *args)
|
|||
}
|
||||
|
||||
/* Register peripherals */
|
||||
s = sh7750_init(env, sysmem);
|
||||
s = sh7750_init(cpu, sysmem);
|
||||
/* XXXXX Check success */
|
||||
tc58128_init(s, "shix_linux_nand.bin", NULL);
|
||||
fprintf(stderr, "initialization terminated\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue