Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47609 )
Change subject: nb/intel/sandybridge: Remove unnecessary per-rank loops ......................................................................
nb/intel/sandybridge: Remove unnecessary per-rank loops
The IOSAV_By_BW_MASK_ch registers are not per-rank. To preserve original behavior, use a for-populated-channels loop instead of for-all-channels.
Tested on Asus P8H61-M PRO, still boots.
Change-Id: I6db35c41cd05420ceaeda93255f5ed73598a5bdd Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/northbridge/intel/sandybridge/raminit_common.c 1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/47609/1
diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c index 77c0173..d8ad342 100644 --- a/src/northbridge/intel/sandybridge/raminit_common.c +++ b/src/northbridge/intel/sandybridge/raminit_common.c @@ -1418,7 +1418,7 @@ FOR_ALL_POPULATED_CHANNELS { program_timings(ctrl, channel); } - FOR_ALL_CHANNELS FOR_ALL_POPULATED_RANKS FOR_ALL_LANES { + FOR_ALL_POPULATED_CHANNELS FOR_ALL_LANES { MCHBAR32(IOSAV_By_BW_MASK_ch(channel, lane)) = 0; } return 0; @@ -2063,7 +2063,7 @@ precharge(ctrl); printram("CPF\n");
- FOR_ALL_CHANNELS FOR_ALL_POPULATED_RANKS FOR_ALL_LANES { + FOR_ALL_POPULATED_CHANNELS FOR_ALL_LANES { MCHBAR32(IOSAV_By_BW_MASK_ch(channel, lane)) = 0; }
@@ -2086,7 +2086,7 @@ FOR_ALL_POPULATED_CHANNELS program_timings(ctrl, channel);
- FOR_ALL_CHANNELS FOR_ALL_POPULATED_RANKS FOR_ALL_LANES { + FOR_ALL_POPULATED_CHANNELS FOR_ALL_LANES { MCHBAR32(IOSAV_By_BW_MASK_ch(channel, lane)) = 0; } return 0; @@ -2505,7 +2505,7 @@ program_timings(ctrl, channel); }
- FOR_ALL_CHANNELS FOR_ALL_POPULATED_RANKS FOR_ALL_LANES { + FOR_ALL_POPULATED_CHANNELS FOR_ALL_LANES { MCHBAR32(IOSAV_By_BW_MASK_ch(channel, lane)) = 0; } return 0; @@ -2641,7 +2641,7 @@ FOR_ALL_POPULATED_CHANNELS program_timings(ctrl, channel);
- FOR_ALL_CHANNELS FOR_ALL_POPULATED_RANKS FOR_ALL_LANES { + FOR_ALL_POPULATED_CHANNELS FOR_ALL_LANES { MCHBAR32(IOSAV_By_BW_MASK_ch(channel, lane)) = 0; } return 0; @@ -3150,7 +3150,7 @@
void restore_timings(ramctr_timing *ctrl) { - int channel, slotrank, lane; + int channel, lane;
FOR_ALL_POPULATED_CHANNELS { const union tc_rap_reg tc_rap = { @@ -3171,7 +3171,7 @@ wait_for_iosav(channel); }
- FOR_ALL_CHANNELS FOR_ALL_POPULATED_RANKS FOR_ALL_LANES { + FOR_ALL_POPULATED_CHANNELS FOR_ALL_LANES { MCHBAR32(IOSAV_By_BW_MASK_ch(channel, lane)) = 0; }