PERFORCE change 96623 for review
Warner Losh
imp at FreeBSD.org
Wed May 3 22:17:28 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=96623
Change 96623 by imp at imp_hammer on 2006/05/03 22:16:31
Always init spi flash
move autoboot message to where we do the automatic boot...
Affected files ...
.. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#6 edit
Differences ...
==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/main.c#6 (text+ko) ====
@@ -40,11 +40,11 @@
#include "loader_prompt.h"
#include "emac.h"
#include "lib.h"
+#include "spi_flash.h"
#ifdef TSC_FPGA
-#include "spi_flash.h"
#include "fpga.h"
-struct fpga main_fpga =
+const struct fpga main_fpga =
{
AT91C_BASE_PIOB, AT91C_PIO_PB0,
AT91C_BASE_PIOC, AT91C_PIO_PC11,
@@ -58,7 +58,6 @@
int len;
char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */
- SPI_InitFlash();
len = 212482;
SPI_ReadFlash(15 * FLASH_PAGE_SIZE, addr, len);
printf("Loading %u bytes into the FPGA...\r\n", len);
@@ -72,12 +71,13 @@
int
main(void)
{
+ SPI_InitFlash();
#ifdef TSC_FPGA
fpga_load();
#endif
EMAC_Init();
LoadBootCommands();
- printf("\r\nSPI Boot loader.\r\nAutoboot...\r\n");
+ printf("\r\nSPI Boot loader.\r\n");
if (getc(1) == -1)
ExecuteEnvironmentFunctions();
Bootloader(0);
More information about the p4-projects
mailing list