diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2018-04-12 19:39:31 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-04-23 00:06:44 -0500 |
commit | 4e0e0c1020bb24aaf476c404252275d27e4a35d4 (patch) | |
tree | 704769e18e9f5a8d1becd29ef913bba48c69ec50 /hdata/memory.c | |
parent | c4a094a7df80463408d7a9144377584245364fc5 (diff) | |
download | skiboot-4e0e0c1020bb24aaf476c404252275d27e4a35d4.zip skiboot-4e0e0c1020bb24aaf476c404252275d27e4a35d4.tar.gz skiboot-4e0e0c1020bb24aaf476c404252275d27e4a35d4.tar.bz2 |
hdata: Add DIMM actual speed to device tree
Recent HDAT provides DIMM actuall speed. Lets add this to device tree.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
[stewart: use Hz rather than Mhz, consistent with other properties]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hdata/memory.c')
-rw-r--r-- | hdata/memory.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hdata/memory.c b/hdata/memory.c index f94446f..ecce881 100644 --- a/hdata/memory.c +++ b/hdata/memory.c @@ -1,4 +1,4 @@ -/* Copyright 2013-2014 IBM Corp. +/* Copyright 2013-2018 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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 { @@ -286,6 +288,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", + be32_to_cpu(ram_id->speed)*1000000); + } + vpd_blob = HDIF_get_idata(ramarea, 1, &ram_sz); /* DIMM size */ |