summaryrefslogtreecommitdiffstats
path: root/hw/ppc/sam460ex.c
diff options
context:
space:
mode:
authorIgor Mammedov2020-02-19 17:09:40 +0100
committerPatchew Importer2020-02-19 17:50:00 +0100
commitb28f01880eda878f66cbba54be98bfd96582e857 (patch)
tree4570dab59fc598c6c72e9cb889e0ffb8f492aecd /hw/ppc/sam460ex.c
parentppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup (diff)
downloadqemu-b28f01880eda878f66cbba54be98bfd96582e857.tar.gz
qemu-b28f01880eda878f66cbba54be98bfd96582e857.tar.xz
qemu-b28f01880eda878f66cbba54be98bfd96582e857.zip
ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM
memory_region_allocate_system_memory() API is going away, so replace it with memdev allocated MemoryRegion. The later is initialized by generic code, so board only needs to opt in to memdev scheme by providing MachineClass::default_ram_id and using MachineState::ram instead of manually initializing RAM memory region. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu> Acked-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20200219160953.13771-67-imammedo@redhat.com>
Diffstat (limited to 'hw/ppc/sam460ex.c')
-rw-r--r--hw/ppc/sam460ex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 17d40bd672..898453cf30 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -324,7 +324,7 @@ static void sam460ex_init(MachineState *machine)
/* SDRAM controller */
/* put all RAM on first bank because board has one slot
* and firmware only checks that */
- ppc4xx_sdram_banks(machine->ram_size, 1, ram_memories, ram_bases, ram_sizes,
+ ppc4xx_sdram_banks(machine->ram, 1, ram_memories, ram_bases, ram_sizes,
ppc460ex_sdram_bank_sizes);
/* FIXME: does 460EX have ECC interrupts? */
@@ -484,6 +484,7 @@ static void sam460ex_machine_init(MachineClass *mc)
mc->init = sam460ex_init;
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("460exb");
mc->default_ram_size = 512 * MiB;
+ mc->default_ram_id = "ppc4xx.sdram";
}
DEFINE_MACHINE("sam460ex", sam460ex_machine_init)