[Skiboot] [PATCH] device-tree: Only advertise ibm, opal-v3 (not v2) on POWER9 and above

Stewart Smith stewart at linux.vnet.ibm.com
Tue Jul 19 17:24:36 AEST 2016


Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 core/opal.c                     | 9 +++++++--
 doc/device-tree/ibm,opal.txt    | 1 +
 doc/opal-api/power9-changes.txt | 6 +++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/core/opal.c b/core/opal.c
index f48e6adcff25..af594640646a 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -159,8 +159,13 @@ void add_opal_node(void)
 
 	dt_add_property_cells(opal_node, "#address-cells", 0);
 	dt_add_property_cells(opal_node, "#size-cells", 0);
-	dt_add_property_strings(opal_node, "compatible", "ibm,opal-v2",
-				"ibm,opal-v3");
+
+	if (proc_gen < proc_gen_p9)
+		dt_add_property_strings(opal_node, "compatible", "ibm,opal-v2",
+					"ibm,opal-v3");
+	else
+		dt_add_property_strings(opal_node, "compatible", "ibm,opal-v3");
+
 	dt_add_property_cells(opal_node, "opal-msg-async-num", OPAL_MAX_ASYNC_COMP);
 	dt_add_property_cells(opal_node, "opal-msg-size", sizeof(struct opal_msg));
 	dt_add_property_u64(opal_node, "opal-base-address", base);
diff --git a/doc/device-tree/ibm,opal.txt b/doc/device-tree/ibm,opal.txt
index d4dcfb8404cf..3b90b5ba27bc 100644
--- a/doc/device-tree/ibm,opal.txt
+++ b/doc/device-tree/ibm,opal.txt
@@ -5,6 +5,7 @@
 
 ; v2 is maintained for possible compatibility with very, very old kernels
 ; it will go away at some point in the future. Detect and rely on ibm,opal-v3
+; ibm,opal-v2 is *NOT* present on POWER9 and above.
 
 		ibm,associativity-reference-points = <0x4 0x3>;
 		ibm,heartbeat-ms = <0x7d0>;
diff --git a/doc/opal-api/power9-changes.txt b/doc/opal-api/power9-changes.txt
index cf354d60ac63..4db74b00889a 100644
--- a/doc/opal-api/power9-changes.txt
+++ b/doc/opal-api/power9-changes.txt
@@ -15,11 +15,15 @@ OPAL_REINIT_CPUS
 Can now be extended beyond HILE BE/LE bits. If invalid flags are set on
 POWER9, OPAL_UNSUPPORTED will be returned.
 
+Device Tree
+-----------
+- /ibm,opal/ compatible property now just lists ibm,opal-v3 and no longer
+  ibm,opal-v2 (power9 and above only)
+
 
 TODO
 ----
 Things we still have to do for POWER9:
-- remove opal-v2 from compatible string.
 - PCI to use async API rather than returning delays
 - deprecate/remove v1 APIs where there's a V2
 - Fix this FWTS warning:
-- 
2.1.4



More information about the Skiboot mailing list