nb/intel/sandybridge/raminit: Do not log inside busy-wait loop
Time spent in printk() is highly unpredictable, depending of the enabled consoles. If only CBMEM console is enabled, debugstring is repeated tens of times, consuming preram_cbmem_console storage. Change-Id: I2b0d9bd11c294d988a0eb84b90e77d5cc7f1f848 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/17516 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
ebc21d125f
commit
809b5881a9
1 changed files with 5 additions and 2 deletions
|
@ -850,11 +850,14 @@ static void dram_freq(ramctr_timing * ctrl)
|
||||||
reg1 = FRQ;
|
reg1 = FRQ;
|
||||||
reg1 |= 0x80000000; // set running bit
|
reg1 |= 0x80000000; // set running bit
|
||||||
MCHBAR32(MC_BIOS_REQ) = reg1;
|
MCHBAR32(MC_BIOS_REQ) = reg1;
|
||||||
|
int i=0;
|
||||||
|
printk(BIOS_DEBUG, "PLL busy... ");
|
||||||
while (reg1 & 0x80000000) {
|
while (reg1 & 0x80000000) {
|
||||||
printk(BIOS_DEBUG, " PLL busy...");
|
udelay(10);
|
||||||
|
i++;
|
||||||
reg1 = MCHBAR32(MC_BIOS_REQ);
|
reg1 = MCHBAR32(MC_BIOS_REQ);
|
||||||
}
|
}
|
||||||
printk(BIOS_DEBUG, "done\n");
|
printk(BIOS_DEBUG, "done in %d us\n", i * 10);
|
||||||
|
|
||||||
/* Step 3 - Verify lock frequency */
|
/* Step 3 - Verify lock frequency */
|
||||||
reg1 = MCHBAR32(MC_BIOS_DATA);
|
reg1 = MCHBAR32(MC_BIOS_DATA);
|
||||||
|
|
Loading…
Reference in a new issue