[coreboot] [PATCH] watchdog mcp55's codec initialization loops

Joe Korty joe.korty at ccur.com
Wed May 12 17:12:45 CEST 2010


Put a 1 msec watchdog on the mcp55's codec status-wait
loops.

This 'fixes' a coreboot lockup I saw on my SuperMicro
H8DME-2 with AMD 2222 Processors installed.

For some reason the codec is being found but the
subsequent initialization sequence is not able to
initialize the device.

Hopefully a 1 msec watchdog is long enough for a found
codec.  If not it can be made longer but hopefully it
can be kept much shorter than 1 second as excessively
long timeouts make it difficult to use coreboot as a
'quick boot' mechanism.

Index: trunk/src/southbridge/nvidia/mcp55/mcp55_aza.c
===================================================================
--- trunk.orig/src/southbridge/nvidia/mcp55/mcp55_aza.c	2010-05-12 06:33:16.000000000 -0400
+++ trunk/src/southbridge/nvidia/mcp55/mcp55_aza.c	2010-05-12 07:05:51.000000000 -0400
@@ -173,16 +173,28 @@
 	int i;
 
 	/* 1 */
+	i = 100; /* 1 msec watchdog */
 	do {
+		udelay(10);
 		dword = read32(base + 0x68);
-	} while (dword & 1);
+	} while ((dword & 1) && --i);
+	if (!i) {
+		printk(BIOS_WARNING, "1: codec(%08x,%d) timed out.  Not set up.\n", base, addr);
+		return;
+	}
 
 	dword = (addr<<28) | 0x000f0000;
 	write32(base + 0x60, dword);
 
+	i = 100; /* 1 msec watchdog */
 	do {
+		udelay(10);
 		dword = read32(base + 0x68);
-	} while ((dword & 3)!=2);
+	} while (((dword & 3) != 2) && --i);
+	if (!i) {
+		printk(BIOS_WARNING, "2: codec(%08x,%d) timed out.  Not set up.\n", base, addr);
+		return;
+	}
 
 	dword = read32(base + 0x64);
 




More information about the coreboot mailing list