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>
This commit is contained in:
Patrick Rudolph 2018-07-12 13:05:01 +02:00 committed by Patrick Rudolph
parent 06528d97a9
commit 2531865f13
1 changed files with 1 additions and 1 deletions

View File

@ -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");