summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-01-20 23:12:12 +0000
committerwdenk <wdenk>2004-01-20 23:12:12 +0000
commitc837dcb1a316745092567bfe4fb266d0941884ff (patch)
tree8b275e8c982d1b0a411ff33c08c86cd3d343eed6 /board
parentb0aef11c9f1f98d018adaa484f1e048fa626801e (diff)
* The PS/2 mux on the BMS2003 board needs 450 ms after power on
before we can access it; add delay in case we are faster (with no CF card inserted) * Cleanup of some init functions * Make sure SCC Ethernet is always stopped by the time we boot Linux to avoid Linux crashes by early packets coming in. * Accelerate flash accesses on LWMON board by using buffered writes
Diffstat (limited to 'board')
-rw-r--r--board/LEOX/elpt860/elpt860.c4
-rw-r--r--board/MAI/AmigaOneG3SE/articiaS.c2
-rw-r--r--board/Marvell/common/bootseq.txt2
-rw-r--r--board/Marvell/db64360/db64360.c6
-rw-r--r--board/Marvell/db64460/db64460.c6
-rw-r--r--board/altera/dk1c20/dk1c20.c2
-rw-r--r--board/altera/dk1s10/dk1s10.c2
-rw-r--r--board/bubinga405ep/bubinga405ep.c2
-rw-r--r--board/cpc45/cpc45.c2
-rw-r--r--board/cradle/cradle.c2
-rw-r--r--board/cray/L1/L1.c2
-rw-r--r--board/dave/PPChameleonEVB/PPChameleonEVB.c2
-rw-r--r--board/ebony/ebony.c2
-rw-r--r--board/eltec/mhpc/mhpc.c2
-rw-r--r--board/ep8260/ep8260.c2
-rw-r--r--board/eric/eric.c2
-rw-r--r--board/esd/adciop/adciop.c2
-rw-r--r--board/esd/ar405/ar405.c2
-rw-r--r--board/esd/ash405/ash405.c2
-rw-r--r--board/esd/canbt/canbt.c2
-rw-r--r--board/esd/cpci405/cpci405.c2
-rw-r--r--board/esd/cpci440/cpci440.c2
-rw-r--r--board/esd/cpciiser4/cpciiser4.c2
-rw-r--r--board/esd/dasa_sim/dasa_sim.c2
-rw-r--r--board/esd/dp405/dp405.c2
-rw-r--r--board/esd/du405/du405.c2
-rw-r--r--board/esd/hub405/hub405.c2
-rw-r--r--board/esd/ocrtc/ocrtc.c2
-rw-r--r--board/esd/pci405/pci405.c2
-rw-r--r--board/esd/plu405/plu405.c2
-rw-r--r--board/esd/pmc405/pmc405.c2
-rw-r--r--board/esd/voh405/voh405.c2
-rw-r--r--board/evb64260/bootseq.txt2
-rw-r--r--board/evb64260/evb64260.c6
-rw-r--r--board/exbitgen/exbitgen.c2
-rw-r--r--board/ip860/ip860.c2
-rw-r--r--board/ixdp425/ixdp425.c2
-rw-r--r--board/lubbock/lubbock.c8
-rw-r--r--board/lwmon/flash.c89
-rw-r--r--board/lwmon/lwmon.c6
-rw-r--r--board/ml2/ml2.c2
-rw-r--r--board/mpc8260ads/mpc8260ads.c2
-rw-r--r--board/mpc8266ads/mpc8266ads.c2
-rw-r--r--board/mpc8540ads/mpc8540ads.c2
-rw-r--r--board/mpc8560ads/mpc8560ads.c2
-rw-r--r--board/mpl/mip405/mip405.c2
-rw-r--r--board/mpl/pip405/pip405.c2
-rw-r--r--board/netvia/netvia.c2
-rw-r--r--board/oxc/oxc.c2
-rw-r--r--board/pcippc2/pcippc2.c2
-rw-r--r--board/rpxsuper/rpxsuper.c2
-rw-r--r--board/siemens/IAD210/IAD210.c2
-rw-r--r--board/tqm8xx/tqm8xx.c8
-rw-r--r--board/w7o/w7o.c2
-rw-r--r--board/walnut405/walnut405.c2
55 files changed, 153 insertions, 74 deletions
diff --git a/board/LEOX/elpt860/elpt860.c b/board/LEOX/elpt860/elpt860.c
index c8bc41a9b1d..82a831f5245 100644
--- a/board/LEOX/elpt860/elpt860.c
+++ b/board/LEOX/elpt860/elpt860.c
@@ -33,7 +33,7 @@
/*
** Note 1: In this file, you have to provide the following functions:
** ------
-** int board_pre_init(void)
+** int board_early_init_f(void)
** int checkboard(void)
** long int initdram(int board_type)
** called from 'board_init_f()' into 'common/board.c'
@@ -145,7 +145,7 @@ const uint sdram_table[] = {
/*
* Very early board init code (fpga boot, etc.)
*/
-int board_pre_init (void)
+int board_early_init_f (void)
{
volatile immap_t *immr = (immap_t *) CFG_IMMR;
diff --git a/board/MAI/AmigaOneG3SE/articiaS.c b/board/MAI/AmigaOneG3SE/articiaS.c
index 9fd6b95822f..a4dad6486b0 100644
--- a/board/MAI/AmigaOneG3SE/articiaS.c
+++ b/board/MAI/AmigaOneG3SE/articiaS.c
@@ -675,7 +675,7 @@ static __inline__ void set_msr (unsigned long msr)
asm volatile ("mtmsr %0"::"r" (msr));
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
unsigned char c_value = 0;
unsigned long msr;
diff --git a/board/Marvell/common/bootseq.txt b/board/Marvell/common/bootseq.txt
index 648c2ff7913..391d49a1190 100644
--- a/board/Marvell/common/bootseq.txt
+++ b/board/Marvell/common/bootseq.txt
@@ -58,7 +58,7 @@ in_flash:
call cpu_init_f
debug leds
board_init_f: (common/board.c)
- board_pre_init:
+ board_early_init_f:
remap gt regs?
map PCI mem/io
map device space
diff --git a/board/Marvell/db64360/db64360.c b/board/Marvell/db64360/db64360.c
index 438700a50fd..7cadafd688a 100644
--- a/board/Marvell/db64360/db64360.c
+++ b/board/Marvell/db64360/db64360.c
@@ -61,7 +61,7 @@ extern void invalidate_l1_instruction_cache (void);
/* Unfortunately, we cant change it while we are in flash, so we initialize it
* to the "final" value. This means that any debug_led calls before
- * board_pre_init wont work right (like in cpu_init_f).
+ * board_early_init_f wont work right (like in cpu_init_f).
* See also my_remap_gt_regs below. (NTL)
*/
@@ -237,11 +237,11 @@ static void gt_cpu_config (void)
}
/*
- * board_pre_init.
+ * board_early_init_f.
*
* set up gal. device mappings, etc.
*/
-int board_pre_init (void)
+int board_early_init_f (void)
{
uchar sram_boot = 0;
diff --git a/board/Marvell/db64460/db64460.c b/board/Marvell/db64460/db64460.c
index 572dc47702d..85b2331c919 100644
--- a/board/Marvell/db64460/db64460.c
+++ b/board/Marvell/db64460/db64460.c
@@ -61,7 +61,7 @@ extern void invalidate_l1_instruction_cache (void);
/* Unfortunately, we cant change it while we are in flash, so we initialize it
* to the "final" value. This means that any debug_led calls before
- * board_pre_init wont work right (like in cpu_init_f).
+ * board_early_init_f wont work right (like in cpu_init_f).
* See also my_remap_gt_regs below. (NTL)
*/
@@ -237,11 +237,11 @@ static void gt_cpu_config (void)
}
/*
- * board_pre_init.
+ * board_early_init_f.
*
* set up gal. device mappings, etc.
*/
-int board_pre_init (void)
+int board_early_init_f (void)
{
uchar sram_boot = 0;
diff --git a/board/altera/dk1c20/dk1c20.c b/board/altera/dk1c20/dk1c20.c
index 96f1ecef6b8..3954486791a 100644
--- a/board/altera/dk1c20/dk1c20.c
+++ b/board/altera/dk1c20/dk1c20.c
@@ -31,7 +31,7 @@ void _default_hdlr (void)
printf ("default_hdlr\n");
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
/* init seven segment led display and switch off */
sevenseg_set(SEVENSEG_OFF);
diff --git a/board/altera/dk1s10/dk1s10.c b/board/altera/dk1s10/dk1s10.c
index 6d7be2d7cca..832a0b9dd8a 100644
--- a/board/altera/dk1s10/dk1s10.c
+++ b/board/altera/dk1s10/dk1s10.c
@@ -31,7 +31,7 @@ void _default_hdlr (void)
printf ("default_hdlr\n");
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
/* init seven segment led display and switch off */
sevenseg_set(SEVENSEG_OFF);
diff --git a/board/bubinga405ep/bubinga405ep.c b/board/bubinga405ep/bubinga405ep.c
index f73b1662d17..0be79650794 100644
--- a/board/bubinga405ep/bubinga405ep.c
+++ b/board/bubinga405ep/bubinga405ep.c
@@ -26,7 +26,7 @@ long int spd_sdram (void);
#include <asm/processor.h>
-int board_pre_init (void)
+int board_early_init_f (void)
{
mtdcr (uicsr, 0xFFFFFFFF); /* clear all ints */
mtdcr (uicer, 0x00000000); /* disable all ints */
diff --git a/board/cpc45/cpc45.c b/board/cpc45/cpc45.c
index 455cc12d00c..f44a59dbb04 100644
--- a/board/cpc45/cpc45.c
+++ b/board/cpc45/cpc45.c
@@ -32,7 +32,7 @@ extern void Plx9030Init(void);
/* We have to clear the initial data area here. Couldn't have done it
* earlier because DRAM had not been initialized.
*/
-int board_pre_init(void)
+int board_early_init_f(void)
{
/* enable DUAL UART Mode on CPC45 */
diff --git a/board/cradle/cradle.c b/board/cradle/cradle.c
index f599a315aeb..f5c99b15f07 100644
--- a/board/cradle/cradle.c
+++ b/board/cradle/cradle.c
@@ -170,7 +170,7 @@ init_sio (int led, unsigned long base)
int
/**********************************************************/
-board_post_init (void)
+board_late_init (void)
/**********************************************************/
{
return (0);
diff --git a/board/cray/L1/L1.c b/board/cray/L1/L1.c
index af0456de069..fb28c42a552 100644
--- a/board/cray/L1/L1.c
+++ b/board/cray/L1/L1.c
@@ -109,7 +109,7 @@ extern char bootscript[];
static void init_sdram (void);
/* ------------------------------------------------------------------------- */
-int board_pre_init (void)
+int board_early_init_f (void)
{
/* Running from ROM: global data is still READONLY */
init_sdram ();
diff --git a/board/dave/PPChameleonEVB/PPChameleonEVB.c b/board/dave/PPChameleonEVB/PPChameleonEVB.c
index 61f7031b21d..603bb1e12a3 100644
--- a/board/dave/PPChameleonEVB/PPChameleonEVB.c
+++ b/board/dave/PPChameleonEVB/PPChameleonEVB.c
@@ -51,7 +51,7 @@ const unsigned char fpgadata[] =
int gunzip(void *, int, unsigned char *, int *);
-int board_pre_init (void)
+int board_early_init_f (void)
{
out32(GPIO0_OR, CFG_NAND0_CE); /* set initial outputs */
out32(GPIO0_OR, CFG_NAND1_CE); /* set initial outputs */
diff --git a/board/ebony/ebony.c b/board/ebony/ebony.c
index bb284ae80e9..a5b3fb6538c 100644
--- a/board/ebony/ebony.c
+++ b/board/ebony/ebony.c
@@ -32,7 +32,7 @@
long int fixed_sdram (void);
-int board_pre_init (void)
+int board_early_init_f (void)
{
uint reg;
unsigned char *fpga_base = (unsigned char *) CFG_FPGA_BASE;
diff --git a/board/eltec/mhpc/mhpc.c b/board/eltec/mhpc/mhpc.c
index f084ce3e5cb..76f9f372b1c 100644
--- a/board/eltec/mhpc/mhpc.c
+++ b/board/eltec/mhpc/mhpc.c
@@ -104,7 +104,7 @@ static const unsigned int sdram_table[] =
/* ------------------------------------------------------------------------- */
-int board_pre_init (void)
+int board_early_init_f (void)
{
volatile immap_t *im = (immap_t *)CFG_IMMR;
volatile cpm8xx_t *cp = &(im->im_cpm);
diff --git a/board/ep8260/ep8260.c b/board/ep8260/ep8260.c
index a49c53e7c4d..7a2c23f9f7f 100644
--- a/board/ep8260/ep8260.c
+++ b/board/ep8260/ep8260.c
@@ -188,7 +188,7 @@ const iop_conf_t iop_conf_tab[4][32] = {
* Setup CS4 to enable the Board Control/Status registers.
* Otherwise the smcs won't work.
*/
-int board_pre_init (void)
+int board_early_init_f (void)
{
volatile t_ep_regs *regs = (t_ep_regs*)CFG_REGS_BASE;
volatile immap_t *immap = (immap_t *)CFG_IMMR;
diff --git a/board/eric/eric.c b/board/eric/eric.c
index 17fe6acea6d..860e5064b84 100644
--- a/board/eric/eric.c
+++ b/board/eric/eric.c
@@ -31,7 +31,7 @@
#define IBM405GP_GPIO0_ODR 0xef600718 /* GPIO Open Drain */
#define IBM405GP_GPIO0_IR 0xef60071c /* GPIO Input */
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*-------------------------------------------------------------------------+
diff --git a/board/esd/adciop/adciop.c b/board/esd/adciop/adciop.c
index 0c12e987fe6..93bc8431bf9 100644
--- a/board/esd/adciop/adciop.c
+++ b/board/esd/adciop/adciop.c
@@ -31,7 +31,7 @@
/* ------------------------------------------------------------------------- */
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*
* Set port pin in escc2 to keep living, and configure user led output
diff --git a/board/esd/ar405/ar405.c b/board/esd/ar405/ar405.c
index d0b06e64879..6535a19d7f8 100644
--- a/board/esd/ar405/ar405.c
+++ b/board/esd/ar405/ar405.c
@@ -46,7 +46,7 @@ const unsigned char fpgadata[] = {
#include "../common/fpga.c"
-int board_pre_init (void)
+int board_early_init_f (void)
{
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/esd/ash405/ash405.c b/board/esd/ash405/ash405.c
index 39b2dfcfc42..22b38285995 100644
--- a/board/esd/ash405/ash405.c
+++ b/board/esd/ash405/ash405.c
@@ -50,7 +50,7 @@ const unsigned char fpgadata[] =
int gunzip(void *, int, unsigned char *, int *);
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*
* IRQ 0-15 405GP internally generated; active high; level sensitive
diff --git a/board/esd/canbt/canbt.c b/board/esd/canbt/canbt.c
index ae0e8805f24..ab492497025 100644
--- a/board/esd/canbt/canbt.c
+++ b/board/esd/canbt/canbt.c
@@ -48,7 +48,7 @@ const unsigned char fpgadata[] = {
#include "../common/fpga.c"
-int board_pre_init (void)
+int board_early_init_f (void)
{
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c
index 461e3a5e04f..1b90d0542a3 100644
--- a/board/esd/cpci405/cpci405.c
+++ b/board/esd/cpci405/cpci405.c
@@ -57,7 +57,7 @@ int cpci405_version(void);
int gunzip(void *, int, unsigned char *, int *);
-int board_pre_init (void)
+int board_early_init_f (void)
{
#ifndef CONFIG_CPCI405_VER2
int index, len, i;
diff --git a/board/esd/cpci440/cpci440.c b/board/esd/cpci440/cpci440.c
index 66cfe0648fe..20c830343bd 100644
--- a/board/esd/cpci440/cpci440.c
+++ b/board/esd/cpci440/cpci440.c
@@ -28,7 +28,7 @@
long int fixed_sdram( void );
-int board_pre_init (void)
+int board_early_init_f (void)
{
uint reg;
diff --git a/board/esd/cpciiser4/cpciiser4.c b/board/esd/cpciiser4/cpciiser4.c
index 725abe9e1f9..e90f4ea33f0 100644
--- a/board/esd/cpciiser4/cpciiser4.c
+++ b/board/esd/cpciiser4/cpciiser4.c
@@ -52,7 +52,7 @@ const unsigned char fpgadata[] = {
#include "../common/fpga.c"
-int board_pre_init (void)
+int board_early_init_f (void)
{
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/esd/dasa_sim/dasa_sim.c b/board/esd/dasa_sim/dasa_sim.c
index c1b90938b1d..57a971f433c 100644
--- a/board/esd/dasa_sim/dasa_sim.c
+++ b/board/esd/dasa_sim/dasa_sim.c
@@ -137,7 +137,7 @@ static int fpgaBoot (void)
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*
* Init pci regs
diff --git a/board/esd/dp405/dp405.c b/board/esd/dp405/dp405.c
index 6d99b60130e..84a4a336c75 100644
--- a/board/esd/dp405/dp405.c
+++ b/board/esd/dp405/dp405.c
@@ -35,7 +35,7 @@ const unsigned char fpgadata[] =
int filesize = sizeof(fpgadata);
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*
* IRQ 0-15 405GP internally generated; active high; level sensitive
diff --git a/board/esd/du405/du405.c b/board/esd/du405/du405.c
index 7b430ea254d..6e43bb0b8aa 100644
--- a/board/esd/du405/du405.c
+++ b/board/esd/du405/du405.c
@@ -53,7 +53,7 @@ const unsigned char fpgadata[] = {
#include "../common/fpga.c"
-int board_pre_init (void)
+int board_early_init_f (void)
{
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/esd/hub405/hub405.c b/board/esd/hub405/hub405.c
index ba8e8e331a1..d8e3be23188 100644
--- a/board/esd/hub405/hub405.c
+++ b/board/esd/hub405/hub405.c
@@ -29,7 +29,7 @@
/* ------------------------------------------------------------------------- */
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*
* IRQ 0-15 405GP internally generated; active high; level sensitive
diff --git a/board/esd/ocrtc/ocrtc.c b/board/esd/ocrtc/ocrtc.c
index 0600273eb48..dc425ae2be8 100644
--- a/board/esd/ocrtc/ocrtc.c
+++ b/board/esd/ocrtc/ocrtc.c
@@ -29,7 +29,7 @@
/* ------------------------------------------------------------------------- */
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*
* IRQ 0-15 405GP internally generated; active high; level sensitive
diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c
index cc45fa909f5..44bfe107feb 100644
--- a/board/esd/pci405/pci405.c
+++ b/board/esd/pci405/pci405.c
@@ -53,7 +53,7 @@ const unsigned char fpgadata[] =
int gunzip(void *, int, unsigned char *, int *);
-int board_pre_init (void)
+int board_early_init_f (void)
{
unsigned long cntrl0Reg;
diff --git a/board/esd/plu405/plu405.c b/board/esd/plu405/plu405.c
index 2efd56d5c02..ebefa670ff7 100644
--- a/board/esd/plu405/plu405.c
+++ b/board/esd/plu405/plu405.c
@@ -50,7 +50,7 @@ const unsigned char fpgadata[] =
int gunzip(void *, int, unsigned char *, int *);
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*
* IRQ 0-15 405GP internally generated; active high; level sensitive
diff --git a/board/esd/pmc405/pmc405.c b/board/esd/pmc405/pmc405.c
index 5410a56c53c..6d2432cb3c7 100644
--- a/board/esd/pmc405/pmc405.c
+++ b/board/esd/pmc405/pmc405.c
@@ -35,7 +35,7 @@ const unsigned char fpgadata[] =
int filesize = sizeof(fpgadata);
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*
* IRQ 0-15 405GP internally generated; active high; level sensitive
diff --git a/board/esd/voh405/voh405.c b/board/esd/voh405/voh405.c
index d951138d858..d62c570b261 100644
--- a/board/esd/voh405/voh405.c
+++ b/board/esd/voh405/voh405.c
@@ -50,7 +50,7 @@ const unsigned char fpgadata[] =
int gunzip(void *, int, unsigned char *, int *);
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*
* IRQ 0-15 405GP internally generated; active high; level sensitive
diff --git a/board/evb64260/bootseq.txt b/board/evb64260/bootseq.txt
index 648c2ff7913..391d49a1190 100644
--- a/board/evb64260/bootseq.txt
+++ b/board/evb64260/bootseq.txt
@@ -58,7 +58,7 @@ in_flash:
call cpu_init_f
debug leds
board_init_f: (common/board.c)
- board_pre_init:
+ board_early_init_f:
remap gt regs?
map PCI mem/io
map device space
diff --git a/board/evb64260/evb64260.c b/board/evb64260/evb64260.c
index 99717beb0bb..6a9d1645694 100644
--- a/board/evb64260/evb64260.c
+++ b/board/evb64260/evb64260.c
@@ -57,7 +57,7 @@ extern void zuma_mbox_init(void);
/* Unfortunately, we cant change it while we are in flash, so we initialize it
* to the "final" value. This means that any debug_led calls before
- * board_pre_init wont work right (like in cpu_init_f).
+ * board_early_init_f wont work right (like in cpu_init_f).
* See also my_remap_gt_regs below. (NTL)
*/
@@ -182,11 +182,11 @@ gt_cpu_config(void)
}
/*
- * board_pre_init.
+ * board_early_init_f.
*
* set up gal. device mappings, etc.
*/
-int board_pre_init (void)
+int board_early_init_f (void)
{
uchar sram_boot = 0;
diff --git a/board/exbitgen/exbitgen.c b/board/exbitgen/exbitgen.c
index f2cd8caec06..39a97225f8c 100644
--- a/board/exbitgen/exbitgen.c
+++ b/board/exbitgen/exbitgen.c
@@ -4,7 +4,7 @@
#include "exbitgen.h"
/* ************************************************************************ */
-int board_pre_init (void)
+int board_early_init_f (void)
/* ------------------------------------------------------------------------ --
* Purpose :
* Remarks :
diff --git a/board/ip860/ip860.c b/board/ip860/ip860.c
index d66621cdf15..5b634e459f5 100644
--- a/board/ip860/ip860.c
+++ b/board/ip860/ip860.c
@@ -85,7 +85,7 @@ const uint sdram_table[] = {
/* ------------------------------------------------------------------------- */
-int board_pre_init(void)
+int board_early_init_f(void)
{
volatile immap_t *immap = (immap_t *)CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
diff --git a/board/ixdp425/ixdp425.c b/board/ixdp425/ixdp425.c
index 22617b371ca..1b34f96027f 100644
--- a/board/ixdp425/ixdp425.c
+++ b/board/ixdp425/ixdp425.c
@@ -40,7 +40,7 @@
int
/**********************************************************/
-board_post_init (void)
+board_late_init (void)
/**********************************************************/
{
return (0);
diff --git a/board/lubbock/lubbock.c b/board/lubbock/lubbock.c
index dcb5087030c..353c7224653 100644
--- a/board/lubbock/lubbock.c
+++ b/board/lubbock/lubbock.c
@@ -50,10 +50,10 @@ int board_init (void)
return 0;
}
-int board_post_init(void)
+int board_late_init(void)
{
- setenv("stdout", "serial");
- setenv("stderr", "serial");
+ setenv("stdout", "serial");
+ setenv("stderr", "serial");
return 0;
}
@@ -71,5 +71,5 @@ int dram_init (void)
gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
- return 0;
+ return 0;
}
diff --git a/board/lwmon/flash.c b/board/lwmon/flash.c
index 127738a4bb5..4004865c315 100644
--- a/board/lwmon/flash.c
+++ b/board/lwmon/flash.c
@@ -47,6 +47,9 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
*/
static ulong flash_get_size (vu_long *addr, flash_info_t *info);
static int write_data (flash_info_t *info, ulong dest, ulong data);
+#ifdef CFG_FLASH_USE_BUFFER_WRITE
+static int write_data_buf (flash_info_t * info, ulong dest, uchar * cp, int len);
+#endif
static void flash_get_offsets (ulong base, flash_info_t *info);
/*-----------------------------------------------------------------------
@@ -480,6 +483,17 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
/*
* handle FLASH_WIDTH aligned part
*/
+#ifdef CFG_FLASH_USE_BUFFER_WRITE
+ while(cnt >= FLASH_WIDTH) {
+ i = CFG_FLASH_BUFFER_SIZE > cnt ?
+ (cnt & ~(FLASH_WIDTH - 1)) : CFG_FLASH_BUFFER_SIZE;
+ if((rc = write_data_buf(info, wp, src,i)) != 0)
+ return rc;
+ wp += i;
+ src += i;
+ cnt -=i;
+ }
+#else
while (cnt >= FLASH_WIDTH) {
data = 0;
for (i=0; i<FLASH_WIDTH; ++i) {
@@ -491,6 +505,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
wp += FLASH_WIDTH;
cnt -= FLASH_WIDTH;
}
+#endif /* CFG_FLASH_USE_BUFFER_WRITE */
if (cnt == 0) {
return (0);
@@ -512,6 +527,28 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
}
/*-----------------------------------------------------------------------
+ * Check flash status, returns:
+ * 0 - OK
+ * 1 - timeout
+ */
+static int flash_status_check(vu_long *addr, ulong tout, char * prompt)
+{
+ ulong status;
+ ulong start;
+
+ /* Wait for command completion */
+ start = get_timer (0);
+ while(((status = *addr) & 0x00800080) != 0x00800080) {
+ if (get_timer(start) > tout) {
+ printf("Flash %s timeout at address %p\n", prompt, addr);
+ *addr = 0x00FF00FF; /* restore read mode */
+ return (1);
+ }
+ }
+ return 0;
+}
+
+/*-----------------------------------------------------------------------
* Write a word to Flash, returns:
* 0 - OK
* 1 - write timeout
@@ -520,8 +557,6 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
static int write_data (flash_info_t *info, ulong dest, ulong data)
{
vu_long *addr = (vu_long *)dest;
- ulong status;
- ulong start;
int flag;
/* Check if Flash is (sufficiently) erased */
@@ -538,13 +573,8 @@ static int write_data (flash_info_t *info, ulong dest, ulong data)
if (flag)
enable_interrupts();
- start = get_timer (0);
-
- while (((status = *addr) & 0x00800080) != 0x00800080) {
- if (get_timer(start) > CFG_FLASH_WRITE_TOUT) {
- *addr = 0x00FF00FF; /* restore read mode */
- return (1);
- }
+ if (flash_status_check(addr, CFG_FLASH_WRITE_TOUT, "write") != 0) {
+ return (1);
}
*addr = 0x00FF00FF; /* restore read mode */
@@ -552,5 +582,46 @@ static int write_data (flash_info_t *info, ulong dest, ulong data)
return (0);
}
+#ifdef CFG_FLASH_USE_BUFFER_WRITE
+/*-----------------------------------------------------------------------
+ * Write a buffer to Flash, returns:
+ * 0 - OK
+ * 1 - write timeout
+ */
+static int write_data_buf(flash_info_t * info, ulong dest, uchar * cp, int len)
+{
+ vu_long *addr = (vu_long *)dest;
+ int sector;
+ int cnt;
+ int retcode;
+ vu_long * src = (vu_long *)cp;
+ vu_long * dst = (vu_long *)dest;
+
+ /* find sector */
+ for(sector = info->sector_count - 1; sector >= 0; sector--) {
+ if(dest >= info->start[sector])
+ break;
+ }
+
+ *addr = 0x00500050; /* clear status */
+ *addr = 0x00e800e8; /* write buffer */
+
+ if((retcode = flash_status_check(addr, CFG_FLASH_BUFFER_WRITE_TOUT,
+ "write to buffer")) == 0) {
+ cnt = len / FLASH_WIDTH;
+ *addr = (cnt-1) | ((cnt-1) << 16);
+ while(cnt-- > 0) {
+ *dst++ = *src++;
+ }
+ *addr = 0x00d000d0; /* write buffer confirm */
+ retcode = flash_status_check(addr, CFG_FLASH_BUFFER_WRITE_TOUT,
+ "buffer write");
+ }
+ *addr = 0x00FF00FF; /* restore read mode */
+ *addr = 0x00500050; /* clear status */
+ return retcode;
+}
+#endif /* CFG_USE_FLASH_BUFFER_WRITE */
+
/*-----------------------------------------------------------------------
*/
diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c
index 3ec9fa55113..6776dbf4740 100644
--- a/board/lwmon/lwmon.c
+++ b/board/lwmon/lwmon.c
@@ -339,14 +339,14 @@ static long int dram_size (long int mamr_value, long int *base, long int maxsize
#endif
/***********************************************************************
-F* Function: int board_pre_init (void) P*A*Z*
+F* Function: int board_early_init_f (void) P*A*Z*
*
P* Parameters: none
P*
P* Returnvalue: int
P* - 0 is always returned.
*
-Z* Intention: This function is the board_pre_init() method implementation
+Z* Intention: This function is the board_early_init_f() method implementation
Z* for the lwmon board.
Z* Disable Ethernet TENA on Port B.
*
@@ -354,7 +354,7 @@ D* Design: wd@denx.de
C* Coding: wd@denx.de
V* Verification: dzu@denx.de
***********************************************************************/
-int board_pre_init (void)
+int board_early_init_f (void)
{
volatile immap_t *immr = (immap_t *) CFG_IMMR;
diff --git a/board/ml2/ml2.c b/board/ml2/ml2.c
index 6cc1bec0667..ff5f8167962 100644
--- a/board/ml2/ml2.c
+++ b/board/ml2/ml2.c
@@ -22,7 +22,7 @@
#include <asm/processor.h>
-int board_pre_init (void)
+int board_early_init_f (void)
{
return 0;
}
diff --git a/board/mpc8260ads/mpc8260ads.c b/board/mpc8260ads/mpc8260ads.c
index 3de0387321b..67a75230ed1 100644
--- a/board/mpc8260ads/mpc8260ads.c
+++ b/board/mpc8260ads/mpc8260ads.c
@@ -225,7 +225,7 @@ void reset_phy (void)
#endif /* CONFIG_MII */
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
vu_long *bcsr = (vu_long *)CFG_BCSR;
diff --git a/board/mpc8266ads/mpc8266ads.c b/board/mpc8266ads/mpc8266ads.c
index e2c98b1b047..8f7273c41d8 100644
--- a/board/mpc8266ads/mpc8266ads.c
+++ b/board/mpc8266ads/mpc8266ads.c
@@ -232,7 +232,7 @@ void reset_phy(void)
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
volatile bcsr_t *bcsr = (bcsr_t *)CFG_BCSR;
volatile pci_ic_t *pci_ic = (pci_ic_t *) CFG_PCI_INT;
diff --git a/board/mpc8540ads/mpc8540ads.c b/board/mpc8540ads/mpc8540ads.c
index c21cd9e9850..0644de88256 100644
--- a/board/mpc8540ads/mpc8540ads.c
+++ b/board/mpc8540ads/mpc8540ads.c
@@ -47,7 +47,7 @@ typedef struct bscr_ {
} bcsr_t;
#endif
-int board_pre_init (void)
+int board_early_init_f (void)
{
#if defined(CONFIG_PCI)
volatile immap_t *immr = (immap_t *)CFG_IMMR;
diff --git a/board/mpc8560ads/mpc8560ads.c b/board/mpc8560ads/mpc8560ads.c
index 5567b699d69..823ab0d2ab1 100644
--- a/board/mpc8560ads/mpc8560ads.c
+++ b/board/mpc8560ads/mpc8560ads.c
@@ -199,7 +199,7 @@ typedef struct bscr_ {
volatile unsigned char bcsr5;
} bcsr_t;
-int board_pre_init (void)
+int board_early_init_f (void)
{
#if defined(CONFIG_PCI)
volatile immap_t *immr = (immap_t *)CFG_IMMR;
diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c
index c1471751c93..709e1a4d623 100644
--- a/board/mpl/mip405/mip405.c
+++ b/board/mpl/mip405/mip405.c
@@ -469,7 +469,7 @@ int init_sdram (void)
return (0);
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
init_sdram ();
diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index b4715aada36..590bd20ff0f 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -176,7 +176,7 @@ void write_4hex (unsigned long val)
#endif
-int board_pre_init (void)
+int board_early_init_f (void)
{
unsigned char dataout[1];
unsigned char datain[128];
diff --git a/board/netvia/netvia.c b/board/netvia/netvia.c
index db36b228b4a..fb7f7700cff 100644
--- a/board/netvia/netvia.c
+++ b/board/netvia/netvia.c
@@ -356,7 +356,7 @@ int misc_init_r(void)
#error Unknown NETVIA board version.
#endif
-int board_pre_init(void)
+int board_early_init_f(void)
{
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile iop8xx_t *ioport = &immap->im_ioport;
diff --git a/board/oxc/oxc.c b/board/oxc/oxc.c
index 8ac0e79a021..fa7ff0215c0 100644
--- a/board/oxc/oxc.c
+++ b/board/oxc/oxc.c
@@ -87,7 +87,7 @@ void pci_init_board (void)
pci_mpc824x_init(&hose);
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
*(volatile unsigned char *)(CFG_CPLD_RESET) = 0x89;
return 0;
diff --git a/board/pcippc2/pcippc2.c b/board/pcippc2/pcippc2.c
index a0fe39a1e90..231b50576b3 100644
--- a/board/pcippc2/pcippc2.c
+++ b/board/pcippc2/pcippc2.c
@@ -75,7 +75,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return (-1);
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
out32 (REG (CPC0, RSTR), 0xC0000000);
iobarrier_rw ();
diff --git a/board/rpxsuper/rpxsuper.c b/board/rpxsuper/rpxsuper.c
index 50b3c5cac67..b4331f1cdea 100644
--- a/board/rpxsuper/rpxsuper.c
+++ b/board/rpxsuper/rpxsuper.c
@@ -191,7 +191,7 @@ const iop_conf_t iop_conf_tab[4][32] = {
* Setup CS4 to enable the Board Control/Status registers.
* Otherwise the smcs won't work.
*/
-int board_pre_init (void)
+int board_early_init_f (void)
{
volatile t_rpx_regs *regs = (t_rpx_regs*)CFG_REGS_BASE;
volatile immap_t *immap = (immap_t *)CFG_IMMR;
diff --git a/board/siemens/IAD210/IAD210.c b/board/siemens/IAD210/IAD210.c
index 1243887a3ec..52cd4e6fa75 100644
--- a/board/siemens/IAD210/IAD210.c
+++ b/board/siemens/IAD210/IAD210.c
@@ -228,7 +228,7 @@ void board_ether_init (void)
iop->iop_pdpar |= 0x0080; /* set pin as MII_clock */
}
-int board_pre_init (void)
+int board_early_init_f (void)
{
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile cpmtimer8xx_t *timers = &immap->im_cpmtimer;
diff --git a/board/tqm8xx/tqm8xx.c b/board/tqm8xx/tqm8xx.c
index 1fbceb56b5e..73bee323073 100644
--- a/board/tqm8xx/tqm8xx.c
+++ b/board/tqm8xx/tqm8xx.c
@@ -419,6 +419,14 @@ struct serial_state rs_table[] = {
{ BASE_BAUD, 6, (void*)0xec160000 },
{ BASE_BAUD, 10, (void*)0xec170000 },
};
+
+#ifdef CONFIG_BOARD_EARLY_INIT_R
+int board_early_init_r (void)
+{
+ ps2mult_early_init();
+ return (0);
+}
+#endif
#endif /* CONFIG_BMS2003 */
#endif /* CONFIG_PS2MULT */
diff --git a/board/w7o/w7o.c b/board/w7o/w7o.c
index 924a449eb88..1e3ceb20d65 100644
--- a/board/w7o/w7o.c
+++ b/board/w7o/w7o.c
@@ -41,7 +41,7 @@ unsigned long get_dram_size (void);
/* ------------------------------------------------------------------------- */
-int board_pre_init (void)
+int board_early_init_f (void)
{
#if defined(CONFIG_W7OLMG)
/*
diff --git a/board/walnut405/walnut405.c b/board/walnut405/walnut405.c
index 1d02ad4b1bf..7035599e903 100644
--- a/board/walnut405/walnut405.c
+++ b/board/walnut405/walnut405.c
@@ -26,7 +26,7 @@
#include <asm/processor.h>
#include <spd_sdram.h>
-int board_pre_init (void)
+int board_early_init_f (void)
{
/*-------------------------------------------------------------------------+
| Interrupt controller setup for the Walnut board.