diff options
author | Peter Delevoryas <pdel@fb.com> | 2022-06-30 09:21:13 +0200 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-06-30 09:21:13 +0200 |
commit | 4dd9d55416695b651d8146e057acff8954bc203d (patch) | |
tree | e13c11e2dab438c8f7b240a9b53042d45e9fe24a /hw/arm/aspeed.c | |
parent | e37976d733f75eab74018e6632f29c0335a4ddcd (diff) |
aspeed: Add memory property to Aspeed SoC
Multi-SoC machines can use this property to specify a memory container
for each SoC. Single SoC machines will just specify get_system_memory().
Signed-off-by: Peter Delevoryas <pdel@fb.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220624003701.1363500-3-pdel@fb.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/arm/aspeed.c')
-rw-r--r-- | hw/arm/aspeed.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index dc09773b0b..b43dc0fda8 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -329,6 +329,8 @@ static void aspeed_machine_init(MachineState *machine) &error_abort); object_property_set_int(OBJECT(&bmc->soc), "hw-strap2", amc->hw_strap2, &error_abort); + object_property_set_link(OBJECT(&bmc->soc), "memory", + OBJECT(get_system_memory()), &error_abort); object_property_set_link(OBJECT(&bmc->soc), "dram", OBJECT(machine->ram), &error_abort); if (machine->kernel_filename) { @@ -1336,6 +1338,8 @@ static void aspeed_minibmc_machine_init(MachineState *machine) object_initialize_child(OBJECT(machine), "soc", &bmc->soc, amc->soc_name); qdev_connect_clock_in(DEVICE(&bmc->soc), "sysclk", sysclk); + object_property_set_link(OBJECT(&bmc->soc), "memory", + OBJECT(get_system_memory()), &error_abort); qdev_prop_set_uint32(DEVICE(&bmc->soc), "uart-default", amc->uart_default); qdev_realize(DEVICE(&bmc->soc), NULL, &error_abort); |