nb/intel/i945: Make some cosmetic changes

This will make i945GC and i945GM splitting easier.

Change-Id: I3acc1f526056248f8fbb1778a3c381d369faf020
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39859
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Elyes HAOUAS 2020-03-26 12:20:38 +01:00 committed by Patrick Georgi
parent 98b78efabe
commit 95cdd9f21b
1 changed files with 29 additions and 23 deletions

View File

@ -205,7 +205,7 @@ static int sdram_capabilities_enhanced_addressing_xor(void)
return (!reg8);
}
// TODO check if we ever need this function
/* TODO check if we ever need this function */
#if 0
static int sdram_capabilities_MEM4G_disable(void)
{
@ -447,7 +447,7 @@ static void gather_common_timing(struct sys_info *sysinfo,
sysinfo->package = SYSINFO_PACKAGE_STACKED;
if (!dimm_info.flags.bl8)
die("Only DDR-II RAM with burst length 8 is supported by this chipset.\n");
die("Only DDR-II RAM with burst length 8 is supported.\n");
if (dimm_info.ranksize_mb < 128)
die("DDR-II rank size smaller than 128MB is not supported.\n");
@ -495,7 +495,7 @@ static void gather_common_timing(struct sys_info *sysinfo,
die("No memory installed.\n");
if (!(dimm_mask & ((1 << DIMM_SOCKETS) - 1)))
/* Possibly does not boot in this case */
/* FIXME: Possibly does not boot in this case */
printk(BIOS_INFO, "Channel 0 has no memory populated.\n");
}
@ -1444,12 +1444,16 @@ static void sdram_set_timing_and_control(struct sys_info *sysinfo)
*/
tRD_min = sysinfo->cas;
switch (sysinfo->fsb_frequency) {
case 533: break;
case 667: tRD_min += 1;
case 533:
break;
case 800: tRD_min += 2;
case 667:
tRD_min += 1;
break;
case 1066: tRD_min += 3;
case 800:
tRD_min += 2;
break;
case 1066:
tRD_min += 3;
break;
}
@ -2541,13 +2545,15 @@ static void sdram_jedec_enable(struct sys_info *sysinfo)
if (sysinfo->interleaved && nonzero < 4 && i >= 4) {
bankaddr = 0x40;
} else {
printk(BIOS_DEBUG, "bankaddr from bank size of rank %d\n", nonzero);
printk(BIOS_DEBUG, "bankaddr from bank size of rank %d\n",
nonzero);
bankaddr += sysinfo->banksize[nonzero] <<
(sysinfo->interleaved ? 26 : 25);
}
}
/* We have a bank with a non-zero size.. Remember it
/*
* We have a bank with a non-zero size... Remember it
* for the next offset we have to calculate
*/
nonzero = i;