nb/intel/sandybridge: Use macros to determine min and max of timA
This improves readability. Change-Id: Ib4387a4f4092053dab273191a73edb0ef31a79f6 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/19691 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
parent
e729366d7a
commit
abc504f427
|
@ -1020,30 +1020,18 @@ void program_timings(ramctr_timing * ctrl, int channel)
|
|||
shift = 0;
|
||||
|
||||
FOR_ALL_LANES {
|
||||
if (post_timA_min_high >
|
||||
((ctrl->timings[channel][slotrank].lanes[lane].
|
||||
timA + shift) >> 6))
|
||||
post_timA_min_high =
|
||||
((ctrl->timings[channel][slotrank].
|
||||
lanes[lane].timA + shift) >> 6);
|
||||
if (pre_timA_min_high >
|
||||
(ctrl->timings[channel][slotrank].lanes[lane].
|
||||
timA >> 6))
|
||||
pre_timA_min_high =
|
||||
(ctrl->timings[channel][slotrank].
|
||||
lanes[lane].timA >> 6);
|
||||
if (post_timA_max_high <
|
||||
((ctrl->timings[channel][slotrank].lanes[lane].
|
||||
timA + shift) >> 6))
|
||||
post_timA_max_high =
|
||||
((ctrl->timings[channel][slotrank].
|
||||
lanes[lane].timA + shift) >> 6);
|
||||
if (pre_timA_max_high <
|
||||
(ctrl->timings[channel][slotrank].lanes[lane].
|
||||
timA >> 6))
|
||||
pre_timA_max_high =
|
||||
(ctrl->timings[channel][slotrank].
|
||||
lanes[lane].timA >> 6);
|
||||
post_timA_min_high = MIN(post_timA_min_high,
|
||||
(ctrl->timings[channel][slotrank].lanes[lane].
|
||||
timA + shift) >> 6);
|
||||
pre_timA_min_high = MIN(pre_timA_min_high,
|
||||
ctrl->timings[channel][slotrank].lanes[lane].
|
||||
timA >> 6);
|
||||
post_timA_max_high = MAX(post_timA_max_high,
|
||||
(ctrl->timings[channel][slotrank].lanes[lane].
|
||||
timA + shift) >> 6);
|
||||
pre_timA_max_high = MAX(pre_timA_max_high,
|
||||
ctrl->timings[channel][slotrank].lanes[lane].
|
||||
timA >> 6);
|
||||
}
|
||||
|
||||
if (pre_timA_max_high - pre_timA_min_high <
|
||||
|
|
Loading…
Reference in New Issue