[Skiboot] [PATCH 06/10] hwprobe: convert vas_init(), nx_init()

Nicholas Piggin npiggin at gmail.com
Sat Jun 26 12:38:20 AEST 2021


From: Stewart Smith <stewart at flamingspork.com>

[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 3d190e4ff..a3601d0c8 100644
--- a/core/init.c
+++ b/core/init.c
@@ -1316,12 +1316,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 122048087..f001d7a2f 100644
--- a/hw/nx.c
+++ b/hw/nx.c
@@ -121,3 +121,5 @@ void nx_init(void)
 	if (proc_gen == proc_gen_p9)
 		p9_darn_init();
 }
+
+DEFINE_HWPROBE_DEPS(nx, nx_init, "vas");
diff --git a/hw/vas.c b/hw/vas.c
index c70094b7d..8759fffb2 100644
--- a/hw/vas.c
+++ b/hw/vas.c
@@ -519,3 +519,5 @@ out:
 	vas_err("Disabled (failed initialization)\n");
 	return;
 }
+
+DEFINE_HWPROBE(vas, vas_init);
-- 
2.23.0



More information about the Skiboot mailing list