aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/sandybridge/raminit_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/intel/sandybridge/raminit_common.c')
-rw-r--r--src/northbridge/intel/sandybridge/raminit_common.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c
index 59dd5be357..83fea80dc6 100644
--- a/src/northbridge/intel/sandybridge/raminit_common.c
+++ b/src/northbridge/intel/sandybridge/raminit_common.c
@@ -597,18 +597,6 @@ void dram_jedecreset(ramctr_timing *ctrl)
}
}
-static odtmap get_ODT(ramctr_timing *ctrl, u8 rank, int channel)
-{
- /* Get ODT based on rankmap */
- int dimms_per_ch = (ctrl->rankmap[channel] & 1) + ((ctrl->rankmap[channel] >> 2) & 1);
-
- if (dimms_per_ch == 1) {
- return (const odtmap){60, 60};
- } else {
- return (const odtmap){120, 30};
- }
-}
-
static void write_mrreg(ramctr_timing *ctrl, int channel, int slotrank, int reg, u32 val)
{
wait_for_iosav(channel);
@@ -718,6 +706,18 @@ static void dram_mr0(ramctr_timing *ctrl, u8 rank, int channel)
write_mrreg(ctrl, channel, rank, 0, make_mr0(ctrl, rank));
}
+static odtmap get_ODT(ramctr_timing *ctrl, u8 rank, int channel)
+{
+ /* Get ODT based on rankmap */
+ int dimms_per_ch = (ctrl->rankmap[channel] & 1) + ((ctrl->rankmap[channel] >> 2) & 1);
+
+ if (dimms_per_ch == 1) {
+ return (const odtmap){60, 60};
+ } else {
+ return (const odtmap){120, 30};
+ }
+}
+
static u32 encode_odt(u32 odt)
{
switch (odt) {