petalogix_ml605: Use cpu_mb_init() to obtain MicroBlazeCPU
authorAndreas Färber <afaerber@suse.de>
Sat, 5 May 2012 10:19:03 +0000 (12:19 +0200)
committerAndreas Färber <afaerber@suse.de>
Mon, 4 Jun 2012 21:00:42 +0000 (23:00 +0200)
Needed for microblaze_load_kernel().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
hw/petalogix_ml605_mmu.c

index 31a4348..6819241 100644 (file)
@@ -75,6 +75,7 @@ petalogix_ml605_init(ram_addr_t ram_size,
 {
     MemoryRegion *address_space_mem = get_system_memory();
     DeviceState *dev;
+    MicroBlazeCPU *cpu;
     CPUMBState *env;
     DriveInfo *dinfo;
     int i;
@@ -87,7 +88,8 @@ petalogix_ml605_init(ram_addr_t ram_size,
     if (cpu_model == NULL) {
         cpu_model = "microblaze";
     }
-    env = cpu_init(cpu_model);
+    cpu = cpu_mb_init(cpu_model);
+    env = &cpu->env;
 
     /* Attach emulated BRAM through the LMB.  */
     memory_region_init_ram(phys_lmb_bram, "petalogix_ml605.lmb_bram",