ppc/ppc405_boards: use memdev for RAM
commit2dc9ce13d210d591a0b9d98234fe6f39a535bf68
authorIgor Mammedov <imammedo@redhat.com>
Wed, 19 Feb 2020 16:09:38 +0000 (19 11:09 -0500)
committerPatchew Importer <importer@patchew.org>
Wed, 19 Feb 2020 16:50:00 +0000 (19 16:50 +0000)
tree1694fc343bbb854b1ac7e843e4ade227ecb035ec
parent4428dcf7b990d6dae05de8611dcd7098121534c8
ppc/ppc405_boards: 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.

PS:
in ref405ep alias RAM into ram_memories[] to avoid re-factoring
its user ppc405ep_init(), which would be invasive and out of
scope this patch.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200219160953.13771-65-imammedo@redhat.com>
hw/ppc/ppc405_boards.c