UPSTREAM: nb/intel/sandybridge/raminit: Reset internal state on fallback attempts
Some methods like discover_402x assume an clear state. Should fix fallback attempt raminit failures. BUG=None BRANCH=None TEST=None Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/17471 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Change-Id: I7a6fe044c17f5e0dbfa0e9b9d2aed0c3b6ae3972 Reviewed-on: https://chromium-review.googlesource.com/415086 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
916f5b5a36
commit
f96f8281b8
1 changed files with 7 additions and 2 deletions
|
|
@ -4225,8 +4225,6 @@ static void init_dram_ddr3(int mobile, int min_tck, int s3resume)
|
|||
halt();
|
||||
}
|
||||
|
||||
memset(&ctrl, 0, sizeof(ctrl));
|
||||
|
||||
early_pch_init_native();
|
||||
early_thermal_init();
|
||||
|
||||
|
|
@ -4275,6 +4273,8 @@ static void init_dram_ddr3(int mobile, int min_tck, int s3resume)
|
|||
}
|
||||
}
|
||||
if (!fast_boot) {
|
||||
/* Reset internal state */
|
||||
memset(&ctrl, 0, sizeof(ctrl));
|
||||
ctrl.mobile = mobile;
|
||||
ctrl.tCK = min_tck;
|
||||
|
||||
|
|
@ -4291,6 +4291,11 @@ static void init_dram_ddr3(int mobile, int min_tck, int s3resume)
|
|||
printk(BIOS_ERR, "RAM training failed, trying fallback.\n");
|
||||
printram("Disable failing channel.\n");
|
||||
|
||||
/* Reset internal state */
|
||||
memset(&ctrl, 0, sizeof(ctrl));
|
||||
ctrl.mobile = mobile;
|
||||
ctrl.tCK = min_tck;
|
||||
|
||||
/* Reset DDR3 frequency */
|
||||
dram_find_spds_ddr3(spds, &ctrl);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue