On 2026-09-30 9:25, Jamin Lin wrote:
Before this change, each unimplemented device needed its own field in
the coprocessor state. This made the code hard to maintain.

Add an "unimp" array in AspeedCoprocessorState for all unimplemented
devices, and use the AspeedUnimpDevice table to describe them. This
makes the code easier to maintain and read. Convert AST2700 SSP and
TSP to use them.

This also fixes a type mismatch. SSP and TSP used the "timerctrl"
field (AspeedTimerCtrlState) to create an unimplemented device. They
now use the "unimp" array instead.

No functional change.

Signed-off-by: Jamin Lin <[email protected]>
---
  include/hw/arm/aspeed_coprocessor.h |  1 +
  hw/arm/aspeed_ast27x0-ssp.c         | 56 ++++++++++++++---------------
  hw/arm/aspeed_ast27x0-tsp.c         | 56 ++++++++++++++---------------
  3 files changed, 53 insertions(+), 60 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

Reply via email to