diff options
author | imp <imp@FreeBSD.org> | 2006-11-16 00:49:50 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2006-11-16 00:49:50 +0000 |
commit | 1d68e9938f1757caf2b9c671e63f018c37819ba8 (patch) | |
tree | ba652c723748d00a998d65594d11bb7cde37949c /sys/boot | |
parent | 48373925cf54856f051a5c1481bd523afcd26664 (diff) | |
download | FreeBSD-src-1d68e9938f1757caf2b9c671e63f018c37819ba8.zip FreeBSD-src-1d68e9938f1757caf2b9c671e63f018c37819ba8.tar.gz |
MFp4: Don't fix the size at 8k, and some minor cleanups. andre@ contributed
to fixing this problem.
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/arm/at91/boot0iic/main.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/boot/arm/at91/boot0iic/main.c b/sys/boot/arm/at91/boot0iic/main.c index d92acc1..7d0e9d3 100644 --- a/sys/boot/arm/at91/boot0iic/main.c +++ b/sys/boot/arm/at91/boot0iic/main.c @@ -32,12 +32,19 @@ int main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ + int len, sec; - while (xmodem_rx(addr) == -1) + printf("\nSend data to be written into EEPROM\n"); + while ((len = xmodem_rx(addr)) == -1) continue; + sec = GetSeconds() + 1; + while (sec >= GetSeconds()) + continue; + printf("\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\n", addr, + len); InitEEPROM(); - printf("Writing EEPROM from 0x%x to addr 0\n", addr); - WriteEEPROM(0, addr, 8192); - printf("Write complete. Press reset\n"); + printf("init done\n"); + WriteEEPROM(0, addr, len); + printf("\nWrote %d bytes. Press reset\n", len); return (1); } |