[Skiboot] [PATCH] hdata: Add DIMM actual speed to device tree
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Fri Apr 13 00:09:31 AEST 2018
Recent HDAT provides DIMM actuall speed. Lets add this to device tree.
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
@Stewart,
Let me know if there is better name for this property.
-Vasant
hdata/memory.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hdata/memory.c b/hdata/memory.c
index a83898955..a636e8181 100644
--- a/hdata/memory.c
+++ b/hdata/memory.c
@@ -32,6 +32,8 @@ struct HDIF_ram_area_id {
#define RAM_AREA_INSTALLED 0x8000
#define RAM_AREA_FUNCTIONAL 0x4000
__be16 flags;
+ __be32 dimm_id;
+ __be32 speed;
} __packed;
struct HDIF_ram_area_size {
@@ -299,6 +301,11 @@ static void vpd_add_ram_area(const struct HDIF_common_hdr *msarea)
chip_id = add_chip_id_to_ram_area(msarea, ram_node);
add_bus_freq_to_ram_area(ram_node, chip_id);
+ if (ram_sz >= offsetof(struct HDIF_ram_area_id, speed)) {
+ dt_add_property_cells(ram_node, "frequency-mhz",
+ be32_to_cpu(ram_id->speed));
+ }
+
vpd_blob = HDIF_get_idata(ramarea, 1, &ram_sz);
/*
--
2.14.3
More information about the Skiboot
mailing list