arm/omap_sx1: use memdev for RAM
authorIgor Mammedov <imammedo@redhat.com>
Wed, 19 Feb 2020 16:09:00 +0000 (11:09 -0500)
committerPatchew Importer <importer@patchew.org>
Wed, 19 Feb 2020 16:49:56 +0000 (16:49 +0000)
commit238ea0e311560eebc5a531cad6adabc66224eb2c
tree15cc2e022f2e6f6ecbf8813f2bd3d7b082b16089
parent7998beb9c2e280f0b7424223747941f106e2e854
arm/omap_sx1: 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: Andrew Jones <drjones@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200219160953.13771-27-imammedo@redhat.com>
hw/arm/omap_sx1.c