diff options
author | imp <imp@FreeBSD.org> | 2006-12-20 17:50:02 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2006-12-20 17:50:02 +0000 |
commit | 6fc94079067e37567a13357bd8117ec8fbe6fbf2 (patch) | |
tree | 164b072d2a5b2f2ee7f2a383b800ffb3fbcf6704 /sys/boot/arm | |
parent | a4b3e03516f20f7a61d84ac127c8bc7cae59c3de (diff) | |
download | FreeBSD-src-6fc94079067e37567a13357bd8117ec8fbe6fbf2.zip FreeBSD-src-6fc94079067e37567a13357bd8117ec8fbe6fbf2.tar.gz |
MFp4: Delay a second or two after the upload before printing Done.
Add an automatic reset for remote operational luvin' goodness.
Diffstat (limited to 'sys/boot/arm')
-rw-r--r-- | sys/boot/arm/at91/boot0spi/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/boot/arm/at91/boot0spi/main.c b/sys/boot/arm/at91/boot0spi/main.c index fabc052..9f1a272 100644 --- a/sys/boot/arm/at91/boot0spi/main.c +++ b/sys/boot/arm/at91/boot0spi/main.c @@ -31,12 +31,12 @@ #define LOADER_OFFSET 0 #define FPGA_OFFSET (15 * FLASH_PAGE_SIZE) -#define OFFSET LOADER_OFFSET +#define OFFSET FPGA_OFFSET int main(void) { - int len, i, j, off; + int len, i, j, off, sec; char *addr = (char *)SDRAM_BASE + (1 << 20); /* download at + 1MB */ char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* readback to + 2MB */ char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* extra copy at + 3MB */ @@ -59,6 +59,10 @@ main(void) if (j >= 10) printf("Bad Readback at %u\n", i); } + sec = GetSeconds() + 2; + while (sec <= GetSeconds()) + continue; printf("Done\n"); + reset(); return (1); } |