petalogix-ml605: Create the CPU with object_new()
This is to allow future patches to set properties before cpu::realize(). Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
parent
2e38847b8d
commit
a4550442b9
|
@ -75,7 +75,6 @@ static void
|
||||||
petalogix_ml605_init(QEMUMachineInitArgs *args)
|
petalogix_ml605_init(QEMUMachineInitArgs *args)
|
||||||
{
|
{
|
||||||
ram_addr_t ram_size = args->ram_size;
|
ram_addr_t ram_size = args->ram_size;
|
||||||
const char *cpu_model = args->cpu_model;
|
|
||||||
MemoryRegion *address_space_mem = get_system_memory();
|
MemoryRegion *address_space_mem = get_system_memory();
|
||||||
DeviceState *dev, *dma, *eth0;
|
DeviceState *dev, *dma, *eth0;
|
||||||
Object *ds, *cs;
|
Object *ds, *cs;
|
||||||
|
@ -89,10 +88,8 @@ petalogix_ml605_init(QEMUMachineInitArgs *args)
|
||||||
qemu_irq irq[32];
|
qemu_irq irq[32];
|
||||||
|
|
||||||
/* init CPUs */
|
/* init CPUs */
|
||||||
if (cpu_model == NULL) {
|
cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
|
||||||
cpu_model = "microblaze";
|
object_property_set_bool(OBJECT(cpu), true, "realized", &error_abort);
|
||||||
}
|
|
||||||
cpu = cpu_mb_init(cpu_model);
|
|
||||||
|
|
||||||
/* Attach emulated BRAM through the LMB. */
|
/* Attach emulated BRAM through the LMB. */
|
||||||
memory_region_init_ram(phys_lmb_bram, NULL, "petalogix_ml605.lmb_bram",
|
memory_region_init_ram(phys_lmb_bram, NULL, "petalogix_ml605.lmb_bram",
|
||||||
|
|
Loading…
Reference in a new issue