* 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
This commit is contained in:
wdenk
2004-01-20 23:12:12 +00:00
parent b0aef11c9f
commit c837dcb1a3
128 changed files with 2360 additions and 2259 deletions

View File

@@ -70,6 +70,7 @@ static int ctlr_list[][2] = { };
static struct {
void (*init) (int index);
void (*halt) (int index);
int (*send) (int index, volatile void *packet, int length);
int (*recv) (int index, void *packet, int length);
} ctlr_proc[1];
@@ -77,7 +78,6 @@ static struct {
static char *ctlr_name[1] = { "SCC" };
static int used_by_uart[1] = { -1 };
static int used_by_ether[1] = { -1 };
/* Ethernet Transmit and Receive Buffers */
#define DBUF_LENGTH 1520
@@ -452,6 +452,14 @@ CPM_CR_CH_SCC4 };
#endif
}
static void scc_halt (int scc_index)
{
volatile immap_t *immr = (immap_t *) CFG_IMMR;
immr->im_cpm.cp_scc[scc_index].scc_gsmrl &=
~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
}
static int scc_send (int index, volatile void *packet, int length)
{
int i, j = 0;
@@ -573,20 +581,14 @@ static int test_ctlr (int ctlr, int index)
Done:
ctlr_proc[ctlr].halt (index);
#if !defined(CONFIG_8xx_CONS_NONE)
if (used_by_uart[ctlr] == index) {
serial_init ();
}
#endif
#if defined(SCC_ENET)
if (used_by_ether[ctlr] == index) {
DECLARE_GLOBAL_DATA_PTR;
eth_init (gd->bd);
}
#endif
/*
* SCC2 Ethernet parameter RAM space overlaps
* the SPI parameter RAM space. So we need to restore
@@ -622,11 +624,8 @@ int ether_post_test (int flags)
used_by_uart[CTLR_SCC] = 3;
#endif
#if defined(SCC_ENET)
used_by_ether[CTLR_SCC] = SCC_ENET;
#endif
ctlr_proc[CTLR_SCC].init = scc_init;
ctlr_proc[CTLR_SCC].halt = scc_halt;
ctlr_proc[CTLR_SCC].send = scc_send;
ctlr_proc[CTLR_SCC].recv = scc_recv;

View File

@@ -72,17 +72,14 @@ static struct {
static char *ctlr_name[2] = { "SMC", "SCC" };
static int used_by_uart[2] = { -1, -1 };
#if defined(SCC_ENET)
static int used_by_ether[2] = { -1, -1 };
#endif
static int proff_smc[] = { PROFF_SMC1, PROFF_SMC2 };
static int proff_scc[] =
{ PROFF_SCC1, PROFF_SCC2, PROFF_SCC3, PROFF_SCC4 };
/*
* SMC callbacks
*/
/*
* SMC callbacks
*/
static void smc_init (int smc_index)
{
@@ -523,14 +520,6 @@ static int test_ctlr (int ctlr, int index)
}
#endif
#if defined(SCC_ENET)
if (used_by_ether[ctlr] == index) {
DECLARE_GLOBAL_DATA_PTR;
eth_init (gd->bd);
}
#endif
if (res != 0) {
post_log ("uart %s%d test failed\n",
ctlr_name[ctlr], index + 1);
@@ -558,10 +547,6 @@ int uart_post_test (int flags)
used_by_uart[CTLR_SCC] = 3;
#endif
#if defined(SCC_ENET)
used_by_ether[CTLR_SCC] = SCC_ENET;
#endif
ctlr_proc[CTLR_SMC].init = smc_init;
ctlr_proc[CTLR_SMC].putc = smc_putc;
ctlr_proc[CTLR_SMC].getc = smc_getc;