aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/sandybridge/raminit_common.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-05-02 19:02:53 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-05-18 07:03:02 +0000
commit8e66124240cb18ecdbca669dee94c5bf04a38364 (patch)
tree6c8f2d1e2989a5002627a4647720f0e7a11ef96d /src/northbridge/intel/sandybridge/raminit_common.c
parentd13bd05b7a94fc4744cba1a94280797f7c1ce3cd (diff)
nb/intel/sandybridge: Add and use BROADCAST_CH for IOSAV
We have a single IOSAV sequence that is broadcast across all channels. Introduce the BROADCAST_CH macro, so that we can use the per-channel register definitions. Treating all IOSAV sequence writes the same eases the refactoring done in subsequent commits. Also, drop the broadcast register definitions for the IOSAV commands, as they are now obsolete. Line length limits are not for review. Breaking the lines unnecessarily complicates search and replace operations, and wil be taken care of in subsequent commits. Tested with BUILD_TIMELESS=1, ASUS P8Z77-V LX2 remains unchanged. Change-Id: I2dbb100fcad68d128e92b1bc9321fc1e53b748c9 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40976 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel/sandybridge/raminit_common.c')
-rw-r--r--src/northbridge/intel/sandybridge/raminit_common.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c
index 05cffd3fd8..ab3386bebb 100644
--- a/src/northbridge/intel/sandybridge/raminit_common.c
+++ b/src/northbridge/intel/sandybridge/raminit_common.c
@@ -808,16 +808,16 @@ void dram_mrscommands(ramctr_timing *ctrl)
}
/* DRAM command NOP (without ODT nor chip selects) */
- MCHBAR32(IOSAV_n_SP_CMD_CTRL(0)) = IOSAV_NOP & NO_RANKSEL & ~(0xff << 8);
- MCHBAR32(IOSAV_n_SUBSEQ_CTRL(0)) = 0xf1001;
- MCHBAR32(IOSAV_n_SP_CMD_ADDR(0)) = 0x60002;
- MCHBAR32(IOSAV_n_ADDR_UPDATE(0)) = 0;
+ MCHBAR32(IOSAV_n_SP_CMD_CTRL_ch(BROADCAST_CH, 0)) = IOSAV_NOP & NO_RANKSEL & ~(0xff << 8);
+ MCHBAR32(IOSAV_n_SUBSEQ_CTRL_ch(BROADCAST_CH, 0)) = 0xf1001;
+ MCHBAR32(IOSAV_n_SP_CMD_ADDR_ch(BROADCAST_CH, 0)) = 0x60002;
+ MCHBAR32(IOSAV_n_ADDR_UPDATE_ch(BROADCAST_CH, 0)) = 0;
/* DRAM command ZQCL */
- MCHBAR32(IOSAV_n_SP_CMD_CTRL(1)) = IOSAV_ZQCS;
- MCHBAR32(IOSAV_n_SUBSEQ_CTRL(1)) = 0x1901001;
- MCHBAR32(IOSAV_n_SP_CMD_ADDR(1)) = 0x60400;
- MCHBAR32(IOSAV_n_ADDR_UPDATE(1)) = 0x288;
+ MCHBAR32(IOSAV_n_SP_CMD_CTRL_ch(BROADCAST_CH, 1)) = IOSAV_ZQCS;
+ MCHBAR32(IOSAV_n_SUBSEQ_CTRL_ch(BROADCAST_CH, 1)) = 0x1901001;
+ MCHBAR32(IOSAV_n_SP_CMD_ADDR_ch(BROADCAST_CH, 1)) = 0x60400;
+ MCHBAR32(IOSAV_n_ADDR_UPDATE_ch(BROADCAST_CH, 1)) = 0x288;
/* Execute command queue on all channels. Do it four times. */
MCHBAR32(IOSAV_SEQ_CTL) = (1 << 18) | 4;