From owner-p4-projects@FreeBSD.ORG Wed Nov 15 23:58:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 242CB16A5B4; Wed, 15 Nov 2006 23:58:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE02E16A602 for ; Wed, 15 Nov 2006 23:58:09 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20A5143D90 for ; Wed, 15 Nov 2006 23:58:00 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFNvxWl011798 for ; Wed, 15 Nov 2006 23:57:59 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFNvxBb011793 for perforce@freebsd.org; Wed, 15 Nov 2006 23:57:59 GMT (envelope-from imp@freebsd.org) Date: Wed, 15 Nov 2006 23:57:59 GMT Message-Id: <200611152357.kAFNvxBb011793@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110076 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 23:58:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=110076 Change 110076 by imp@imp_lighthouse on 2006/11/15 23:57:21 Add a done message. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#22 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#22 (text) ==== @@ -37,15 +37,15 @@ main(void) { int len, i, j, off; - char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* Load to base + 2MB */ - char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* Load to base + 2MB */ + 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 */ SPI_InitFlash(); printf("Waiting for data\n"); while ((len = xmodem_rx(addr)) == -1) continue; - printf("\nDownloaded %u bytes.\n", len); + // Need extra copy at addr3 memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE); printf("Writing %u bytes to flash at %u\n", len, OFFSET); for (i = 0; i < len; i+= FLASH_PAGE_SIZE) { @@ -59,5 +59,6 @@ if (j >= 10) printf("Bad Readback at %u\n", i); } + printf("Done\n"); return (1); }