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

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