Patchwork [next,v2,44/74] milkymist: Use cpu_lm32_init() to obtain LM32CPU

login
register
mail settings
Submitter Andreas Färber
Date May 10, 2012, 12:14 a.m.
Message ID <1336608892-30501-45-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/158162/
State New
Headers show

Comments

Andreas Färber - May 10, 2012, 12:14 a.m.
Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael Walle <michael@walle.cc>
---
 hw/milkymist.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/milkymist.c b/hw/milkymist.c
index 8bb6a97..59f37b4 100644
--- a/hw/milkymist.c
+++ b/hw/milkymist.c
@@ -79,6 +79,7 @@  milkymist_init(ram_addr_t ram_size_not_used,
                           const char *kernel_cmdline,
                           const char *initrd_filename, const char *cpu_model)
 {
+    LM32CPU *cpu;
     CPULM32State *env;
     int kernel_size;
     DriveInfo *dinfo;
@@ -105,7 +106,8 @@  milkymist_init(ram_addr_t ram_size_not_used,
     if (cpu_model == NULL) {
         cpu_model = "lm32-full";
     }
-    env = cpu_init(cpu_model);
+    cpu = cpu_lm32_init(cpu_model);
+    env = &cpu->env;
     reset_info->env = env;
 
     cpu_lm32_set_phys_msb_ignore(env, 1);