summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/northbridge/intel/ironlake/raminit.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/northbridge/intel/ironlake/raminit.c b/src/northbridge/intel/ironlake/raminit.c
index fe67f0d0a3..1f550835b0 100644
--- a/src/northbridge/intel/ironlake/raminit.c
+++ b/src/northbridge/intel/ironlake/raminit.c
@@ -915,19 +915,14 @@ static void jedec_read(struct raminfo *info,
int total_rank, u8 addr3, unsigned int value)
{
/* Handle mirrored mapping. */
- if ((rank & 1) && (info->spd[channel][slot][RANK1_ADDRESS_MAPPING] & 1))
- addr3 = (addr3 & 0xCF) | ((addr3 & 0x10) << 1) |
- ((addr3 >> 1) & 0x10);
+ if ((rank & 1) && (info->spd[channel][slot][RANK1_ADDRESS_MAPPING] & 1)) {
+ addr3 = (addr3 & 0xCF) | ((addr3 & 0x10) << 1) | ((addr3 >> 1) & 0x10);
+ value = (value & ~0x1f8) | ((value >> 1) & 0xa8) | ((value & 0xa8) << 1);
+ }
mchbar_clrsetbits8(0x271, 0x1f << 1, addr3);
mchbar_clrsetbits8(0x671, 0x1f << 1, addr3);
- /* Handle mirrored mapping. */
- if ((rank & 1) && (info->spd[channel][slot][RANK1_ADDRESS_MAPPING] & 1))
- value =
- (value & ~0x1f8) | ((value >> 1) & 0xa8) | ((value & 0xa8)
- << 1);
-
read32p((value << 3) | (total_rank << 28));
mchbar_clrsetbits8(0x271, 0x1f << 1, 1 << 1);