diff options
author | Patrick Rudolph <siro@das-labor.org> | 2015-07-03 21:11:25 +0200 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-07-04 23:40:22 +0200 |
commit | 8c2f39714f4d6b8f2ab9692669474fb5ada3ed37 (patch) | |
tree | a3cbed4c0ea88e5b8b2a0361376d85c7c0948fee /src | |
parent | ddb8f808940899240411282d0feb1e2f65ef43a9 (diff) | |
download | coreboot-8c2f39714f4d6b8f2ab9692669474fb5ada3ed37.tar.xz |
intel raminit: rename register
Found while doing code review.
Rename reg_4004_b30 to cmd_stretch.
Found in 4th-gen-core-family-desktop-vol-2-datasheet.pdf chapter 4.2.1.
Change-Id: Ib07059625ed458332708562e836803f2b587d5d8
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: http://review.coreboot.org/10789
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-by: Nicolas Reinecke <nr@das-labor.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/northbridge/intel/sandybridge/raminit_native.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/northbridge/intel/sandybridge/raminit_native.c b/src/northbridge/intel/sandybridge/raminit_native.c index 8d1feccb75..3740a02706 100644 --- a/src/northbridge/intel/sandybridge/raminit_native.c +++ b/src/northbridge/intel/sandybridge/raminit_native.c @@ -136,7 +136,7 @@ typedef struct ramctr_timing_st { int ref_card_offset[NUM_CHANNELS]; u32 mad_dimm[NUM_CHANNELS]; int channel_size_mb[NUM_CHANNELS]; - u32 reg_4004_b30[NUM_CHANNELS]; + u32 cmd_stretch[NUM_CHANNELS]; int reg_c14_offset; int reg_320c_range_threshold; @@ -2683,7 +2683,7 @@ static void reprogram_320c(ramctr_timing * ctrl) #define MIN_C320C_LEN 13 -static int try_reg_4004_b30(ramctr_timing * ctrl, int r4004b30) +static int try_cmd_stretch(ramctr_timing * ctrl, int cmd_stretch) { struct ram_rank_timings saved_timings[NUM_CHANNELS][NUM_SLOTRANKS]; int channel, slotrank; @@ -2695,7 +2695,7 @@ static int try_reg_4004_b30(ramctr_timing * ctrl, int r4004b30) } FOR_ALL_POPULATED_CHANNELS { - ctrl->reg_4004_b30[channel] = r4004b30; + ctrl->cmd_stretch[channel] = cmd_stretch; } FOR_ALL_POPULATED_CHANNELS @@ -2706,14 +2706,14 @@ static int try_reg_4004_b30(ramctr_timing * ctrl, int r4004b30) | (ctrl->tWTR << 12) | (ctrl->tFAW << 16) | (ctrl->tWR << 24) - | (ctrl->reg_4004_b30[channel] << 30); + | (ctrl->cmd_stretch[channel] << 30); FOR_ALL_CHANNELS { int delta = 0; - if (ctrl->reg_4004_b30[channel] == 2) + if (ctrl->cmd_stretch[channel] == 2) delta = 2; - else if (ctrl->reg_4004_b30[channel] == 0) + else if (ctrl->cmd_stretch[channel] == 0) delta = 4; FOR_ALL_POPULATED_RANKS { @@ -2764,7 +2764,8 @@ static void command_training(ramctr_timing * ctrl) write32(DEFAULT_MCHBAR + 0x4288 + 0x400 * channel, 0x1f); } - if (!try_reg_4004_b30(ctrl, 0) && !try_reg_4004_b30(ctrl, 2)) + /* try command rate 1T and 2T */ + if (!try_cmd_stretch(ctrl, 0) && !try_cmd_stretch(ctrl, 2)) die("c320c discovery failed"); FOR_ALL_POPULATED_CHANNELS { @@ -3621,7 +3622,7 @@ static void restore_timings(ramctr_timing * ctrl) | (ctrl->tWTR << 12) | (ctrl->tFAW << 16) | (ctrl->tWR << 24) - | (ctrl->reg_4004_b30[channel] << 30); + | (ctrl->cmd_stretch[channel] << 30); udelay(1); |