[Skiboot] [PATCH v4 5/9] hwprobe: convert vas_init(), nx_init()

Nicholas Piggin npiggin at gmail.com
Fri Dec 17 13:36:43 AEDT 2021


From: Stewart Smith <stewart at flamingspork.com>

Reviewed-by: Dan Horák <dan at danny.cz>
[npiggin: remove imc_init because it moved later in boot (fbcbd4e47c)]
Signed-off-by: Stewart Smith <stewart at flamingspork.com>
---
 core/init.c | 6 ------
 hw/nx.c     | 2 ++
 hw/vas.c    | 2 ++
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/core/init.c b/core/init.c
index c3e0c494d..6a1c3f034 100644
--- a/core/init.c
+++ b/core/init.c
@@ -1355,12 +1355,6 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
 	/* Catalog decompression routine */
 	imc_decompress_catalog();
 
-	/* Virtual Accelerator Switchboard */
-	vas_init();
-
-	/* NX init */
-	nx_init();
-
 	/* Probe all HWPROBE hardware we have code linked for */
 	probe_hardware();
 
diff --git a/hw/nx.c b/hw/nx.c
index fdadf53c7..b1cab5774 100644
--- a/hw/nx.c
+++ b/hw/nx.c
@@ -136,3 +136,5 @@ void nx_init(void)
 	if (proc_gen >= proc_gen_p9)
 		darn_init();
 }
+
+DEFINE_HWPROBE_DEPS(nx, nx_init, "vas");
diff --git a/hw/vas.c b/hw/vas.c
index 0dbe0bcda..96ca055cc 100644
--- a/hw/vas.c
+++ b/hw/vas.c
@@ -637,3 +637,5 @@ out:
 	vas_err("Disabled (failed initialization)\n");
 	return;
 }
+
+DEFINE_HWPROBE(vas, vas_init);
-- 
2.23.0



More information about the Skiboot mailing list