summaryrefslogtreecommitdiffstats
path: root/include/hw/arm
diff options
context:
space:
mode:
authorCédric Le Goater2016-09-22 19:13:05 +0200
committerPeter Maydell2016-09-22 19:13:05 +0200
commitb033271f11a17debc1cc3e56f6b9fa319ebe2c45 (patch)
tree9c47ce065b63cefcf02c4d536ad44498dddee97e /include/hw/arm
parentast2400: replace ast2400 with aspeed_soc (diff)
downloadqemu-b033271f11a17debc1cc3e56f6b9fa319ebe2c45.tar.gz
qemu-b033271f11a17debc1cc3e56f6b9fa319ebe2c45.tar.xz
qemu-b033271f11a17debc1cc3e56f6b9fa319ebe2c45.zip
aspeed-soc: provide a framework to add new SoCs
Let's define an object class for each Aspeed SoC we support. A AspeedSoCInfo struct gathers the SoC specifications which can later be used by an instance of the class or by a board using the SoC. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Message-id: 1473438177-26079-4-git-send-email-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/arm')
-rw-r--r--include/hw/arm/aspeed_soc.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h
index bf63ae90ca..932704c380 100644
--- a/include/hw/arm/aspeed_soc.h
+++ b/include/hw/arm/aspeed_soc.h
@@ -39,6 +39,21 @@ typedef struct AspeedSoCState {
#define TYPE_ASPEED_SOC "aspeed-soc"
#define ASPEED_SOC(obj) OBJECT_CHECK(AspeedSoCState, (obj), TYPE_ASPEED_SOC)
-#define AST2400_SDRAM_BASE 0x40000000
+typedef struct AspeedSoCInfo {
+ const char *name;
+ const char *cpu_model;
+ uint32_t silicon_rev;
+ hwaddr sdram_base;
+} AspeedSoCInfo;
+
+typedef struct AspeedSoCClass {
+ DeviceClass parent_class;
+ AspeedSoCInfo *info;
+} AspeedSoCClass;
+
+#define ASPEED_SOC_CLASS(klass) \
+ OBJECT_CLASS_CHECK(AspeedSoCClass, (klass), TYPE_ASPEED_SOC)
+#define ASPEED_SOC_GET_CLASS(obj) \
+ OBJECT_GET_CLASS(AspeedSoCClass, (obj), TYPE_ASPEED_SOC)
#endif /* ASPEED_SOC_H */