summary refs log tree commit diff stats
path: root/include/hw/arm
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-08-12 10:33:49 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-09-01 11:08:20 +0100
commita4b1e9d3f863a8dfbf28f5469dcc95a07c9ac105 (patch)
treeeb0a61e9f26ce61d9051571daee723a4a96578bc /include/hw/arm
parent8ecda75f721b0673e9ad1420198a4f4ec3ae2cb9 (diff)
downloadfocaccia-qemu-a4b1e9d3f863a8dfbf28f5469dcc95a07c9ac105.tar.gz
focaccia-qemu-a4b1e9d3f863a8dfbf28f5469dcc95a07c9ac105.zip
hw/arm/msf2_soc: Don't allocate separate MemoryRegions
In the realize method of the msf2-soc SoC object, we call g_new() to
create new MemoryRegion objects for the nvm, nvm_alias, and sram.
This is unnecessary; make these MemoryRegions member fields of the
device state struct instead.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alexandre Iooss <erdnaxe@crans.org>
Message-id: 20210812093356.1946-19-peter.maydell@linaro.org
Diffstat (limited to 'include/hw/arm')
-rw-r--r--include/hw/arm/msf2-soc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/arm/msf2-soc.h b/include/hw/arm/msf2-soc.h
index d406184685..38e10ce20a 100644
--- a/include/hw/arm/msf2-soc.h
+++ b/include/hw/arm/msf2-soc.h
@@ -65,6 +65,10 @@ struct MSF2State {
     MSSTimerState timer;
     MSSSpiState spi[MSF2_NUM_SPIS];
     MSF2EmacState emac;
+
+    MemoryRegion nvm;
+    MemoryRegion nvm_alias;
+    MemoryRegion sram;
 };
 
 #endif