On 10/13/25 07:43, Jamin Lin wrote:
Refactor aspeed_soc_uart_realize() to take MemoryRegion *, SerialMM *,
and MMIO base addr instead of AspeedSoCState *, decoupling the helper
from SoC state and making it reusable per-UART.
The helper now realizes a single UART instance and maps its MMIO.
IRQ wiring and iteration over all UARTs are moved to callers.
Update call sites in AST1030, AST2400, AST2600, AST27x0 SSP/TSP, and
AST2700 to loop over UARTs, call the new helper, and connect IRQ via
aspeed_soc_get_irq().
This simplifies the UART realize path and reduces cross-module coupling.
No functional change.
Signed-off-by: Jamin Lin <[email protected]>
---
include/hw/arm/aspeed_soc.h | 3 ++-
hw/arm/aspeed_ast10x0.c | 10 ++++++++--
hw/arm/aspeed_ast2400.c | 10 ++++++++--
hw/arm/aspeed_ast2600.c | 10 ++++++++--
hw/arm/aspeed_ast27x0-ssp.c | 10 ++++++++--
hw/arm/aspeed_ast27x0-tsp.c | 10 ++++++++--
hw/arm/aspeed_ast27x0.c | 10 ++++++++--
hw/arm/aspeed_soc_common.c | 28 ++++++++++------------------
8 files changed, 60 insertions(+), 31 deletions(-)
Reviewed-by: Cédric Le Goater <[email protected]>
Thanks,
C.