diff mbox series

[12/61] external/opal-prd: Fix occ, homer node label search

Message ID 20210719132012.150948-13-hegdevasant@linux.vnet.ibm.com
State Superseded
Headers show
Series P10 Enablement | expand

Commit Message

Vasant Hegde July 19, 2021, 1:19 p.m. UTC
Starting P10, hostboot/HDAT will provide consistent reserved node name. It will
just provide node name without starting string "ibm,". That will cause
`pm-complex <*>` operation to fails.

This patch fixes above issue. For backward compatability purpose I have
kept support for old variant of node name as well.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 external/opal-prd/opal-prd.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index 12269e8eb..1c610da4c 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -1508,17 +1508,23 @@  static int pm_complex_load_start(void)
 
 	range = find_range("ibm,occ-common-area", 0);
 	if (!range) {
-		pr_log(LOG_ERR, "PM: ibm,occ-common-area not found");
-		return rc;
+		range = find_range("occ-common-area", 0);
+		if (!range) {
+			pr_log(LOG_ERR, "PM: occ-common-area not found");
+			return rc;
+		}
 	}
 	occ_common = range->physaddr;
 
 	for (i = 0; i < nr_chips; i++) {
 		range = find_range("ibm,homer-image", chips[i]);
 		if (!range) {
-			pr_log(LOG_ERR, "PM: ibm,homer-image not found 0x%lx",
-			       chips[i]);
-			return -1;
+			range = find_range("homer-image", chips[i]);
+			if (!range) {
+				pr_log(LOG_ERR, "PM: homer-image not found 0x%lx",
+				       chips[i]);
+				return -1;
+			}
 		}
 		homer = range->physaddr;