summaryrefslogtreecommitdiff
path: root/post/ether.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-08-01 22:48:16 +0000
committerwdenk <wdenk>2004-08-01 22:48:16 +0000
commit281e00a3be453a169d854f824a460359d10f92bb (patch)
tree43dab398f1d6f601bb44df108427f7e0c611d68d /post/ether.c
parentcfca5e604d5692f081cc1a9185ca5dc6dc77599d (diff)
downloadu-boot-imx-281e00a3be453a169d854f824a460359d10f92bb.zip
u-boot-imx-281e00a3be453a169d854f824a460359d10f92bb.tar.gz
u-boot-imx-281e00a3be453a169d854f824a460359d10f92bb.tar.bz2
* Code cleanup
* Patch by Sascha Hauer, 28 Jun: - add generic support for Motorola i.MX architecture - add support for mx1ads, mx1fs2 and scb9328 boards * Patches by Marc Leeman, 23 Jul 2004: - Add define for the PCI/Memory Buffer Configuration Register - corrected comments in cpu/mpc824x/cpu_init.c * Add support for multiple serial interfaces (for example to allow modem dial-in / dial-out)
Diffstat (limited to 'post/ether.c')
-rw-r--r--post/ether.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/post/ether.c b/post/ether.c
index 47aa352..660620e 100644
--- a/post/ether.c
+++ b/post/ether.c
@@ -49,6 +49,7 @@
#include <command.h>
#include <net.h>
+#include <serial.h>
#define MIN_PACKET_LENGTH 64
#define MAX_PACKET_LENGTH 256
@@ -77,8 +78,6 @@ static struct {
static char *ctlr_name[1] = { "SCC" };
-static int used_by_uart[1] = { -1 };
-
/* Ethernet Transmit and Receive Buffers */
#define DBUF_LENGTH 1520
@@ -458,6 +457,7 @@ static void scc_halt (int scc_index)
immr->im_cpm.cp_scc[scc_index].scc_gsmrl &=
~(SCC_GSMRL_ENR | SCC_GSMRL_ENT);
+ immr->im_ioport.iop_pcso &= ~(PC_ENET_CLSN | PC_ENET_RENA);
}
static int scc_send (int index, volatile void *packet, int length)
@@ -513,7 +513,7 @@ static int scc_recv (int index, void *packet, int max_length)
rxIdx++;
}
- Done:
+Done:
return length;
}
@@ -579,16 +579,10 @@ static int test_ctlr (int ctlr, int index)
res = 0;
- Done:
+Done:
ctlr_proc[ctlr].halt (index);
-#if !defined(CONFIG_8xx_CONS_NONE)
- if (used_by_uart[ctlr] == index) {
- serial_init ();
- }
-#endif
-
/*
* SCC2 Ethernet parameter RAM space overlaps
* the SPI parameter RAM space. So we need to restore
@@ -614,16 +608,6 @@ int ether_post_test (int flags)
int res = 0;
int i;
-#if defined(CONFIG_8xx_CONS_SCC1)
- used_by_uart[CTLR_SCC] = 0;
-#elif defined(CONFIG_8xx_CONS_SCC2)
- used_by_uart[CTLR_SCC] = 1;
-#elif defined(CONFIG_8xx_CONS_SCC3)
- used_by_uart[CTLR_SCC] = 2;
-#elif defined(CONFIG_8xx_CONS_SCC4)
- used_by_uart[CTLR_SCC] = 3;
-#endif
-
ctlr_proc[CTLR_SCC].init = scc_init;
ctlr_proc[CTLR_SCC].halt = scc_halt;
ctlr_proc[CTLR_SCC].send = scc_send;
@@ -635,6 +619,9 @@ int ether_post_test (int flags)
}
}
+#if !defined(CONFIG_8xx_CONS_NONE)
+ serial_reinit_all ();
+#endif
return res;
}