summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXi Chen <xixi.chen@mediatek.corp-partner.google.com>2023-06-14 13:34:25 +0800
committerYu-Ping Wu <yupingso@google.com>2023-06-26 02:23:21 +0000
commit35fb55ac3dd3fb6d8ac956d1ab3560af6e092626 (patch)
treee80a3fccddf81e4a5a0d3d33e743cf4529548cc5 /src
parent9906ffe52903dc1430b3dbbc38d1aab332a48af4 (diff)
soc/mediatek: Enable DRAM scramble on fast calibration flow
No matter what DRAM calibration is performed, DRAM scramble should be enabled as long as MEDIATEK_DRAM_SCRAMBLE is set to y. Currently, DRAM scramble is enabled only if full calibration is performed. Correct the behavior by adding DRAMC_CONFIG_SCRAMBLE to the header config in fast calibration flow. BUG=b:285474337 TEST=Check the scramble feature is disabled on serial build Signed-off-by: Xi Chen <xixi.chen@mediatek.corp-partner.google.com> Change-Id: I907bccd4e68e040179e1971db6bf7a57b88dec1b Reviewed-on: https://review.coreboot.org/c/coreboot/+/75818 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/mediatek/common/memory.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/soc/mediatek/common/memory.c b/src/soc/mediatek/common/memory.c
index b6f7dde02b..1a627ddd35 100644
--- a/src/soc/mediatek/common/memory.c
+++ b/src/soc/mediatek/common/memory.c
@@ -202,6 +202,8 @@ static int dram_run_fast_calibration(struct dramc_param *dparam)
printk(BIOS_INFO, "DRAM-K: DRAM calibration data valid pass\n");
+ if (CONFIG(MEDIATEK_DRAM_SCRAMBLE))
+ dparam->header.config |= DRAMC_CONFIG_SCRAMBLE;
if (CONFIG(MEDIATEK_DRAM_BLOB_FAST_INIT)) {
printk(BIOS_INFO, "DRAM-K: Run fast calibration run in blob mode\n");