arm/collie: use memdev for RAM
commit00b9829f83c05fd338a33e1c20dce6d9eb8b6458
authorIgor Mammedov <imammedo@redhat.com>
Wed, 19 Feb 2020 16:08:45 +0000 (19 11:08 -0500)
committerPatchew Importer <importer@patchew.org>
Wed, 19 Feb 2020 16:49:54 +0000 (19 16:49 +0000)
tree48a87e6c61e589aeb88a1728c5be1e680e6f776e
parentafcbaed668fc96bd10079faf3591cca94ecdd94e
arm/collie: 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:
 - while at it add check for user supplied RAM size and error
   out if it mismatches board expected value.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200219160953.13771-12-imammedo@redhat.com>
hw/arm/collie.c