On 10/23/25 12:01, Jamin Lin wrote:
The function aspeed_machine_class_init_cpus_defaults() is now made
globally visible so that it can be used by other Aspeed machine C files.

Previously, this function was declared as static, restricting its
visibility to aspeed.c. Since future machine split files will also
need to call this helper to initialize default CPU settings, its
declaration has been moved to the common header aspeed.h and the
static keyword has been removed.

No functional changes.

Signed-off-by: Jamin Lin <[email protected]>
---
  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 383ebb9759..7743ad2fb0 100644
--- a/include/hw/arm/aspeed.h
+++ b/include/hw/arm/aspeed.h
@@ -59,5 +59,6 @@ struct AspeedMachineClass {
      bool vbootrom;
  };
+void aspeed_machine_class_init_cpus_defaults(MachineClass *mc); #endif
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 761b526994..5da21a4d6a 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -1338,7 +1338,7 @@ static void aspeed_machine_class_props_init(ObjectClass 
*oc)
                                            "Change the SPI Flash model");
  }
-static void aspeed_machine_class_init_cpus_defaults(MachineClass *mc)
+void aspeed_machine_class_init_cpus_defaults(MachineClass *mc)
  {
      AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(mc);
      AspeedSoCClass *sc = 
ASPEED_SOC_CLASS(object_class_by_name(amc->soc_name));



Reviewed-by: Cédric Le Goater <[email protected]>

Thanks,

C.




Reply via email to