From: Jamin Lin via <qemu-arm@nongnu.org>
To: "Cédric Le Goater" <clg@kaod.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Troy Lee" <leetroy@gmail.com>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Joel Stanley" <joel@jms.id.au>,
"Alistair Francis" <alistair@alistair23.me>,
"Kevin Wolf" <kwolf@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
"open list:All patches CC here" <qemu-devel@nongnu.org>,
"open list:Block layer core" <qemu-block@nongnu.org>
Cc: <jamin_lin@aspeedtech.com>, <troy_lee@aspeedtech.com>,
<kane_chen@aspeedtech.com>
Subject: [PATCH v1 05/12] hw/arm/aspeed_ast10x0: Add common init function for AST10x0 SoCs
Date: Thu, 6 Nov 2025 16:49:14 +0800 [thread overview]
Message-ID: <20251106084925.1253704-6-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20251106084925.1253704-1-jamin_lin@aspeedtech.com>
Introduce a new common initialization function
aspeed_soc_ast10x0_init() for AST10x0 series SoCs. This separates the
shared initialization logic from the AST1030-specific part, allowing
reuse by future SoCs such as AST1060.
The AST1060 does not include the LPC and PECI models, so the common
initializer is used for all shared modules, while
aspeed_soc_ast1030_init() adds initialization of LPC and PECI, which
are unique to AST1030.
This refactor improves code reuse and prepares the codebase for
supporting the AST1060 platform.
No functional changes.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
hw/arm/aspeed_ast10x0.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c
index ca487774ae..5941ebe00c 100644
--- a/hw/arm/aspeed_ast10x0.c
+++ b/hw/arm/aspeed_ast10x0.c
@@ -107,7 +107,7 @@ static qemu_irq aspeed_soc_ast1030_get_irq(AspeedSoCState *s, int dev)
return qdev_get_gpio_in(DEVICE(&a->armv7m), sc->irqmap[dev]);
}
-static void aspeed_soc_ast1030_init(Object *obj)
+static void aspeed_soc_ast10x0_init(Object *obj)
{
Aspeed10x0SoCState *a = ASPEED10X0_SOC(obj);
AspeedSoCState *s = ASPEED_SOC(obj);
@@ -150,10 +150,6 @@ static void aspeed_soc_ast1030_init(Object *obj)
object_initialize_child(obj, "spi[*]", &s->spi[i], typename);
}
- object_initialize_child(obj, "lpc", &s->lpc, TYPE_ASPEED_LPC);
-
- object_initialize_child(obj, "peci", &s->peci, TYPE_ASPEED_PECI);
-
object_initialize_child(obj, "sbc", &s->sbc, TYPE_ASPEED_AST10X0_SBC);
for (i = 0; i < sc->wdts_num; i++) {
@@ -185,6 +181,15 @@ static void aspeed_soc_ast1030_init(Object *obj)
TYPE_UNIMPLEMENTED_DEVICE);
}
+static void aspeed_soc_ast1030_init(Object *obj)
+{
+ AspeedSoCState *s = ASPEED_SOC(obj);
+
+ aspeed_soc_ast10x0_init(obj);
+ object_initialize_child(obj, "lpc", &s->lpc, TYPE_ASPEED_LPC);
+ object_initialize_child(obj, "peci", &s->peci, TYPE_ASPEED_PECI);
+}
+
static void aspeed_soc_ast1030_realize(DeviceState *dev_soc, Error **errp)
{
Aspeed10x0SoCState *a = ASPEED10X0_SOC(dev_soc);
--
2.43.0
WARNING: multiple messages have this Message-ID (diff)
From: Jamin Lin via <qemu-devel@nongnu.org>
To: "Cédric Le Goater" <clg@kaod.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Troy Lee" <leetroy@gmail.com>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Joel Stanley" <joel@jms.id.au>,
"Alistair Francis" <alistair@alistair23.me>,
"Kevin Wolf" <kwolf@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
"open list:All patches CC here" <qemu-devel@nongnu.org>,
"open list:Block layer core" <qemu-block@nongnu.org>
Cc: <jamin_lin@aspeedtech.com>, <troy_lee@aspeedtech.com>,
<kane_chen@aspeedtech.com>
Subject: [PATCH v1 05/12] hw/arm/aspeed_ast10x0: Add common init function for AST10x0 SoCs
Date: Thu, 6 Nov 2025 16:49:14 +0800 [thread overview]
Message-ID: <20251106084925.1253704-6-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20251106084925.1253704-1-jamin_lin@aspeedtech.com>
Introduce a new common initialization function
aspeed_soc_ast10x0_init() for AST10x0 series SoCs. This separates the
shared initialization logic from the AST1030-specific part, allowing
reuse by future SoCs such as AST1060.
The AST1060 does not include the LPC and PECI models, so the common
initializer is used for all shared modules, while
aspeed_soc_ast1030_init() adds initialization of LPC and PECI, which
are unique to AST1030.
This refactor improves code reuse and prepares the codebase for
supporting the AST1060 platform.
No functional changes.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
hw/arm/aspeed_ast10x0.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c
index ca487774ae..5941ebe00c 100644
--- a/hw/arm/aspeed_ast10x0.c
+++ b/hw/arm/aspeed_ast10x0.c
@@ -107,7 +107,7 @@ static qemu_irq aspeed_soc_ast1030_get_irq(AspeedSoCState *s, int dev)
return qdev_get_gpio_in(DEVICE(&a->armv7m), sc->irqmap[dev]);
}
-static void aspeed_soc_ast1030_init(Object *obj)
+static void aspeed_soc_ast10x0_init(Object *obj)
{
Aspeed10x0SoCState *a = ASPEED10X0_SOC(obj);
AspeedSoCState *s = ASPEED_SOC(obj);
@@ -150,10 +150,6 @@ static void aspeed_soc_ast1030_init(Object *obj)
object_initialize_child(obj, "spi[*]", &s->spi[i], typename);
}
- object_initialize_child(obj, "lpc", &s->lpc, TYPE_ASPEED_LPC);
-
- object_initialize_child(obj, "peci", &s->peci, TYPE_ASPEED_PECI);
-
object_initialize_child(obj, "sbc", &s->sbc, TYPE_ASPEED_AST10X0_SBC);
for (i = 0; i < sc->wdts_num; i++) {
@@ -185,6 +181,15 @@ static void aspeed_soc_ast1030_init(Object *obj)
TYPE_UNIMPLEMENTED_DEVICE);
}
+static void aspeed_soc_ast1030_init(Object *obj)
+{
+ AspeedSoCState *s = ASPEED_SOC(obj);
+
+ aspeed_soc_ast10x0_init(obj);
+ object_initialize_child(obj, "lpc", &s->lpc, TYPE_ASPEED_LPC);
+ object_initialize_child(obj, "peci", &s->peci, TYPE_ASPEED_PECI);
+}
+
static void aspeed_soc_ast1030_realize(DeviceState *dev_soc, Error **errp)
{
Aspeed10x0SoCState *a = ASPEED10X0_SOC(dev_soc);
--
2.43.0
next prev parent reply other threads:[~2025-11-06 8:50 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 8:49 [PATCH v1 00/12] hw/arm/aspeed: Add AST1060 SoC and EVB support Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-06 8:49 ` [PATCH v1 01/12] hw/arm/aspeed: Fix missing SPI IRQ connection causing DMA interrupt failure Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-07 7:57 ` Cédric Le Goater
2025-11-10 2:05 ` Jamin Lin
2025-11-10 10:17 ` Cédric Le Goater
2025-11-06 8:49 ` [PATCH v1 02/12] hw/block/m25p80: Add SFDP table for Winbond W25Q02JVM flash Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-10 14:04 ` Cédric Le Goater
2025-11-06 8:49 ` [PATCH v1 03/12] hw/misc/aspeed_scu: Fix the revision ID cannot be set in the SOC layer for AST2600 and AST1030 Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-10 14:04 ` Cédric Le Goater
2025-11-06 8:49 ` [PATCH v1 04/12] hhw/misc/aspeed_scu: Add AST1060 A2 silicon revision definition Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-10 14:04 ` Cédric Le Goater
2025-11-06 8:49 ` Jamin Lin via [this message]
2025-11-06 8:49 ` [PATCH v1 05/12] hw/arm/aspeed_ast10x0: Add common init function for AST10x0 SoCs Jamin Lin via
2025-11-10 14:05 ` Cédric Le Goater
2025-11-06 8:49 ` [PATCH v1 06/12] hw/arm/aspeed_ast10x0: Add common realize " Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-11 18:18 ` Cédric Le Goater
2025-11-06 8:49 ` [PATCH v1 07/12] hw/arm/aspeed_ast10x0: Pass SoC name to common init for AST10x0 family reuse Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-11 18:19 ` Cédric Le Goater
2025-11-12 1:21 ` Jamin Lin
2025-11-06 8:49 ` [PATCH v1 08/12] hw/arm/aspeed_ast10x0: Add AST1060 SoC support Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-10 14:58 ` Philippe Mathieu-Daudé
2025-11-11 5:16 ` Jamin Lin
2025-11-06 8:49 ` [PATCH v1 09/12] hw/arm/aspeed_ast10x0_evb: Add AST1060 EVB machine support Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-11 18:20 ` Cédric Le Goater
2025-11-12 1:53 ` Jamin Lin
2025-11-06 8:49 ` [PATCH v1 10/12] tests/functional/arm/test_aspeed_ast1060: Add functional tests for Aspeed AST1060 SoC Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-11 18:21 ` Cédric Le Goater
2025-11-06 8:49 ` [PATCH v1 11/12] docs/system/arm/aspeed: Update Aspeed and 2700 family boards list Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-11 18:22 ` Cédric Le Goater
2025-11-12 1:55 ` Jamin Lin
2025-11-06 8:49 ` [PATCH v1 12/12] docs/system/arm/aspeed: Update Aspeed MiniBMC section to include AST1060 PFR processor Jamin Lin via
2025-11-06 8:49 ` Jamin Lin via
2025-11-11 18:24 ` Cédric Le Goater
2025-11-12 2:09 ` Jamin Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251106084925.1253704-6-jamin_lin@aspeedtech.com \
--to=qemu-arm@nongnu.org \
--cc=alistair@alistair23.me \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--cc=hreitz@redhat.com \
--cc=jamin_lin@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=kane_chen@aspeedtech.com \
--cc=kwolf@redhat.com \
--cc=leetroy@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=steven_lee@aspeedtech.com \
--cc=troy_lee@aspeedtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.