[Skiboot] [PATCH 2/3] witherspoon: Add nvlink peers in finalise_dt()

Oliver O'Halloran oohall at gmail.com
Thu Jul 11 17:41:43 AEST 2019


This information is consumed by Linux so it needs to be in the DT. Move
it to finalise_dt().

Cc: A Russian <aik at ozlabs.ru>
Fixes: 9fc0c1287ada ("Move FSP specific op-panel calls to platform.exit()")
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 platforms/astbmc/witherspoon.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c
index dd53b4f72247..7dab0206d85f 100644
--- a/platforms/astbmc/witherspoon.c
+++ b/platforms/astbmc/witherspoon.c
@@ -475,10 +475,13 @@ static void npu2_phb_nvlink_dt(struct phb *npuphb)
 	}
 }
 
-static void witherspoon_exit(void)
+static void witherspoon_finalise_dt(bool is_reboot)
 {
 	struct dt_node *np;
 
+	if (is_reboot)
+		return;
+
 	dt_for_each_compatible(dt_root, np, "ibm,power9-npu-pciex") {
 		u32 opal_id = dt_prop_get_cell(np, "ibm,opal-phbid", 1);
 		struct phb *npphb = pci_get_phb(opal_id);
@@ -489,8 +492,6 @@ static void witherspoon_exit(void)
 			continue;
 		npu2_phb_nvlink_dt(npphb);
 	}
-
-	astbmc_exit();
 }
 
 /* The only difference between these is the PCI slot handling */
@@ -506,7 +507,8 @@ DECLARE_PLATFORM(witherspoon) = {
 	.cec_power_down         = astbmc_ipmi_power_down,
 	.cec_reboot             = astbmc_ipmi_reboot,
 	.elog_commit		= ipmi_elog_commit,
-	.exit			= witherspoon_exit,
+	.finalise_dt		= witherspoon_finalise_dt,
+	.exit			= astbmc_exit,
 	.terminate		= ipmi_terminate,
 
 	.pci_get_slot_info	= dt_slot_get_slot_info,
-- 
2.21.0



More information about the Skiboot mailing list