diff options
author | mtk11195 <huayang.duan@mediatek.com> | 2019-01-23 11:41:19 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-06-21 09:57:28 +0000 |
commit | 16ad2d70caec5c0ec806b95c80128fd3213246d7 (patch) | |
tree | 4828760775ab2da84b7df110c01a1eb3b5def9cb /src/soc/mediatek/mt8183/emi.c | |
parent | 3d5bb2a5df7c16d0faa5e6e84b42f3220ccf8405 (diff) | |
download | coreboot-16ad2d70caec5c0ec806b95c80128fd3213246d7.tar.xz |
mediatek/mt8183: enable DDR low power feature
BUG=b:80501386
BRANCH=none
TEST=Boots correctly and stress test pass on Kukui.
Change-Id: Ic48580e7e5db25dc1c29dabf41c4e3816fb946d3
Signed-off-by: Huayang Duan <huayang.duan@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32010
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Huayang Duan <huayang.duan@mediatek.corp-partner.google.com>
Diffstat (limited to 'src/soc/mediatek/mt8183/emi.c')
-rw-r--r-- | src/soc/mediatek/mt8183/emi.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/soc/mediatek/mt8183/emi.c b/src/soc/mediatek/mt8183/emi.c index 757a453de9..937d06de37 100644 --- a/src/soc/mediatek/mt8183/emi.c +++ b/src/soc/mediatek/mt8183/emi.c @@ -292,11 +292,21 @@ static void init_dram(const struct sdram_params *params) emi_init2(params); } +void enable_emi_dcm(void) +{ + clrbits_le32(&emi_regs->conm, 0xff << 24); + clrbits_le32(&emi_regs->conn, 0xff << 24); + + for (size_t chn = 0; chn < CHANNEL_MAX; chn++) + clrbits_le32(&ch[chn].emi.chn_conb, 0xff << 24); +} + static void do_calib(const struct sdram_params *params) { - dramc_apply_pre_calibration_config(); + dramc_apply_config_before_calibration(); dramc_calibrate_all_channels(params); dramc_ac_timing_optimize(); + dramc_apply_config_after_calibration(); dramc_runtime_config(); } |