Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47517 )
Change subject: nb/intel/sandybridge: Relocate `get_ODT` function ......................................................................
nb/intel/sandybridge: Relocate `get_ODT` function
Change-Id: I21d3e04de45f58cef0603b6b75119cae4b1a7aae Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/northbridge/intel/sandybridge/raminit_common.c 1 file changed, 12 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/47517/1
diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c index 127b493..45f7a99 100644 --- a/src/northbridge/intel/sandybridge/raminit_common.c +++ b/src/northbridge/intel/sandybridge/raminit_common.c @@ -607,18 +607,6 @@ } }
-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); @@ -728,6 +716,18 @@ 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) {
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47517 )
Change subject: nb/intel/sandybridge: Relocate `get_ODT` function ......................................................................
Patch Set 2: Code-Review+2
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47517 )
Change subject: nb/intel/sandybridge: Relocate `get_ODT` function ......................................................................
Patch Set 3: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/47517/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47517/3//COMMIT_MSG@7 PS3, Line 7: Relocate `get_ODT` function why?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47517 )
Change subject: nb/intel/sandybridge: Relocate `get_ODT` function ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47517/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47517/3//COMMIT_MSG@7 PS3, Line 7: Relocate `get_ODT` function
why?
Because it's miles away from the two places it's used in (the MR functions)
Hello build bot (Jenkins), Frans Hendriks, Arthur Heymans, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47517
to look at the new patch set (#4).
Change subject: nb/intel/sandybridge: Relocate `get_ODT` function ......................................................................
nb/intel/sandybridge: Relocate `get_ODT` function
This function is only used in two places, so move its definition closer.
Change-Id: I21d3e04de45f58cef0603b6b75119cae4b1a7aae Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/northbridge/intel/sandybridge/raminit_common.c 1 file changed, 12 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/47517/4
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47517 )
Change subject: nb/intel/sandybridge: Relocate `get_ODT` function ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47517/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47517/3//COMMIT_MSG@7 PS3, Line 7: Relocate `get_ODT` function
Because it's miles away from the two places it's used in (the MR functions)
Done
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47517 )
Change subject: nb/intel/sandybridge: Relocate `get_ODT` function ......................................................................
Patch Set 4: Code-Review+2
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47517 )
Change subject: nb/intel/sandybridge: Relocate `get_ODT` function ......................................................................
nb/intel/sandybridge: Relocate `get_ODT` function
This function is only used in two places, so move its definition closer.
Change-Id: I21d3e04de45f58cef0603b6b75119cae4b1a7aae Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/47517 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Frans Hendriks fhendriks@eltan.com --- M src/northbridge/intel/sandybridge/raminit_common.c 1 file changed, 12 insertions(+), 12 deletions(-)
Approvals: build bot (Jenkins): Verified Frans Hendriks: Looks good to me, approved
diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c index 59dd5be..83fea80 100644 --- a/src/northbridge/intel/sandybridge/raminit_common.c +++ b/src/northbridge/intel/sandybridge/raminit_common.c @@ -597,18 +597,6 @@ } }
-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 @@ 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) {