On 2026-09-30 9:25, Jamin Lin wrote:
Before this change, each unimplemented device needed its own field in
AspeedSoCState. This made the variable names confusing. For example,
AspeedSoCState has "udc" as an unimplemented device, but
Aspeed2600SoCState also has "udc" as the real UDC model.
Use the "unimp" array in AspeedSoCState for all unimplemented devices,
and use the AspeedUnimpDevice table to describe them. This makes the
code easier to maintain and read. Convert AST1040 to use them.
This also fixes a type mismatch. AST1040 used the "pwm" field
(AspeedPWMState) to create an unimplemented device. It now uses the
"unimp" array instead.
No functional change.
Signed-off-by: Jamin Lin <[email protected]>
---
hw/arm/aspeed_ast1040.c | 49 ++++++++++++++++++-----------------------
1 file changed, 22 insertions(+), 27 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>