mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
hw/arm/omap2: Create the RAM in the board
The SDRAM is incorrectly created in the OMAP2420 SoC. Move its creation in the board code, this will later allow the board to have the QOM ownership of the RAM. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20191021190653.9511-5-philmd@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
3cd892daa3
commit
e285e8678e
3 changed files with 13 additions and 14 deletions
|
@ -47,6 +47,7 @@
|
|||
|
||||
/* Nokia N8x0 support */
|
||||
struct n800_s {
|
||||
MemoryRegion sdram;
|
||||
struct omap_mpu_state_s *mpu;
|
||||
|
||||
struct rfbi_chip_s blizzard;
|
||||
|
@ -1311,11 +1312,14 @@ static int n810_atag_setup(const struct arm_boot_info *info, void *p)
|
|||
static void n8x0_init(MachineState *machine,
|
||||
struct arm_boot_info *binfo, int model)
|
||||
{
|
||||
MemoryRegion *sysmem = get_system_memory();
|
||||
struct n800_s *s = (struct n800_s *) g_malloc0(sizeof(*s));
|
||||
int sdram_size = binfo->ram_size;
|
||||
uint64_t sdram_size = binfo->ram_size;
|
||||
|
||||
s->mpu = omap2420_mpu_init(sysmem, sdram_size, machine->cpu_type);
|
||||
memory_region_allocate_system_memory(&s->sdram, NULL, "omap2.dram",
|
||||
sdram_size);
|
||||
memory_region_add_subregion(get_system_memory(), OMAP2_Q2_BASE, &s->sdram);
|
||||
|
||||
s->mpu = omap2420_mpu_init(&s->sdram, machine->cpu_type);
|
||||
|
||||
/* Setup peripherals
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue