From ba49444c336b8207bc055a73ee860d056aef46d4 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Thu, 15 Apr 2021 10:06:27 +0800 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/52361 Reviewed-by: Hung-Te Lin Tested-by: build bot (Jenkins) --- src/soc/mediatek/common/memory.c | 22 +++++++--------------- 1 file 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));