aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/aspeed.c2
-rw-r--r--hw/arm/fby35.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 4193a3d..b3bbe06 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -38,8 +38,6 @@ struct AspeedMachineState {
/* Public */
AspeedSoCState soc;
- MemoryRegion ram_container;
- MemoryRegion max_ram;
bool mmio_exec;
char *fmc_model;
char *spi_model;
diff --git a/hw/arm/fby35.c b/hw/arm/fby35.c
index 79605f3..90c04bb 100644
--- a/hw/arm/fby35.c
+++ b/hw/arm/fby35.c
@@ -72,11 +72,13 @@ static void fby35_bmc_init(Fby35State *s)
{
DriveInfo *drive0 = drive_get(IF_MTD, 0, 0);
- memory_region_init(&s->bmc_memory, OBJECT(s), "bmc-memory", UINT64_MAX);
- memory_region_init_ram(&s->bmc_dram, OBJECT(s), "bmc-dram",
+ object_initialize_child(OBJECT(s), "bmc", &s->bmc, "ast2600-a3");
+
+ memory_region_init(&s->bmc_memory, OBJECT(&s->bmc), "bmc-memory",
+ UINT64_MAX);
+ memory_region_init_ram(&s->bmc_dram, OBJECT(&s->bmc), "bmc-dram",
FBY35_BMC_RAM_SIZE, &error_abort);
- object_initialize_child(OBJECT(s), "bmc", &s->bmc, "ast2600-a3");
object_property_set_int(OBJECT(&s->bmc), "ram-size", FBY35_BMC_RAM_SIZE,
&error_abort);
object_property_set_link(OBJECT(&s->bmc), "memory", OBJECT(&s->bmc_memory),
@@ -120,9 +122,11 @@ static void fby35_bic_init(Fby35State *s)
s->bic_sysclk = clock_new(OBJECT(s), "SYSCLK");
clock_set_hz(s->bic_sysclk, 200000000ULL);
- memory_region_init(&s->bic_memory, OBJECT(s), "bic-memory", UINT64_MAX);
-
object_initialize_child(OBJECT(s), "bic", &s->bic, "ast1030-a1");
+
+ memory_region_init(&s->bic_memory, OBJECT(&s->bic), "bic-memory",
+ UINT64_MAX);
+
qdev_connect_clock_in(DEVICE(&s->bic), "sysclk", s->bic_sysclk);
object_property_set_link(OBJECT(&s->bic), "memory", OBJECT(&s->bic_memory),
&error_abort);