提交 c3898f77 编写于 作者: E Eduardo Habkost 提交者: Andreas Färber

unicore32: Use uc32_cpu_init()

Instead of using the legacy cpu_init() function, use uc32_cpu_init() to
create a UniCore32CPU object.
Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 eeff620f
......@@ -109,6 +109,7 @@ static void puv3_init(MachineState *machine)
const char *kernel_filename = machine->kernel_filename;
const char *initrd_filename = machine->initrd_filename;
CPUUniCore32State *env;
UniCore32CPU *cpu;
if (initrd_filename) {
hw_error("Please use kernel built-in initramdisk.\n");
......@@ -118,10 +119,11 @@ static void puv3_init(MachineState *machine)
cpu_model = "UniCore-II";
}
env = cpu_init(cpu_model);
if (!env) {
cpu = uc32_cpu_init(cpu_model);
if (!cpu) {
hw_error("Unable to find CPU definition\n");
}
env = &cpu->env;
puv3_soc_init(env);
puv3_board_init(env, ram_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册