Newer
Older
* (C) Copyright 2000-2011
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <common.h>
#include <watchdog.h>
#include <command.h>
#include <malloc.h>
#include <stdio_dev.h>
#ifdef CONFIG_5xx
#include <mpc5xx.h>
#endif
#include <mpc5xxx.h>
#endif
Jon Loeliger
committed
#if defined(CONFIG_CMD_IDE)
Jon Loeliger
committed
#if defined(CONFIG_CMD_SCSI)
Jon Loeliger
committed
#if defined(CONFIG_CMD_KGDB)
#include <kgdb.h>
#endif
#ifdef CONFIG_STATUS_LED
#include <status_led.h>
#endif
#include <net.h>
#ifdef CONFIG_SYS_ALLOC_DPRAM
#include <version.h>
#if defined(CONFIG_BAB7xx)
#include <w83c553f.h>
#endif
#include <dtt.h>
#if defined(CONFIG_POST)
#include <post.h>
#endif
#if defined(CONFIG_LOGBUFFER)
#include <logbuff.h>
#endif
#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500)
#include <asm/cache.h>
#endif
#ifdef CONFIG_PS2KBD
#include <keyboard.h>
#endif
#ifdef CONFIG_ADDR_MAP
#include <asm/mmu.h>
#endif
#ifdef CONFIG_MP
#include <asm/mp.h>
#endif
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
#ifdef CONFIG_SYS_UPDATE_FLASH_SIZE
extern int update_flash_size(int flash_size);
#if defined(CONFIG_SC3)
extern void sc3_read_eeprom(void);
#endif
Jon Loeliger
committed
#if defined(CONFIG_CMD_DOC)
void doc_init(void);
#endif
#if defined(CONFIG_HARD_I2C) || \
defined(CONFIG_SOFT_I2C)
#include <i2c.h>
#endif
#include <nand.h>
#if defined(CONFIG_OXC) || defined(CONFIG_RMU)
#if defined(CONFIG_START_IDE)
extern int board_start_ide(void);
#endif
DECLARE_GLOBAL_DATA_PTR;
#if !defined(CONFIG_SYS_MEM_TOP_HIDE)
#define CONFIG_SYS_MEM_TOP_HIDE 0
extern ulong __init_end;
ulong monitor_flash_len;
Jon Loeliger
committed
#if defined(CONFIG_CMD_BEDBUG)
/*
* Utilities
*/
/*
* All attempts to come up with a "common" initialization sequence
* that works for all boards and architectures failed: some of the
* requirements are just _too_ different. To get rid of the resulting
* mess of board dependend #ifdef'ed code we now make the whole
* initialization sequence configurable to the user.
*
* The requirements for any new initalization function is simple: it
* receives a pointer to the "global data" structure as it's only
* argument, and returns an integer return code, where 0 means
* "continue" and != 0 means "fatal error, hang the system".
*/
typedef int (init_fnc_t)(void);
/*
* Init Utilities
*
* Some of this code should be moved into the core functions,
* but let's get it working (again) first...
*/
static int init_baudrate(void)
gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
return 0;
}
/***********************************************************************/
static void __board_add_ram_info(int use_default)
{
/* please define platform specific board_add_ram_info() */
}
void board_add_ram_info(int)
__attribute__ ((weak, alias("__board_add_ram_info")));
static int __board_flash_wp_on(void)
{
/*
* Most flashes can't be detected when write protection is enabled,
* so provide a way to let U-Boot gracefully ignore write protected
* devices.
*/
return 0;
}
int board_flash_wp_on(void)
__attribute__ ((weak, alias("__board_flash_wp_on")));
static void __cpu_secondary_init_r(void)
{
}
void cpu_secondary_init_r(void)
__attribute__ ((weak, alias("__cpu_secondary_init_r")));
static int init_func_ram(void)
{
#ifdef CONFIG_BOARD_TYPES
int board_type = gd->board_type;
#else
int board_type = 0; /* use dummy arg */
#endif
Loading
Loading full blame...