hw/arm/aspeed: Introduce aspeed_soc_cpu_type() helper

In order to alter AspeedSoCClass::cpu_type in the next
commit, introduce the aspeed_soc_cpu_type() helper to
retrieve the per-SoC CPU type from AspeedSoCClass.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
Philippe Mathieu-Daudé 2024-01-25 06:55:43 +01:00 committed by Cédric Le Goater
parent 43a0a5c995
commit d815649c51
5 changed files with 11 additions and 3 deletions

View file

@ -18,6 +18,11 @@
#include "hw/char/serial.h"
const char *aspeed_soc_cpu_type(AspeedSoCClass *sc)
{
return sc->cpu_type;
}
qemu_irq aspeed_soc_get_irq(AspeedSoCState *s, int dev)
{
return ASPEED_SOC_GET_CLASS(s)->get_irq(s, dev);