aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/spitz.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-02-24 19:50:18 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-17 15:18:46 +0100
commit16260006acf8f3aee589b3fd26a1bbbf7b78ae4b (patch)
treeb550ba01b917ab5cfbe1989408c23904895a0bd0 /hw/arm/spitz.c
parentd3ec684d70d98a9fbc56fda1b611d039c90d0c5f (diff)
hw/arm: 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>
Diffstat (limited to 'hw/arm/spitz.c')
-rw-r--r--hw/arm/spitz.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index cbfa6934cf..c28d9b5ed7 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -929,8 +929,7 @@ static void spitz_common_init(MachineState *machine,
sl_flash_register(mpu, (model == spitz) ? FLASH_128M : FLASH_1024M);
- memory_region_init_ram(rom, NULL, "spitz.rom", SPITZ_ROM, &error_fatal);
- memory_region_set_readonly(rom, true);
+ memory_region_init_rom(rom, NULL, "spitz.rom", SPITZ_ROM, &error_fatal);
memory_region_add_subregion(address_space_mem, 0, rom);
/* Setup peripherals */