4 * Andrew Jeffery <andrew@aj.id.au>
6 * Copyright 2016 IBM Corp.
8 * This code is licensed under the GPL version 2 or later. See
9 * the COPYING file in the top-level directory.
15 #include "hw/cpu/a15mpcore.h"
16 #include "hw/intc/aspeed_vic.h"
17 #include "hw/misc/aspeed_scu.h"
18 #include "hw/misc/aspeed_sdmc.h"
19 #include "hw/misc/aspeed_xdma.h"
20 #include "hw/timer/aspeed_timer.h"
21 #include "hw/rtc/aspeed_rtc.h"
22 #include "hw/i2c/aspeed_i2c.h"
23 #include "hw/ssi/aspeed_smc.h"
24 #include "hw/watchdog/wdt_aspeed.h"
25 #include "hw/net/ftgmac100.h"
26 #include "target/arm/cpu.h"
27 #include "hw/gpio/aspeed_gpio.h"
28 #include "hw/sd/aspeed_sdhci.h"
29 #include "hw/usb/hcd-ehci.h"
31 #define ASPEED_SPIS_NUM 2
32 #define ASPEED_EHCIS_NUM 2
33 #define ASPEED_WDTS_NUM 4
34 #define ASPEED_CPUS_NUM 2
35 #define ASPEED_MACS_NUM 4
37 typedef struct AspeedSoCState
{
42 ARMCPU cpu
[ASPEED_CPUS_NUM
];
43 A15MPPrivState a7mpcore
;
44 MemoryRegion
*dram_mr
;
48 AspeedTimerCtrlState timerctrl
;
53 AspeedSMCState spi
[ASPEED_SPIS_NUM
];
54 EHCISysBusState ehci
[ASPEED_EHCIS_NUM
];
56 AspeedWDTState wdt
[ASPEED_WDTS_NUM
];
57 FTGMAC100State ftgmac100
[ASPEED_MACS_NUM
];
58 AspeedMiiState mii
[ASPEED_MACS_NUM
];
60 AspeedGPIOState gpio_1_8v
;
61 AspeedSDHCIState sdhci
;
62 AspeedSDHCIState emmc
;
65 #define TYPE_ASPEED_SOC "aspeed-soc"
66 #define ASPEED_SOC(obj) OBJECT_CHECK(AspeedSoCState, (obj), TYPE_ASPEED_SOC)
68 typedef struct AspeedSoCClass
{
69 DeviceClass parent_class
;
84 #define ASPEED_SOC_CLASS(klass) \
85 OBJECT_CLASS_CHECK(AspeedSoCClass, (klass), TYPE_ASPEED_SOC)
86 #define ASPEED_SOC_GET_CLASS(obj) \
87 OBJECT_GET_CLASS(AspeedSoCClass, (obj), TYPE_ASPEED_SOC)
138 #endif /* ASPEED_SOC_H */