summaryrefslogtreecommitdiff
path: root/arch/nios2/lib/board.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-04-27 22:53:04 +0200
committerWolfgang Denk <wd@denx.de>2010-04-27 22:53:04 +0200
commitc88d6ab19ffab06f372b15c290bdf5d6f1ebfe9a (patch)
tree020001798e0f799032c68942bc7d0b13a65041ca /arch/nios2/lib/board.c
parentfbb0030e3894119c089256f16626edd166c7629c (diff)
parent8cbb0ddd7e696c6a4be1ae3ab3c95d3c8f6a7031 (diff)
downloadu-boot-imx-c88d6ab19ffab06f372b15c290bdf5d6f1ebfe9a.zip
u-boot-imx-c88d6ab19ffab06f372b15c290bdf5d6f1ebfe9a.tar.gz
u-boot-imx-c88d6ab19ffab06f372b15c290bdf5d6f1ebfe9a.tar.bz2
Merge branch 'next' of git://git.denx.de/u-boot-nios
Diffstat (limited to 'arch/nios2/lib/board.c')
-rw-r--r--arch/nios2/lib/board.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c
index 8ec66a3..f83e691 100644
--- a/arch/nios2/lib/board.c
+++ b/arch/nios2/lib/board.c
@@ -28,6 +28,7 @@
#include <stdio_dev.h>
#include <watchdog.h>
#include <malloc.h>
+#include <mmc.h>
#include <net.h>
#ifdef CONFIG_STATUS_LED
#include <status_led.h>
@@ -35,6 +36,9 @@
#if defined(CONFIG_SYS_NIOS_EPCSBASE)
#include <nios2-epcs.h>
#endif
+#ifdef CONFIG_CMD_NAND
+#include <nand.h> /* cannot even include nand.h if it isnt configured */
+#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -100,7 +104,9 @@ void board_init (void)
bd = gd->bd;
bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
+#ifndef CONFIG_SYS_NO_FLASH
bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
+#endif
#if defined(CONFIG_SYS_SRAM_BASE) && defined(CONFIG_SYS_SRAM_SIZE)
bd->bi_sramstart= CONFIG_SYS_SRAM_BASE;
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
@@ -119,8 +125,20 @@ void board_init (void)
/* The Malloc area is immediately below the monitor copy in RAM */
mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN);
+#ifndef CONFIG_SYS_NO_FLASH
WATCHDOG_RESET ();
bd->bi_flashsize = flash_init();
+#endif
+
+#ifdef CONFIG_CMD_NAND
+ puts("NAND: ");
+ nand_init();
+#endif
+
+#ifdef CONFIG_GENERIC_MMC
+ puts("MMC: ");
+ mmc_initialize(bd);
+#endif
WATCHDOG_RESET ();
env_relocate();