PERFORCE change 104714 for review
Warner Losh
imp at FreeBSD.org
Mon Aug 21 20:07:14 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104714
Change 104714 by imp at 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));
}
More information about the p4-projects
mailing list