Date: Wed, 16 Aug 2006 23:10:27 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 104314 for review Message-ID: <200608162310.k7GNARuX091048@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=104314 Change 104314 by imp@imp_lighthouse on 2006/08/16 23:09:53 Cleanup Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/doit.c#5 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#13 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#13 (text) ==== @@ -30,17 +30,6 @@ #include "spi_flash.h" #include "fpga.h" -struct fpga main_fpga = -{ - AT91C_BASE_PIOB, AT91C_PIO_PB0, - AT91C_BASE_PIOC, AT91C_PIO_PC11, - AT91C_BASE_PIOB, AT91C_PIO_PB2, - AT91C_BASE_PIOC, AT91C_PIO_PC12 -}; - -#define BURN_FPGA 1 - -//#define OFFSET (15 * FLASH_PAGE_SIZE) #define OFFSET 0 int @@ -48,16 +37,13 @@ { int len, i, j, off; char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ -#ifdef BURN_FPGA char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* Load to base + 2MB */ char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* Load to base + 2MB */ -#endif SPI_InitFlash(); printf("Waiting for data\r\n"); while ((len = xmodem_rx(addr)) == -1) continue; -#ifdef BURN_FPGA printf("\r\nDownloaded %u bytes.\r\n", len); p_memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE); printf("Writing %u bytes to flash at %u\r\n", len, OFFSET); @@ -72,14 +58,5 @@ if (j >= 10) printf("Bad Readback at %u\r\n", i); } -#else - len = 212482; - SPI_ReadFlash(15 * FLASH_PAGE_SIZE, addr, len); - printf("Downloaded %u bytes... burning FPGA...\r\n", len); - fpga_init(&main_fpga); - fpga_clear(&main_fpga); - fpga_write_bytes(&main_fpga, addr, len); - fpga_done(&main_fpga); -#endif return (1); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608162310.k7GNARuX091048>