diff mbox series

[v3,04/14] ast2600: spl: Add HACE probing

Message ID 20210720063839.1518-5-chiawei_wang@aspeedtech.com
State New
Headers show
Series None | expand

Commit Message

ChiaWei Wang July 20, 2021, 6:38 a.m. UTC
From: Joel Stanley <joel@jms.id.au>


Probe HACE driver in SPL board init if enabled.

Signed-off-by: Joel Stanley <joel@jms.id.au>

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>

---
 arch/arm/mach-aspeed/ast2600/spl.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

-- 
2.17.1
diff mbox series

Patch

diff --git a/arch/arm/mach-aspeed/ast2600/spl.c b/arch/arm/mach-aspeed/ast2600/spl.c
index 0d8cb29678..a0fc420ff1 100644
--- a/arch/arm/mach-aspeed/ast2600/spl.c
+++ b/arch/arm/mach-aspeed/ast2600/spl.c
@@ -38,6 +38,20 @@  struct image_header *spl_get_load_buffer(ssize_t offset, size_t size)
 	return (struct image_header *)(CONFIG_SYS_TEXT_BASE);
 }
 
+#ifdef CONFIG_SPL_BOARD_INIT
+void spl_board_init(void)
+{
+	int rc;
+	struct udevice *dev;
+
+	rc = uclass_get_device_by_driver(UCLASS_MISC,
+					 DM_DRIVER_GET(aspeed_hace),
+					 &dev);
+	if (rc)
+		debug("HACE initialization failure, rc=%d\n", rc);
+}
+#endif
+
 #ifdef CONFIG_SPL_OS_BOOT
 int spl_start_uboot(void)
 {