nb/intel/ironlake: Use `NUM_CHANNELS` macro

Change-Id: I3f4dc26699e3618740af5a0ade1a19599d5a2cc7
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60225
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Angel Pons 2021-12-19 17:15:48 +01:00 committed by Felix Held
parent e061fbf1e7
commit 2ea8b945ec
1 changed files with 1 additions and 1 deletions

View File

@ -792,7 +792,7 @@ static void compute_derived_timings(struct raminfo *info)
info->max_slots_used_in_channel = 2; info->max_slots_used_in_channel = 2;
else else
info->max_slots_used_in_channel = 1; info->max_slots_used_in_channel = 1;
for (channel = 0; channel < 2; channel++) for (channel = 0; channel < NUM_CHANNELS; channel++)
mchbar_write32(0x244 + (channel << 10), mchbar_write32(0x244 + (channel << 10),
((info->revision < 8) ? 1 : 0x200) | ((info->revision < 8) ? 1 : 0x200) |
((2 - info->max_slots_used_in_channel) << 17) | ((2 - info->max_slots_used_in_channel) << 17) |