diff options
author | Cédric Le Goater <clg@kaod.org> | 2019-11-19 15:12:07 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-12-16 10:46:34 +0000 |
commit | baa4732bc10b3fd7c304ec7087e87b721ad891cf (patch) | |
tree | 1e3ec1731b84e4605e8194e49a53109eea56d670 /include/hw/arm/aspeed.h | |
parent | f286f04c21aba0f751ede4f5c99228a09e40c90b (diff) | |
download | qemu-baa4732bc10b3fd7c304ec7087e87b721ad891cf.zip qemu-baa4732bc10b3fd7c304ec7087e87b721ad891cf.tar.gz qemu-baa4732bc10b3fd7c304ec7087e87b721ad891cf.tar.bz2 |
aspeed: Remove AspeedBoardConfig array and use AspeedMachineClass
AspeedBoardConfig is a redundant way to define class attributes and it
complexifies the machine definition and initialization.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20191119141211.25716-14-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/arm/aspeed.h')
-rw-r--r-- | include/hw/arm/aspeed.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h index f49bc70..4423cd0 100644 --- a/include/hw/arm/aspeed.h +++ b/include/hw/arm/aspeed.h @@ -13,19 +13,6 @@ typedef struct AspeedBoardState AspeedBoardState; -typedef struct AspeedBoardConfig { - const char *name; - const char *desc; - const char *soc_name; - uint32_t hw_strap1; - uint32_t hw_strap2; - const char *fmc_model; - const char *spi_model; - uint32_t num_cs; - void (*i2c_init)(AspeedBoardState *bmc); - uint32_t ram; -} AspeedBoardConfig; - #define TYPE_ASPEED_MACHINE MACHINE_TYPE_NAME("aspeed") #define ASPEED_MACHINE(obj) \ OBJECT_CHECK(AspeedMachine, (obj), TYPE_ASPEED_MACHINE) @@ -41,7 +28,16 @@ typedef struct AspeedMachine { typedef struct AspeedMachineClass { MachineClass parent_obj; - const AspeedBoardConfig *board; + + const char *name; + const char *desc; + const char *soc_name; + uint32_t hw_strap1; + uint32_t hw_strap2; + const char *fmc_model; + const char *spi_model; + uint32_t num_cs; + void (*i2c_init)(AspeedBoardState *bmc); } AspeedMachineClass; |