summaryrefslogtreecommitdiffstats
path: root/include/hw
diff options
context:
space:
mode:
authorBALATON Zoltan2022-09-24 14:27:51 +0200
committerDaniel Henrique Barboza2022-10-17 21:15:09 +0200
commit8626982301dc8dbbe49e0fb1730461955df879c8 (patch)
treec1f13e84c6256349ecc3f1bf8d0123dc4f927bc9 /include/hw
parentppc440_bamboo: Remove unnecessary memsets (diff)
downloadqemu-8626982301dc8dbbe49e0fb1730461955df879c8.tar.gz
qemu-8626982301dc8dbbe49e0fb1730461955df879c8.tar.xz
qemu-8626982301dc8dbbe49e0fb1730461955df879c8.zip
ppc4xx: Introduce Ppc4xxSdramBank struct
Instead of storing sdram bank parameters in unrelated arrays put them in a struct so it's clear they belong to the same bank and simplify the state struct using this bank type. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <5eb82d0424c584b2b9e6f7bc51560f8189ed21bb.1664021647.git.balaton@eik.bme.hu> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/ppc/ppc4xx.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h
index a1781afa8e..2af0d60577 100644
--- a/include/hw/ppc/ppc4xx.h
+++ b/include/hw/ppc/ppc4xx.h
@@ -29,6 +29,14 @@
#include "exec/memory.h"
#include "hw/sysbus.h"
+typedef struct {
+ MemoryRegion ram;
+ MemoryRegion container; /* used for clipping */
+ hwaddr base;
+ hwaddr size;
+ uint32_t bcr;
+} Ppc4xxSdramBank;
+
void ppc4xx_sdram_banks(MemoryRegion *ram, int nr_banks,
MemoryRegion ram_memories[],
hwaddr ram_bases[], hwaddr ram_sizes[],