Blame SOURCES/0002-devtree-Add-DIMM-running-speed.patch

66f3ee
From 8d03e1e101c92a8c30103e4fcf3b930d37202e86 Mon Sep 17 00:00:00 2001
66f3ee
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
66f3ee
Date: Mon, 23 Apr 2018 23:37:33 +0530
66f3ee
Subject: [PATCH] devtree: Add DIMM running speed
66f3ee
66f3ee
We parse 'spd' data to get max speed. But actual running speed may be
66f3ee
lesser than max speed. On recent Power System we have 'frequency'
66f3ee
property inside memory node in device tree. Lets add support in lshw
66f3ee
to display this information.
66f3ee
66f3ee
Sample output:
66f3ee
    *-bank:1
66f3ee
       description: RDIMM DDR4 2666 MHz (0.4ns)
66f3ee
       product: HMAA8GR7A2R4N-VN
66f3ee
       physical id: 0
66f3ee
       ....
66f3ee
       ....
66f3ee
       clock: 2666MHz (0.4ns)
66f3ee
66f3ee
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
66f3ee
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
66f3ee
---
66f3ee
 src/core/device-tree.cc | 4 ++++
66f3ee
 1 file changed, 4 insertions(+)
66f3ee
66f3ee
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
66f3ee
index dea4140b3a96..c53558d08f3d 100644
66f3ee
--- a/src/core/device-tree.cc
66f3ee
+++ b/src/core/device-tree.cc
66f3ee
@@ -1038,6 +1038,10 @@ static void add_memory_bank(string name, string path, hwNode & core)
66f3ee
     if (exists("spd"))
66f3ee
       add_memory_bank_spd(path + "/" + name + "/spd", bank);
66f3ee
 
66f3ee
+    // Parse Memory SPD data
66f3ee
+    if (exists("frequency"))
66f3ee
+      bank.setClock(get_u32("frequency"));
66f3ee
+
66f3ee
     memory->addChild(bank);
66f3ee
   } else if(name.substr(0, 4) == "dimm") {
66f3ee
     hwNode bank("bank", hw::memory);
66f3ee
-- 
66f3ee
2.17.1
66f3ee