Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2006 02:53:08 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 99194 for review
Message-ID:  <200606140253.k5E2r8EN026972@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99194

Change 99194 by imp@imp_Speedy on 2006/06/14 02:52:33

	Add a bit of a delay and print the registers out of the mii chip
	for debug for the hardware guys.

Affected files ...

.. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#16 edit

Differences ...

==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#16 (text+ko) ====

@@ -384,9 +384,9 @@
 {
 	unsigned short stat2; 
 	unsigned update;
-#if 0
 	unsigned sec;
 	int i;
+#if 0
 
 //	AT91F_MII_WritePhy(pEmac, 20, 0x70);
 	AT91F_MII_WritePhy(pEmac, 0x0, 0x3300);
@@ -415,8 +415,13 @@
 	stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS_REG);
 	stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS_REG);
 	if (!(stat2 & MII_STS_LINK_STAT)) {
+		sec = GetSeconds();
 		printf("emac: missing link status 0x%x\r\n", stat2);
-		printf("%x\r\n", AT91F_MII_ReadPhy(pEmac, MII_SPEC_STS_REG));
+		for (i = 0; i <= 0x18; i++) 
+			printf("%x ", AT91F_MII_ReadPhy(pEmac, i));
+		printf("\r\n");
+		while (GetSeconds() <= sec + 2) continue;
+		sec = GetSeconds();	
 		AT91F_MII_WritePhy(pEmac, 0x0, 0x3300);
 		while (AT91F_MII_ReadPhy(pEmac, 0x0) & (1 << 9));
 		goto again;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606140253.k5E2r8EN026972>