diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-02-24 19:51:24 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-03-17 15:18:47 +0100 |
commit | 5ccc751ef8cd74757966a066cfd938ac2e4efd78 (patch) | |
tree | 0b345951c32b28eb4f35d1f22f0d19136d5b5388 /hw | |
parent | cc588b2a127d78be7707f9968f4a5b90aed042b5 (diff) | |
download | qemu-5ccc751ef8cd74757966a066cfd938ac2e4efd78.zip |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/sh4/shix.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c index 68b14ee5e7..f410c08883 100644 --- a/hw/sh4/shix.c +++ b/hw/sh4/shix.c @@ -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); |