PERFORCE change 95708 for review
Warner Losh
imp at FreeBSD.org
Thu Apr 20 20:02:37 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=95708
Change 95708 by imp at imp_hammer on 2006/04/20 20:01:49
Create recovery iic for real. Also, use the default linker.cfg
rather than the optimized one (maybe we don't need the optimized
one).
Affected files ...
.. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#3 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/doit.c#2 edit
.. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#3 edit
Differences ...
==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#3 (text) ====
@@ -6,7 +6,7 @@
FILES=${P}
SRCS=arm_init.s main.c doit.c
NO_MAN=
-LDFLAGS=-e 0 -T ${.CURDIR}/../boot0/linker.cfg
+LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
.include <bsd.prog.mk>
==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/doit.c#2 (text+ko) ====
@@ -24,14 +24,24 @@
* $FreeBSD: src/sys/boot/arm/at91/boot0/main.c,v 1.3 2006/04/19 17:16:48 imp Exp $
*/
+#include "lib.h"
+#include "at91rm9200.h"
+#include "at91rm9200_lowlevel.h"
+
typedef void fn_t(void);
-
void doit(void *);
void
doit(void *addr)
{
- fn_t *fn = (fn_t *)addr;
- fn();
+ int sec;
+
+ printf("Writing EEPROM\r\n");
+ WriteEEPROM(0, addr, 8192);
+ sec = GetSeconds();
+ while (1) {
+ printf("Write complete. Press reset\r\n");
+ while (sec == GetSeconds())
+ continue;
+ }
}
-
==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#3 (text) ====
@@ -6,7 +6,7 @@
FILES=${P}
SRCS=arm_init.s main.c doit.c
NO_MAN=
-LDFLAGS=-e 0 -T ${.CURDIR}/../boot0/linker.cfg
+LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
.include <bsd.prog.mk>
More information about the p4-projects
mailing list