Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Aug 2006 20:07:13 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 104714 for review
Message-ID:  <200608212007.k7LK7D1i037135@repoman.freebsd.org>

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

Change 104714 by imp@imp_lighthouse on 2006/08/21 20:07:11

	Initialize the SD card, the emac and try to actually read off
	the sd card.
	
	God save us all.

Affected files ...

.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#5 edit

Differences ...

==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#5 (text+ko) ====

@@ -26,7 +26,9 @@
 
 #include <stdarg.h>
 
+#include "emac.h"
 #include "lib.h"
+#include "sd-card.h"
 
 #define SECOND		18	/* Circa that many ticks in a second. */
 
@@ -98,6 +100,8 @@
     RBX_VERBOSE
 };
 
+unsigned char mac[6] = { 0x42, 0x53, 0x44, 0, 0, 1 };
+
 int dsk_start;
 static char cmd[512];
 static char kname[1024];
@@ -184,6 +188,10 @@
     int autoboot;
     ino_t ino;
 
+    EMAC_Init();
+    sdcard_init();
+    EMAC_SetMACAddress(mac);
+
     dmadat = (void *)(0x20000000 + (1 << 20));
     /* Process configuration file */
 
@@ -339,6 +347,5 @@
 
     if (!OPT_CHECK(RBX_QUIET))
 	printf("%c\b", c = c << 8 | c >> 24);
-    // XXX actually read here!
-    return -1;
+    return (MCI_read((char *)buf, lba << 9, nblk << 9));
 }



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