Blame SOURCES/0010-devtree-Add-chip-id-from-the-dimm-module.patch

33b0a4
From 4c19563dae05d3a730bb67917f1810eb33a54613 Mon Sep 17 00:00:00 2001
33b0a4
From: Shivaprasad G Bhat <sbhat@linux.ibm.com>
33b0a4
Date: Fri, 6 Mar 2020 04:41:33 -0600
33b0a4
Subject: [PATCH 10/17] devtree: Add chip-id from the dimm module
33b0a4
33b0a4
Add chip-id from dimm module into the configuration if available. DIMM's are
33b0a4
behind the CHIP on Power systems. By adding chip-id it helps to map what dimm
33b0a4
is sitting behind which chip.
33b0a4
33b0a4
Sample output:
33b0a4
     *-bank:0
33b0a4
          description: 16GB CDIMM
33b0a4
          product: 41T9571 FRU# 41T9571
33b0a4
          physical id: 0
33b0a4
          .....
33b0a4
          configuration: chip-id=0
33b0a4
33b0a4
33b0a4
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
33b0a4
---
33b0a4
 src/core/device-tree.cc | 2 ++
33b0a4
 1 file changed, 2 insertions(+)
33b0a4
33b0a4
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
33b0a4
index 490e1976e619..f43d34f072b6 100644
33b0a4
--- a/src/core/device-tree.cc
33b0a4
+++ b/src/core/device-tree.cc
33b0a4
@@ -1031,6 +1031,8 @@ static void add_memory_bank(string name, string path, hwNode & core)
33b0a4
     if(exists("description"))
33b0a4
       description = hw::strip(get_string("description"));
33b0a4
     bank.setDescription(description);
33b0a4
+    if (exists("ibm,chip-id"))
33b0a4
+      bank.setConfig("chip-id", get_u32("ibm,chip-id"));
33b0a4
 
33b0a4
     if(exists("ibm,loc-code"))
33b0a4
       bank.setSlot(hw::strip(get_string("ibm,loc-code")));
33b0a4
-- 
33b0a4
2.17.1
33b0a4