#if defined(CONFIG_HARD_SPI)
#include <spi.h>
#endif
-#if defined(CONFIG_CMD_NAND)
-void nand_init (void);
-#endif
+#include <nand.h>
static char *failed = "*** failed ***\n";
#define CFG_MEM_TOP_HIDE 0
#endif
-extern ulong _start;
extern ulong __init_end;
extern ulong _end;
ulong monitor_flash_len;
************************************************************************
*/
+#ifdef CONFIG_LOGBUFFER
+unsigned long logbuffer_base(void)
+{
+ return CFG_SDRAM_BASE + get_effective_memsize() - LOGBUFF_LEN;
+}
+#endif
+
void board_init_f (ulong bootflag)
{
bd_t *bd;
/* compiler optimization barrier needed for GCC >= 3.4 */
__asm__ __volatile__("": : :"memory");
-#if !defined(CONFIG_CPM2) && !defined(CONFIG_MPC83XX)
+#if !defined(CONFIG_CPM2) && !defined(CONFIG_MPC83XX) && \
+ !defined(CONFIG_MPC85xx) && !defined(CONFIG_MPC86xx)
/* Clear initial global data */
memset ((void *) gd, 0, sizeof (gd_t));
#endif
* - monitor code
* - board info struct
*/
- len = (ulong)&_end - (ulong)&_start + EXC_OFF_SYS_RESET;
+ len = (ulong)&_end - CFG_MONITOR_BASE;
/*
* Subtract specified amount of memory to hide so that it won't
*/
gd->ram_size -= CFG_MEM_TOP_HIDE;
-#ifndef CONFIG_MAX_MEM_MAPPED
-#define CONFIG_MAX_MEM_MAPPED (256 << 20)
-#endif
-
-#ifndef CONFIG_VERY_BIG_RAM
addr = CFG_SDRAM_BASE + get_effective_memsize();
-#else
- /* only allow stack below 256M */
- addr = CFG_SDRAM_BASE +
- (gd->ram_size > CONFIG_MAX_MEM_MAPPED) ?
- CONFIG_MAX_MEM_MAPPED : get_effective_memsize();
-#endif
#ifdef CONFIG_LOGBUFFER
#ifndef CONFIG_ALT_LB_ADDR