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>,
"open list:All patches CC here" <qemu-devel@nongnu.org>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>
Cc: <jamin_lin@aspeedtech.com>, <troy_lee@aspeedtech.com>,
<kane_chen@aspeedtech.com>
Subject: [PATCH v4 23/30] hw/arm/aspeed: Make aspeed_machine_ast2600_class_emmc_init() a common API for eMMC boot setup
Date: Tue, 4 Nov 2025 11:13:01 +0800 [thread overview]
Message-ID: <20251104031325.146374-24-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20251104031325.146374-1-jamin_lin@aspeedtech.com>
This commit exposes the function aspeed_machine_ast2600_class_emmc_init() as
a common API so that other AST2600-based machine implementations can reuse it
to enable the "boot-emmc" property.
Previously, this function was defined as a static helper within aspeed.c,
limiting its visibility to that file. By making it global and declaring it in
aspeed.h, other machine definition files (e.g., for specific AST2600 boards)
can now easily call this API to register eMMC boot configuration support.
No functional changes.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
include/hw/arm/aspeed.h | 10 ++++++++++
hw/arm/aspeed.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h
index 84620f49ed..87dcadab26 100644
--- a/include/hw/arm/aspeed.h
+++ b/include/hw/arm/aspeed.h
@@ -101,4 +101,14 @@ void aspeed_create_pca9552(AspeedSoCState *soc, int bus_id, int addr);
*/
I2CSlave *aspeed_create_pca9554(AspeedSoCState *soc, int bus_id, int addr);
+/*
+ * aspeed_machine_ast2600_class_emmc_init:
+ * @oc: the #ObjectClass to initialize.
+ *
+ * Initialize eMMC-related properties for the AST2600 Aspeed machine class.
+ * This function is typically invoked during class initialization to set up
+ * default configuration or attach eMMC-specific devices for AST2600 platforms.
+ */
+void aspeed_machine_ast2600_class_emmc_init(ObjectClass *oc);
+
#endif
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 89a4632425..2f385290a4 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -755,7 +755,7 @@ static void aspeed_machine_ast2600_set_boot_from_emmc(Object *obj, bool value,
}
}
-static void aspeed_machine_ast2600_class_emmc_init(ObjectClass *oc)
+void aspeed_machine_ast2600_class_emmc_init(ObjectClass *oc)
{
object_class_property_add_bool(oc, "boot-emmc",
aspeed_machine_ast2600_get_boot_from_emmc,
--
2.43.0
next prev parent reply other threads:[~2025-11-04 3:17 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 3:12 [PATCH v4 00/30] Split AST2400, AST2500, AST2600, AST2700 and AST1030 SoC machines into separate source files for maintainability Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 01/30] hw/arm/aspeed: Move AspeedMachineState definition to common header for reuse Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 02/30] hw/arm/aspeed: Make aspeed_machine_class_init_cpus_defaults() globally accessible Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 03/30] hw/arm/aspeed: Export and rename create_pca9552() for reuse Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 04/30] hw/arm/aspeed: Rename and export create_pca9554() as aspeed_create_pca9554() Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 05/30] hw/arm/aspeed: Split FP5280G2 machine into a separate source file for maintenance Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 06/30] hw/arm/aspeed: Split G220A machine into a separate source file for better maintenance Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 07/30] hw/arm/aspeed: Split Tiogapass machine into a separate source file for cleanup Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 08/30] hw/arm/aspeed: Split YosemiteV2 machine into a separate source file for maintainability Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 09/30] hw/arm/aspeed: Split Witherspoon " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 10/30] hw/arm/aspeed: Split Sonorapass " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 11/30] hw/arm/aspeed: Split Romulus " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 12/30] hw/arm/aspeed: Split Supermicro X11SPI machine into a separate " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 13/30] hw/arm/aspeed: Split AST2500 EVB machine into a separate source " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 14/30] hw/arm/aspeed: Split Quanta-Q71L " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 15/30] hw/arm/aspeed: Split Supermicro X11 " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 16/30] hw/arm/aspeed: Split Palmetto " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 17/30] hw/arm/aspeed: Move ASPEED_RAM_SIZE() macro to common header for reuse Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 18/30] hw/arm/aspeed: Split Bletchley machine into a separate source file for maintainability Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 19/30] hw/arm/aspeed: Split FBY35 BMC " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 20/30] hw/arm/aspeed: Split Fuji " Jamin Lin via
2025-11-04 3:12 ` [PATCH v4 21/30] hw/arm/aspeed: Split QCOM Firework " Jamin Lin via
2025-11-04 3:13 ` [PATCH v4 22/30] hw/arm/aspeed: Split QCOM DC-SCM V1 " Jamin Lin via
2025-11-04 3:13 ` Jamin Lin via [this message]
2025-11-04 3:13 ` [PATCH v4 24/30] hw/arm/aspeed: Split GB200NVL " Jamin Lin via
2025-11-04 3:13 ` [PATCH v4 25/30] hw/arm/aspeed: Split Rainier " Jamin Lin via
2025-11-04 3:13 ` [PATCH v4 26/30] hw/arm/aspeed: Split Catalina " Jamin Lin via
2025-11-04 3:13 ` [PATCH v4 27/30] hw/arm/aspeed: Split AST2600 EVB " Jamin Lin via
2025-11-04 3:13 ` [PATCH v4 28/30] hw/arm/aspeed: Split AST2700 " Jamin Lin via
2025-11-04 3:13 ` [PATCH v4 29/30] hw/arm/aspeed: Rename and export connect_serial_hds_to_uarts() as aspeed_connect_serial_hds_to_uarts() Jamin Lin via
2025-11-04 3:13 ` [PATCH v4 30/30] hw/arm/aspeed: Split AST1030 EVB machine into a separate source file for maintainability Jamin Lin via
2025-11-04 6:52 ` [SPAM] [PATCH v4 00/30] Split AST2400, AST2500, AST2600, AST2700 and AST1030 SoC machines into separate source files " Cédric Le Goater
2025-11-04 8:14 ` Cédric Le Goater
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=20251104031325.146374-24-jamin_lin@aspeedtech.com \
--to=qemu-devel@nongnu.org \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--cc=jamin_lin@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=kane_chen@aspeedtech.com \
--cc=leetroy@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).