summaryrefslogtreecommitdiff
path: root/src/cpu/samsung/exynos5250
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2013-08-06 10:48:48 +0800
committerPatrick Georgi <patrick@georgi-clan.de>2013-12-21 22:45:11 +0100
commitc0491d4fb55eaa7a18cb46dfab886eeb195b9323 (patch)
tree5f88d30d51bba5ec680c054612fe7ac2f3f89ac3 /src/cpu/samsung/exynos5250
parentc0d5eb2a332a7db1311517032e6f9ce1d5b91551 (diff)
armv7/exynos: Fix and remove memory reset workarounds
The memory corruption problem in Exynos suspend/resume process is caused by two things together: PHY_RESET and MRS command. After stop sending MRS on resume, we can now remove the workaround of skipping PHY_RESET. Change-Id: I64acc27c1d2bb549ae6ad7d32ecda94b0355972c Reviewed-on: https://gerrit.chromium.org/gerrit/64736 Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: David Hendricks <dhendrix@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Reviewed-on: http://review.coreboot.org/4433 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/cpu/samsung/exynos5250')
-rw-r--r--src/cpu/samsung/exynos5250/dmc_init_ddr3.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cpu/samsung/exynos5250/dmc_init_ddr3.c b/src/cpu/samsung/exynos5250/dmc_init_ddr3.c
index e3d46ab2d5..f2c228d339 100644
--- a/src/cpu/samsung/exynos5250/dmc_init_ddr3.c
+++ b/src/cpu/samsung/exynos5250/dmc_init_ddr3.c
@@ -158,8 +158,14 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, unsigned long mem_iv_size,
/* Send PALL command */
dmc_config_prech(mem, dmc);
- /* Send NOP, MRS and ZQINIT commands */
- dmc_config_mrs(mem, dmc);
+ if (mem_reset) {
+ /* Send NOP, MRS and ZQINIT commands.
+ * Sending MRS command will reset the DRAM. We should not be
+ * reseting the DRAM after resume, this will lead to memory
+ * corruption as DRAM content is lost after DRAM reset
+ */
+ dmc_config_mrs(mem, dmc);
+ }
if (mem->gate_leveling_enable) {
val = PHY_CON0_RESET_VAL;