milkymist: Use cpu_lm32_init() to obtain LM32CPU

Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael Walle <michael@walle.cc>
This commit is contained in:
Andreas Färber 2012-05-04 19:03:24 +02:00
parent b143559655
commit 1328cc01f1

View file

@ -79,6 +79,7 @@ milkymist_init(ram_addr_t ram_size_not_used,
const char *kernel_cmdline, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model) const char *initrd_filename, const char *cpu_model)
{ {
LM32CPU *cpu;
CPULM32State *env; CPULM32State *env;
int kernel_size; int kernel_size;
DriveInfo *dinfo; DriveInfo *dinfo;
@ -105,7 +106,8 @@ milkymist_init(ram_addr_t ram_size_not_used,
if (cpu_model == NULL) { if (cpu_model == NULL) {
cpu_model = "lm32-full"; cpu_model = "lm32-full";
} }
env = cpu_init(cpu_model); cpu = cpu_lm32_init(cpu_model);
env = &cpu->env;
reset_info->env = env; reset_info->env = env;
cpu_lm32_set_phys_msb_ignore(env, 1); cpu_lm32_set_phys_msb_ignore(env, 1);