Blob Blame History Raw
From 06229e401aa0cd2c525f9af616b9bb95c2dd7abf Mon Sep 17 00:00:00 2001
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date: Tue, 22 Aug 2017 22:08:43 +0530
Subject: [PATCH 3/5] devtree: Parse spd data

In some Power system (like P9 system), spd data is available under
ms-dimm node in device tree. Hence call add_memory_bank_spd() from
ms-dimm section as well.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 src/core/device-tree.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
index 2981130..6bcc52d 100644
--- a/src/core/device-tree.cc
+++ b/src/core/device-tree.cc
@@ -1086,6 +1086,10 @@ static void add_memory_bank(string name, string path, hwNode & core)
     if (size > 0)
       bank.setSize(size);
 
+    // Parse Memory SPD data
+    if (exists("spd"))
+      add_memory_bank_spd(path + "/" + name + "/spd", bank);
+
     memory->addChild(bank);
   } else if(name.substr(0, 4) == "dimm") {
     hwNode bank("bank", hw::memory);
-- 
1.8.3.1