diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2017-11-05 05:56:34 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-04-17 10:41:14 +0000 |
commit | 276049f9eeb5a53d1f83ee0fb6876e965a6b7ca4 (patch) | |
tree | 072a0feb2740ad6d7202bc3c8c386c1c2fde9be0 /src/northbridge/intel/x4x/rcven.c | |
parent | 1994e448be8e843716173dc7149c8644cfd9ebc5 (diff) |
nb/intel/x4x: Add a convenient macro to loop over bytelanes
During raminit a lot of procedures need to be done for each bytelane.
Change-Id: Ib9a30ffabaf5c845e962e3e79cf4a20faa1d9857
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/22347
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/northbridge/intel/x4x/rcven.c')
-rw-r--r-- | src/northbridge/intel/x4x/rcven.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/northbridge/intel/x4x/rcven.c b/src/northbridge/intel/x4x/rcven.c index ca66f29154..e9a99fbd55 100644 --- a/src/northbridge/intel/x4x/rcven.c +++ b/src/northbridge/intel/x4x/rcven.c @@ -313,7 +313,7 @@ void rcven(struct sysinfo *s) * unitialised. */ u32 addr = 0; - struct rec_timing timing[8]; + struct rec_timing timing[TOTAL_BYTELANES]; u8 mincoarse; MCHBAR8(0x5d8) = MCHBAR8(0x5d8) & ~0xc; @@ -329,7 +329,7 @@ void rcven(struct sysinfo *s) addr = test_address(channel, rank); break; } - for (lane = 0; lane < 8; lane++) { + FOR_EACH_BYTELANE(lane) { printk(BIOS_DEBUG, "Channel %d, Lane %d addr=0x%08x\n", channel, lane, addr); timing[lane].coarse = (s->selected_timings.CAS + 1); @@ -365,7 +365,7 @@ void rcven(struct sysinfo *s) s->rcven_t[channel].min_common_coarse = mincoarse; printk(BIOS_DEBUG, "Receive enable, final timings:\n"); /* Normalise coarse */ - for (lane = 0; lane < 8; lane++) { + FOR_EACH_BYTELANE(lane) { if (timing[lane].coarse == 0) reg8 = 0; else |