summaryrefslogtreecommitdiffstats
path: root/hw/microblaze/petalogix_s3adsp1800_mmu.c
diff options
context:
space:
mode:
authorPeter Crosthwaite2015-05-25 05:31:40 +0200
committerEdgar E. Iglesias2015-06-21 09:20:14 +0200
commitd87636b18f8de901e76bedd9c7f55d3eaed924ee (patch)
treef9226b4fee294e0eeadefda0c42369ffd9fea727 /hw/microblaze/petalogix_s3adsp1800_mmu.c
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20150619'... (diff)
downloadqemu-d87636b18f8de901e76bedd9c7f55d3eaed924ee.tar.gz
qemu-d87636b18f8de901e76bedd9c7f55d3eaed924ee.tar.xz
qemu-d87636b18f8de901e76bedd9c7f55d3eaed924ee.zip
microblaze: s3adsp: Instantiate CPU using QOM
Instantiate and realise the CPU directly, rather than using cpu_mb_init. Microblazes cpu_model argument is a dummy so remove the default cpu_model set logic. Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'hw/microblaze/petalogix_s3adsp1800_mmu.c')
-rw-r--r--hw/microblaze/petalogix_s3adsp1800_mmu.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index 84f6e74653..4dbbd1e5d2 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -62,7 +62,6 @@ static void
petalogix_s3adsp1800_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
- const char *cpu_model = machine->cpu_model;
DeviceState *dev;
MicroBlazeCPU *cpu;
DriveInfo *dinfo;
@@ -73,11 +72,8 @@ petalogix_s3adsp1800_init(MachineState *machine)
qemu_irq irq[32];
MemoryRegion *sysmem = get_system_memory();
- /* init CPUs */
- if (cpu_model == NULL) {
- cpu_model = "microblaze";
- }
- cpu = cpu_mb_init(cpu_model);
+ cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
+ object_property_set_bool(OBJECT(cpu), true, "realized", &error_abort);
/* Attach emulated BRAM through the LMB. */
memory_region_init_ram(phys_lmb_bram, NULL,