summaryrefslogtreecommitdiff
path: root/src/vendorcode/cavium
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2018-07-12 13:05:01 +0200
committerPatrick Rudolph <siro@das-labor.org>2018-07-17 08:04:46 +0000
commit2531865f137fed1254c7d6702904b37a537884a4 (patch)
treeb274d197bbaa511d2f68d97d383f6da2b8df63a3 /src/vendorcode/cavium
parent06528d97a92c2131c402ae11617658d2b8675d4c (diff)
cavium/bdk: Read DDR freq from memory controller
The BDK config subsystem can't store values in romstage. Read frequency from DDR memory controller instead from BDK config. Fixes memory info showing always 0 MT/s. Change-Id: Iaee33e57e27ca182f41be923cf950868f66d3638 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/27451 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/vendorcode/cavium')
-rw-r--r--src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-config.c b/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-config.c
index 5c104231dc..2ec7a1aaac 100644
--- a/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-config.c
+++ b/src/vendorcode/cavium/bdk/libbdk-dram/bdk-dram-config.c
@@ -106,7 +106,7 @@ const char* bdk_dram_get_info_string(int node)
snprintf(info_string, INFO_STRING_LEN,
" %ld MB, %ld MT/s, %s %s",
bdk_dram_get_size_mbytes(node),
- bdk_config_get_int(BDK_CONFIG_DDR_SPEED, node),
+ libdram_get_freq_from_pll(node, 0) / 1000000,
(__bdk_dram_is_ddr4(node, 0)) ? "DDR4" : "DDR3",
(__bdk_dram_is_rdimm(node, 0)) ? "RDIMM" : "UDIMM");