nb/intel/sandybridge: Use proper names to refer to training steps

Now that the purpose of each training algorithm is clear, replace the
last instances of the original names in comments and print statements
with the current, correct names. Also, print which channel has failed
command training, for completeness and consistency with other errors.

Change-Id: I9cc5c4b04499297825ca004c6bd1648a68449d2c
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48601
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Angel Pons 2020-12-12 12:28:29 +01:00 committed by Felix Held
parent 3aed6ac613
commit 30791639f8
1 changed files with 11 additions and 11 deletions

View File

@ -1231,7 +1231,7 @@ static int find_roundtrip_latency(ramctr_timing *ctrl, int channel, int slotrank
if (!some_works) { if (!some_works) {
/* Guard against roundtrip latency underflow */ /* Guard against roundtrip latency underflow */
if (ctrl->timings[channel][slotrank].roundtrip_latency < 2) { if (ctrl->timings[channel][slotrank].roundtrip_latency < 2) {
printk(BIOS_EMERG, "402x discovery failed (1): %d, %d\n", printk(BIOS_EMERG, "Roundtrip latency underflow: %d, %d\n",
channel, slotrank); channel, slotrank);
return MAKE_ERR; return MAKE_ERR;
} }
@ -1250,7 +1250,7 @@ static int find_roundtrip_latency(ramctr_timing *ctrl, int channel, int slotrank
/* Guard against I/O latency overflow */ /* Guard against I/O latency overflow */
if (ctrl->timings[channel][slotrank].io_latency >= 0x10) { if (ctrl->timings[channel][slotrank].io_latency >= 0x10) {
printk(BIOS_EMERG, "402x discovery failed (2): %d, %d\n", printk(BIOS_EMERG, "I/O latency overflow: %d, %d\n",
channel, slotrank); channel, slotrank);
return MAKE_ERR; return MAKE_ERR;
} }
@ -1499,7 +1499,7 @@ static int tx_dq_write_leveling(ramctr_timing *ctrl, int channel, int slotrank)
struct run rn = get_longest_zero_run(stats[lane], ARRAY_SIZE(stats[lane])); struct run rn = get_longest_zero_run(stats[lane], ARRAY_SIZE(stats[lane]));
if (rn.all || rn.length < 8) { if (rn.all || rn.length < 8) {
printk(BIOS_EMERG, "tx_dq discovery failed: %d, %d, %d\n", printk(BIOS_EMERG, "tx_dq write leveling failed: %d, %d, %d\n",
channel, slotrank, lane); channel, slotrank, lane);
/* /*
* With command training not being done yet, the lane can be erroneous. * With command training not being done yet, the lane can be erroneous.
@ -1634,7 +1634,7 @@ static int write_level_rank(ramctr_timing *ctrl, int channel, int slotrank)
ctrl->timings[channel][slotrank].lanes[lane].tx_dqs = rn.start; ctrl->timings[channel][slotrank].lanes[lane].tx_dqs = rn.start;
if (rn.all) { if (rn.all) {
printk(BIOS_EMERG, "tx_dqs discovery failed: %d, %d, %d\n", printk(BIOS_EMERG, "JEDEC write leveling failed: %d, %d, %d\n",
channel, slotrank, lane); channel, slotrank, lane);
return MAKE_ERR; return MAKE_ERR;
@ -2102,7 +2102,7 @@ int command_training(ramctr_timing *ctrl)
/* /*
* Dual DIMM per channel: * Dual DIMM per channel:
* Issue: * Issue:
* While c320c discovery seems to succeed raminit will fail in write training. * While command training seems to succeed, raminit will fail in write training.
* *
* Workaround: * Workaround:
* Skip 1T in dual DIMM mode, that's only supported by a few DIMMs. * Skip 1T in dual DIMM mode, that's only supported by a few DIMMs.
@ -2124,7 +2124,7 @@ int command_training(ramctr_timing *ctrl)
} }
if (err) { if (err) {
printk(BIOS_EMERG, "c320c discovery failed\n"); printk(BIOS_EMERG, "Command training failed: %d\n", channel);
return err; return err;
} }
@ -2176,7 +2176,7 @@ static int find_read_mpr_margin(ramctr_timing *ctrl, int channel, int slotrank,
edges[lane] = rn.middle; edges[lane] = rn.middle;
if (rn.all) { if (rn.all) {
printk(BIOS_EMERG, "edge discovery failed: %d, %d, %d\n", channel, printk(BIOS_EMERG, "Read MPR training failed: %d, %d, %d\n", channel,
slotrank, lane); slotrank, lane);
return MAKE_ERR; return MAKE_ERR;
} }
@ -2376,7 +2376,7 @@ static int find_agrsv_read_margin(ramctr_timing *ctrl, int channel, int slotrank
edges[lane] = (lower[lane] + upper[lane]) / 2; edges[lane] = (lower[lane] + upper[lane]) / 2;
if (rn.all || (lower[lane] > upper[lane])) { if (rn.all || (lower[lane] > upper[lane])) {
printk(BIOS_EMERG, "edge write discovery failed: " printk(BIOS_EMERG, "Aggressive read training failed: "
"%d, %d, %d\n", channel, slotrank, lane); "%d, %d, %d\n", channel, slotrank, lane);
return MAKE_ERR; return MAKE_ERR;
@ -2482,7 +2482,7 @@ int aggressive_write_training(ramctr_timing *ctrl)
if (enable_iosav_opt) if (enable_iosav_opt)
MCHBAR32(MCMNTS_SPARE) = 1; MCHBAR32(MCMNTS_SPARE) = 1;
printram("discover tx_dq write:\n"); printram("Aggresive write training:\n");
for (i = 0; i < ARRAY_SIZE(wr_vref_offsets); i++) { for (i = 0; i < ARRAY_SIZE(wr_vref_offsets); i++) {
FOR_ALL_POPULATED_CHANNELS { FOR_ALL_POPULATED_CHANNELS {
@ -2520,8 +2520,8 @@ int aggressive_write_training(ramctr_timing *ctrl)
rn = get_longest_zero_run(stats, MAX_TX_DQ + 1); rn = get_longest_zero_run(stats, MAX_TX_DQ + 1);
if (rn.all) { if (rn.all) {
printk(BIOS_EMERG, printk(BIOS_EMERG, "Aggressive "
"tx_dq write discovery failed: " "write training failed: "
"%d, %d, %d\n", channel, "%d, %d, %d\n", channel,
slotrank, lane); slotrank, lane);