summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2016-11-19 17:12:39 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2016-11-22 05:02:45 +0100
commit809b5881a9df570d333a4c8a78a34807020706d6 (patch)
treeef7fe5912335a6c6667eb22d49b3ac33245b9bd7 /src/northbridge
parentebc21d125fb83ebde6af326df74789c51a48550a (diff)
downloadcoreboot-809b5881a9df570d333a4c8a78a34807020706d6.tar.xz
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>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/sandybridge/raminit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index d06e929384..e8ad4169cc 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -850,11 +850,14 @@ static void dram_freq(ramctr_timing * ctrl)
reg1 = FRQ;
reg1 |= 0x80000000; // set running bit
MCHBAR32(MC_BIOS_REQ) = reg1;
+ int i=0;
+ printk(BIOS_DEBUG, "PLL busy... ");
while (reg1 & 0x80000000) {
- printk(BIOS_DEBUG, " PLL busy...");
+ udelay(10);
+ i++;
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 */
reg1 = MCHBAR32(MC_BIOS_DATA);