]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/arm/aspeed: Remove AspeedSoCClass dependency from aspeed_soc_cpu_type() API
authorJamin Lin <jamin_lin@aspeedtech.com>
Mon, 13 Oct 2025 05:43:16 +0000 (13:43 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 13 Oct 2025 12:37:55 +0000 (14:37 +0200)
commitbb3219345aa195b1ac3d0c91ab30d90d2fc85c16
tree1f0fb306df9a676d04e7c458c82594c383f14cc0
parent8f1ceec735cb3b44b68ee7dd129d8844f81e39c3
hw/arm/aspeed: Remove AspeedSoCClass dependency from aspeed_soc_cpu_type() API

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 <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251013054334.955331-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/arm/aspeed_ast10x0.c
hw/arm/aspeed_ast2400.c
hw/arm/aspeed_ast2600.c
hw/arm/aspeed_ast27x0-ssp.c
hw/arm/aspeed_ast27x0-tsp.c
hw/arm/aspeed_ast27x0.c
hw/arm/aspeed_soc_common.c
include/hw/arm/aspeed_soc.h