[PATCH v1 15/16] hw/arm/aspeed: Promote connect_serial_hds_to_uarts() to public machine API

Jamin Lin via posted 16 patches 1 week ago
There is a newer version of this series
[PATCH v1 15/16] hw/arm/aspeed: Promote connect_serial_hds_to_uarts() to public machine API
Posted by Jamin Lin via 1 week ago
This commit promotes connect_serial_hds_to_uarts() to a public Aspeed
machine API, allowing board-specific implementations to use it for
connecting serial host devices to the SoC UARTs.

Previously, this function was declared static within aspeed.c and used
only internally. Making this function a public API standardizes that
process and avoids code duplication.

No functional changes.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 include/hw/arm/aspeed.h | 1 +
 hw/arm/aspeed.c         | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h
index 66ea8c98d1..9e14e0e38f 100644
--- a/include/hw/arm/aspeed.h
+++ b/include/hw/arm/aspeed.h
@@ -63,5 +63,6 @@ void aspeed_machine_class_init_cpus_defaults(MachineClass *mc);
 void create_pca9552(AspeedSoCState *soc, int bus_id, int addr);
 I2CSlave *create_pca9554(AspeedSoCState *soc, int bus_id, int addr);
 void aspeed_machine_ast2600_class_emmc_init(ObjectClass *oc);
+void connect_serial_hds_to_uarts(AspeedMachineState *bmc);
 
 #endif
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index fc37f48802..c5e8a0608d 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -117,7 +117,7 @@ static void sdhci_attach_drive(SDHCIState *sdhci, DriveInfo *dinfo, bool emmc,
                                &error_fatal);
 }
 
-static void connect_serial_hds_to_uarts(AspeedMachineState *bmc)
+void connect_serial_hds_to_uarts(AspeedMachineState *bmc)
 {
     AspeedMachineClass *amc = ASPEED_MACHINE_GET_CLASS(bmc);
     AspeedSoCState *s = bmc->soc;
-- 
2.43.0