Date: Fri, 21 Apr 2006 22:13:10 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95838 for review Message-ID: <200604212213.k3LMDA0g027371@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95838 Change 95838 by imp@imp_hammer on 2006/04/21 22:12:37 Initial version of spi burning bootstrap. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/doit.c#3 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#5 (text) ==== @@ -4,7 +4,7 @@ P=boot0spi FILES=${P} -SRCS=arm_init.s main.c doit.c +SRCS=arm_init.s main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#3 (text) ==== @@ -27,16 +27,18 @@ #include "at91rm9200.h" #include "lib.h" #include "at91rm9200_lowlevel.h" - -extern void doit(void *); +#include "spi_flash.h" int main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ + int len; - while (xmodem_rx(addr) == -1) + while ((len = xmodem_rx(addr)) == -1) continue; - doit(addr); + SPI_InitFlash(); + SPI_WriteFlash(FLASH_PAGE_SIZE, addr, len); + return (1); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604212213.k3LMDA0g027371>