hw/sh4: Use memory_region_init_rom() with read-only regions
This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
cc588b2a12
commit
5ccc751ef8
@ -53,8 +53,7 @@ static void shix_init(MachineState *machine)
|
||||
cpu = SUPERH_CPU(cpu_create(machine->cpu_type));
|
||||
|
||||
/* Allocate memory space */
|
||||
memory_region_init_ram(rom, NULL, "shix.rom", 0x4000, &error_fatal);
|
||||
memory_region_set_readonly(rom, true);
|
||||
memory_region_init_rom(rom, NULL, "shix.rom", 0x4000, &error_fatal);
|
||||
memory_region_add_subregion(sysmem, 0x00000000, rom);
|
||||
memory_region_init_ram(&sdram[0], NULL, "shix.sdram1", 0x01000000,
|
||||
&error_fatal);
|
||||
|
Loading…
x
Reference in New Issue
Block a user