Skip to content

Commit

Permalink
cris: memory: Replace memory_region_init_ram with memory_region_alloc…
Browse files Browse the repository at this point in the history
…ate_system_memory

Commit 0b183fc:"memory: move mem_path handling to
memory_region_allocate_system_memory" split memory_region_init_ram and
memory_region_init_ram_from_file. Also it moved mem-path handling a step
up from memory_region_init_ram to memory_region_allocate_system_memory.

Therefore for any board that uses memory_region_init_ram directly,
-mem-path is not supported.

Fix this by replacing memory_region_init_ram with
memory_region_allocate_system_memory.

Tested-by: Edgar E. Iglesias <[email protected]>
Reviewed-by: Edgar E. Iglesias <[email protected]>
Cc: Edgar E. Iglesias <[email protected]>
Signed-off-by: Dirk Mueller <[email protected]>
Signed-off-by: Edgar E. Iglesias <[email protected]>
  • Loading branch information
dirkmueller authored and edgarigl committed Apr 11, 2015
1 parent 58c24a4 commit c0c8584
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hw/cris/axis_dev88.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,8 @@ void axisdev88_init(MachineState *machine)
env = &cpu->env;

/* allocate RAM */
memory_region_init_ram(phys_ram, NULL, "axisdev88.ram", ram_size,
&error_abort);
vmstate_register_ram_global(phys_ram);
memory_region_allocate_system_memory(phys_ram, NULL, "axisdev88.ram",
ram_size);
memory_region_add_subregion(address_space_mem, 0x40000000, phys_ram);

/* The ETRAX-FS has 128Kb on chip ram, the docs refer to it as the
Expand Down

0 comments on commit c0c8584

Please sign in to comment.