Hi Philippe, > Subject: Re: [PATCH v1 08/12] hw/arm/aspeed_ast10x0: Add AST1060 SoC > support > > On 6/11/25 09:49, Jamin Lin via wrote: > > Add initial support for the Aspeed AST1060 SoC. The AST1060 reuses > > most of the AST1030 peripheral device models, as the two SoCs share > > nearly the same controllers including WDT, SCU, TIMER, HACE, ADC, I2C, > > FMC, and SPI. > > > > A new common initialization and realization framework (ast10x0_init > > and ast10x0_realize) is leveraged so AST1060 can instantiate the > > existing AST1030 models without redefining duplicate device types. > > > > Signed-off-by: Jamin Lin <[email protected]> > > --- > > hw/arm/aspeed_ast10x0.c | 61 > ++++++++++++++++++++++++++++++++++++++++- > > 1 file changed, 60 insertions(+), 1 deletion(-) > > > > diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c index > > c85c21b149..17f5285d85 100644 > > --- a/hw/arm/aspeed_ast10x0.c > > +++ b/hw/arm/aspeed_ast10x0.c > > @@ -190,6 +190,25 @@ static void aspeed_soc_ast1030_init(Object *obj) > > object_initialize_child(obj, "peci", &s->peci, TYPE_ASPEED_PECI); > > } > > > > +static void aspeed_soc_ast1060_init(Object *obj) { > > + char socname[8] = "ast1030"; > > + > > + /* > > + * The AST1060 SoC reuses the AST1030 device models. Since all > peripheral > > + * models (e.g. WDT, SCU, TIMER, HACE, ADC, I2C, FMC, SPI) defined > for > > + * AST1030 are compatible with AST1060, we simply reuse the existing > > + * AST1030 models for AST1060. > > + * > > + * To simplify the implementation, AST1060 sets its socname to that of > > + * AST1030, avoiding the need to create a full set of new > > + * TYPE_ASPEED_1060_XXX device definitions. This allows the same > > + * TYPE_ASPEED_1030_WDT and other models to be instantiated for > both > > + * SoCs. > > + */ > > + aspeed_soc_ast10x0_init(obj, socname); > > Why not simply use: > > aspeed_soc_ast10x0_init(obj, "ast1030"); > > ?
Thanks for the review and suggestions. Will update it. Thanks, Jamin > > > +}
