mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
ff90606f9a
commit
b033271f11
3 changed files with 54 additions and 13 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue