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