This commit exposes the function aspeed_machine_ast2600_class_emmc_init() as
a common API so that other AST2600-based machine implementations can reuse it
to enable the "boot-emmc" property.
Previously, this function was defined as a static helper within aspeed.c,
limiting its visibility to that file. By making it global and declaring it in
aspeed.h, other machine definition files (e.g., for specific AST2600 boards)
can now easily call this API to register eMMC boot configuration support.
No functional changes.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
include/hw/arm/aspeed.h | 1 +
hw/arm/aspeed.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h
index fbe684d505..66ea8c98d1 100644
--- a/include/hw/arm/aspeed.h
+++ b/include/hw/arm/aspeed.h
@@ -62,5 +62,6 @@ struct AspeedMachineClass {
void aspeed_machine_class_init_cpus_defaults(MachineClass *mc);
void create_pca9552(AspeedSoCState *soc, int bus_id, int addr);
I2CSlave *create_pca9554(AspeedSoCState *soc, int bus_id, int addr);
+void aspeed_machine_ast2600_class_emmc_init(ObjectClass *oc);
#endif
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 9a41f8ae84..e46768d72a 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -761,7 +761,7 @@ static void aspeed_machine_ast2600_set_boot_from_emmc(Object *obj, bool value,
}
}
-static void aspeed_machine_ast2600_class_emmc_init(ObjectClass *oc)
+void aspeed_machine_ast2600_class_emmc_init(ObjectClass *oc)
{
object_class_property_add_bool(oc, "boot-emmc",
aspeed_machine_ast2600_get_boot_from_emmc,
--
2.43.0