diff options
author | Yu-Ping Wu <yupingso@chromium.org> | 2021-04-15 10:06:27 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-04-16 06:42:25 +0000 |
commit | ba49444c336b8207bc055a73ee860d056aef46d4 (patch) | |
tree | 51360f907c35409d20f536e5b704af65679839fc | |
parent | 46ca25d8c9099d3ef32f8cb76ba2d45be60fc24e (diff) |
soc/mediatek: Remove misleading memory logs
When MRC cache region type is not found (for example, in recovery mode
with !HAS_RECOVERY_MRC_CACHE), mrc_cache_stash_data() will return 0.
Therefore, the platform code is not able to tell from the return value
if the MRC cache data is actually written to flash or not. Since the MRC
driver is already pretty verbose, ignore the return value and remove the
misleading memory logs.
BUG=none
TEST=emerge-asurada coreboot
BRANCH=asurada
Change-Id: I6b411664ca91b9be2d4518a09e9734d26db02d6e
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52361
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/soc/mediatek/common/memory.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/soc/mediatek/common/memory.c b/src/soc/mediatek/common/memory.c index e1641d82f9..93856d51e6 100644 --- a/src/soc/mediatek/common/memory.c +++ b/src/soc/mediatek/common/memory.c @@ -195,11 +195,10 @@ static void mt_mem_init_run(struct dramc_param *dparam, /* Erase flash data after fast calibration failed */ memset(&dparam->dramc_datas, 0xa5, mrc_cache_size); - if (mrc_cache_stash_data(MRC_TRAINING_DATA, - DRAMC_PARAM_HEADER_VERSION, - &dparam->dramc_datas, mrc_cache_size)) - printk(BIOS_ERR, "DRAM-K: Failed to erase " - "calibration data\n"); + mrc_cache_stash_data(MRC_TRAINING_DATA, + DRAMC_PARAM_HEADER_VERSION, + &dparam->dramc_datas, + mrc_cache_size); } else { printk(BIOS_INFO, "DRAM-K: Fast calibration passed in %ld msecs\n", stopwatch_duration_msecs(&sw)); @@ -219,16 +218,9 @@ static void mt_mem_init_run(struct dramc_param *dparam, if (err == 0) { printk(BIOS_INFO, "DRAM-K: Full calibration passed in %ld msecs\n", stopwatch_duration_msecs(&sw)); - - if (mrc_cache_stash_data(MRC_TRAINING_DATA, - DRAMC_PARAM_HEADER_VERSION, - &dparam->dramc_datas, mrc_cache_size) == 0) - printk(BIOS_DEBUG, "DRAM-K: Calibration params saved " - "to flash: version=%#x, size=%#zx\n", - DRAMC_PARAM_HEADER_VERSION, sizeof(*dparam)); - else - printk(BIOS_ERR, "DRAM-K: Failed to save calibration " - "data to flash\n"); + mrc_cache_stash_data(MRC_TRAINING_DATA, + DRAMC_PARAM_HEADER_VERSION, + &dparam->dramc_datas, mrc_cache_size); } else { printk(BIOS_ERR, "DRAM-K: Full calibration failed in %ld msecs\n", stopwatch_duration_msecs(&sw)); |