On 10/13/25 07:43, Jamin Lin wrote:
Refactor the aspeed_soc_cpu_type() helper to remove its dependency on
AspeedSoCClass and make CPU type retrieval more generic.
The function now takes valid_cpu_types as a const char * const *
parameter instead of requiring a full AspeedSoCClass instance.
All corresponding call sites in various Aspeed SoC initialization files
(aspeed_ast10x0.c, aspeed_ast2400.c, aspeed_ast2600.c,
aspeed_ast27x0.c, and related variants) are updated accordingly.
This change simplifies the API, eliminates unnecessary type coupling,
and improves code reusability across different SoC families.
No functional change.
Signed-off-by: Jamin Lin <[email protected]>
---
include/hw/arm/aspeed_soc.h | 3 +--
hw/arm/aspeed_ast10x0.c | 3 ++-
hw/arm/aspeed_ast2400.c | 2 +-
hw/arm/aspeed_ast2600.c | 2 +-
hw/arm/aspeed_ast27x0-ssp.c | 3 ++-
hw/arm/aspeed_ast27x0-tsp.c | 3 ++-
hw/arm/aspeed_ast27x0.c | 2 +-
hw/arm/aspeed_soc_common.c | 10 +++++-----
8 files changed, 15 insertions(+), 13 deletions(-)
Reviewed-by: Cédric Le Goater <[email protected]>
Thanks,
C.