/*
- * (C) Copyright 2000-2002
+ * (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
#ifdef CONFIG_5xx
#include <mpc5xx.h>
#endif
-#ifdef CONFIG_MPC5XXX
+#ifdef CONFIG_MPC5xxx
#include <mpc5xxx.h>
#endif
#if (CONFIG_COMMANDS & CFG_CMD_IDE)
#endif
#include <net.h>
#ifdef CFG_ALLOC_DPRAM
-#if !defined(CONFIG_8260)
+#if !(defined(CONFIG_8260)||defined(CONFIG_MPC8560))
#include <commproc.h>
#endif
#endif
#if defined(CONFIG_LOGBUFFER)
#include <logbuff.h>
#endif
+#if defined(CFG_INIT_RAM_LOCK) && defined(CONFIG_E500)
+#include <asm/cache.h>
+#endif
+#ifdef CONFIG_PS2KBD
+#include <keyboard.h>
+#endif
#if (CONFIG_COMMANDS & CFG_CMD_DOC)
void doc_init (void);
init_fnc_t *init_sequence[] = {
-#if defined(CONFIG_BOARD_PRE_INIT)
- board_pre_init, /* very early board init code (fpga boot, etc.) */
+#if defined(CONFIG_BOARD_EARLY_INIT_F)
+ board_early_init_f,
#endif
+#if !defined(CONFIG_TQM866M)
get_clocks, /* get CPU and bus clocks (etc.) */
init_timebase,
+#endif
#ifdef CFG_ALLOC_DPRAM
-#if !defined(CONFIG_8260)
+#if !(defined(CONFIG_8260) || defined(CONFIG_MPC8560))
dpram_init,
#endif
#endif
board_postclk_init,
#endif
env_init,
+#if defined(CONFIG_TQM866M)
+ get_clocks_866, /* get CPU and bus clocks according to the environment variable */
+ sdram_adjust_866, /* adjust sdram refresh rate according to the new clock */
+ init_timebase,
+#endif
init_baudrate,
serial_init,
console_init_f,
prt_8260_clks,
#endif /* CONFIG_8260 */
checkcpu,
-#if defined(CONFIG_MPC5XXX)
+#if defined(CONFIG_MPC5xxx)
prt_mpc5xxx_clks,
-#endif /* CONFIG_MPC5XXX */
+#endif /* CONFIG_MPC5xxx */
checkboard,
INIT_FUNC_WATCHDOG_INIT
-#if defined(CONFIG_BMW) || \
- defined(CONFIG_COGENT) || \
- defined(CONFIG_HYMOD) || \
- defined(CONFIG_RSD_PROTO) || \
- defined(CONFIG_W7O)
+#if defined(CONFIG_MISC_INIT_F)
misc_init_f,
#endif
INIT_FUNC_WATCHDOG_RESET
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET);
-#ifndef CONFIG_8260
+#if !(defined(CONFIG_8260) || defined(CONFIG_MPC8560))
/* Clear initial global data */
memset ((void *) gd, 0, sizeof (gd_t));
#endif
* Save local variables to board info struct
*/
- bd->bi_memstart = CFG_SDRAM_BASE; /* start of DRAM memory */
+ bd->bi_memstart = CFG_SDRAM_BASE; /* start of DRAM memory */
bd->bi_memsize = gd->ram_size; /* size of DRAM memory in bytes */
#ifdef CONFIG_IP860
- bd->bi_sramstart = SRAM_BASE; /* start of SRAM memory */
- bd->bi_sramsize = SRAM_SIZE; /* size of SRAM memory */
+ bd->bi_sramstart = SRAM_BASE; /* start of SRAM memory */
+ bd->bi_sramsize = SRAM_SIZE; /* size of SRAM memory */
#else
- bd->bi_sramstart = 0; /* FIXME */ /* start of SRAM memory */
- bd->bi_sramsize = 0; /* FIXME */ /* size of SRAM memory */
+ bd->bi_sramstart = 0; /* FIXME */ /* start of SRAM memory */
+ bd->bi_sramsize = 0; /* FIXME */ /* size of SRAM memory */
#endif
-#if defined(CONFIG_8xx) || defined(CONFIG_8260) || defined(CONFIG_5xx)
+#if defined(CONFIG_8xx) || defined(CONFIG_8260) || defined(CONFIG_5xx) || \
+ defined(CONFIG_E500)
bd->bi_immr_base = CFG_IMMR; /* base of IMMR register */
#endif
-#if defined(CONFIG_MPC5XXX)
+#if defined(CONFIG_MPC5xxx)
bd->bi_mbar_base = CFG_MBAR; /* base of internal registers */
#endif
WATCHDOG_RESET ();
bd->bi_intfreq = gd->cpu_clk; /* Internal Freq, in Hz */
bd->bi_busfreq = gd->bus_clk; /* Bus Freq, in Hz */
-#if defined(CONFIG_8260)
+#if defined(CONFIG_8260) || defined(CONFIG_MPC8560)
bd->bi_cpmfreq = gd->cpm_clk;
bd->bi_brgfreq = gd->brg_clk;
bd->bi_sccfreq = gd->scc_clk;
bd->bi_vco = gd->vco_out;
#endif /* CONFIG_8260 */
-#if defined(CONFIG_MPC5XXX)
+#if defined(CONFIG_MPC5xxx)
bd->bi_ipbfreq = gd->ipb_clk;
bd->bi_pcifreq = gd->pci_clk;
-#endif /* CONFIG_MPC5XXX */
+#endif /* CONFIG_MPC5xxx */
bd->bi_baudrate = gd->baudrate; /* Console Baudrate */
#ifdef CFG_EXTBDINFO
bd->bi_plb_busfreq = gd->bus_clk;
#if defined(CONFIG_405GP) || defined(CONFIG_405EP)
bd->bi_pci_busfreq = get_PCI_freq ();
+
+#ifdef CFG_OPB_FREQ
+ bd->bi_opbfreq = CFG_OPB_FREQ;
+#else
+ bd->bi_opbfreq = 50000000;
+#endif
+ bd->bi_iic_fast[0] = 0;
+ bd->bi_iic_fast[1] = 0;
+#elif defined(CONFIG_XILINX_ML300)
+ bd->bi_pci_busfreq = get_PCI_freq ();
#endif
#endif
WATCHDOG_RESET ();
+#if defined(CONFIG_BOARD_EARLY_INIT_R)
+ board_early_init_r ();
+#endif
+
gd->reloc_off = dest_addr - CFG_MONITOR_BASE;
monitor_flash_len = (ulong)&__init_end - dest_addr;
icache_enable (); /* it's time to enable the instruction cache */
#endif
+#if defined(CFG_INIT_RAM_LOCK) && defined(CONFIG_E500)
+ unlock_ram_in_cache(); /* it's time to unlock D-cache in e500 */
+#endif
+
#if defined(CONFIG_BAB7xx) || defined(CONFIG_CPC45)
/*
* Do PCI configuration on BAB7xx and CPC45 _before_ the flash
load_sernum_ethaddr ();
#endif
-#if defined(CFG_GT_6426x) || defined(CONFIG_PN62)
+#if defined(CFG_GT_6426x) || defined(CONFIG_PN62) || defined(CONFIG_PPCHAMELEONEVB) || \
+ defined(CONFIG_MPC8540ADS) || defined(CONFIG_MPC8560ADS) || defined(CONFIG_440_GX)
/* handle the 2nd ethernet address */
s = getenv ("eth1addr");
s = (*e) ? e + 1 : e;
}
#endif
-#if defined(CFG_GT_6426x)
+#if defined(CFG_GT_6426x) || defined(CONFIG_MPC8540ADS) || defined(CONFIG_MPC8560ADS) || \
+ defined(CONFIG_440_GX)
/* handle the 3rd ethernet address */
s = getenv ("eth2addr");
-
+#if defined(CONFIG_XPEDITE1K)
+ if (s == NULL)
+ board_get_enetaddr(bd->bi_enet2addr);
+ else
+#endif
for (i = 0; i < 6; ++i) {
bd->bi_enet2addr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s)
}
#endif
+#if defined(CONFIG_440_GX)
+ /* handle 4th ethernet address */
+ s = getenv("eth3addr");
+#if defined(CONFIG_XPEDITE1K)
+ if (s == NULL)
+ board_get_enetaddr(bd->bi_enet3addr);
+ else
+#endif
+ for (i = 0; i < 6; ++i) {
+ bd->bi_enet3addr[i] = s ? simple_strtoul (s, &e, 16) : 0;
+ if (s)
+ s = (*e) ? e + 1 : e;
+ }
+#endif
#if defined(CONFIG_TQM8xxL) || defined(CONFIG_TQM8260) || \
defined(CONFIG_CCM)
defined(CONFIG_LWMON) || \
defined(CONFIG_MPC8260ADS) || \
defined(CONFIG_MPC8266ADS) || \
+ defined(CONFIG_MPC8560ADS) || \
defined(CONFIG_PCU_E) || \
defined(CONFIG_RPXSUPER) || \
defined(CONFIG_SPD823TS) )
#if (CONFIG_COMMANDS & CFG_CMD_NAND)
WATCHDOG_RESET ();
+ puts ("NAND:");
nand_init(); /* go init the NAND */
#endif
}
#endif
+#ifdef CONFIG_PS2KBD
+ puts ("PS/2: ");
+ kbd_init();
+#endif
+
#ifdef CONFIG_MODEM_SUPPORT
{
extern int do_mdm_init;
void hang (void)
{
puts ("### ERROR ### Please RESET the board ###\n");
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+ show_boot_progress(-30);
+#endif
for (;;);
}