summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/sandybridge/raminit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index e8ad4169cc..7087035d9b 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -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);