aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/vexpress.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-07-07 15:42:53 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-07-14 17:59:42 +0100
commit98a99ce0840991ed28fd4c570ae549c371e89970 (patch)
tree8e437a7afbf94d498d0579550c0ce6d6d2faed01 /hw/arm/vexpress.c
parent96d851a64b42aea4974f2c25a56cd2a05f34905d (diff)
hw: Use new memory_region_init_{ram, rom, rom_device}() functions
Use the new functions memory_region_init_{ram,rom,rom_device}() instead of manually calling the _nomigrate() version and then vmstate_register_ram_global(). Patch automatically created using coccinelle script: spatch --in-place -sp_file scripts/coccinelle/memory-region-init-ram.cocci -dir hw (As it turns out, there are no instances of the rom and rom_device functions that are caught by this script.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1499438577-7674-8-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm/vexpress.c')
-rw-r--r--hw/arm/vexpress.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 874d88500e..528c65ddb6 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -390,9 +390,8 @@ static void a15_daughterboard_init(const VexpressMachineState *vms,
/* 0x2b060000: SP805 watchdog: not modelled */
/* 0x2b0a0000: PL341 dynamic memory controller: not modelled */
/* 0x2e000000: system SRAM */
- memory_region_init_ram_nomigrate(sram, NULL, "vexpress.a15sram", 0x10000,
+ memory_region_init_ram(sram, NULL, "vexpress.a15sram", 0x10000,
&error_fatal);
- vmstate_register_ram_global(sram);
memory_region_add_subregion(sysmem, 0x2e000000, sram);
/* 0x7ffb0000: DMA330 DMA controller: not modelled */
@@ -673,15 +672,13 @@ static void vexpress_common_init(MachineState *machine)
}
sram_size = 0x2000000;
- memory_region_init_ram_nomigrate(sram, NULL, "vexpress.sram", sram_size,
+ memory_region_init_ram(sram, NULL, "vexpress.sram", sram_size,
&error_fatal);
- vmstate_register_ram_global(sram);
memory_region_add_subregion(sysmem, map[VE_SRAM], sram);
vram_size = 0x800000;
- memory_region_init_ram_nomigrate(vram, NULL, "vexpress.vram", vram_size,
+ memory_region_init_ram(vram, NULL, "vexpress.vram", vram_size,
&error_fatal);
- vmstate_register_ram_global(vram);
memory_region_add_subregion(sysmem, map[VE_VIDEORAM], vram);
/* 0x4e000000 LAN9118 Ethernet */