]> git.sur5r.net Git - u-boot/blobdiff - cpu/mpc8260/ether_scc.c
Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash
[u-boot] / cpu / mpc8260 / ether_scc.c
index a733b45c01101444f196c29482c4e030095fe357..633d053914ec17f8b3f7b99f3d7e4ad09d6c0bb5 100644 (file)
@@ -36,7 +36,7 @@
 #include <command.h>
 #include <config.h>
 
-#if defined(CONFIG_ETHER_ON_SCC) && (CONFIG_COMMANDS & CFG_CMD_NET)
+#if defined(CONFIG_ETHER_ON_SCC) && defined(CONFIG_CMD_NET)
 
 #if (CONFIG_ETHER_INDEX == 1)
 #  define PROFF_ENET            PROFF_SCC1
@@ -77,7 +77,9 @@
 
 #define TX_BUF_CNT 2
 
-#define TOUT_LOOP 1000000
+#if !defined(CFG_SCC_TOUT_LOOP)
+  #define CFG_SCC_TOUT_LOOP 1000000
+#endif
 
 static char txbuf[TX_BUF_CNT][ DBUF_LENGTH ];
 
@@ -109,7 +111,7 @@ int eth_send(volatile void *packet, int length)
     }
 
     for(i=0; rtx->txbd[txIdx].cbd_sc & BD_ENET_TX_READY; i++) {
-       if (i >= TOUT_LOOP) {
+       if (i >= CFG_SCC_TOUT_LOOP) {
            puts ("scc: tx buffer not ready\n");
            goto out;
        }
@@ -121,7 +123,7 @@ int eth_send(volatile void *packet, int length)
                                BD_ENET_TX_WRAP);
 
     for(i=0; rtx->txbd[txIdx].cbd_sc & BD_ENET_TX_READY; i++) {
-       if (i >= TOUT_LOOP) {
+       if (i >= CFG_SCC_TOUT_LOOP) {
            puts ("scc: tx error\n");
            goto out;
        }
@@ -262,7 +264,6 @@ int eth_init(bd_t *bis)
     pram_ptr->sen_taddrm = 0x0;   /* Tmp Address (unused) */
     pram_ptr->sen_taddrl = 0x0;   /* Tmp Address (LSB) (unused) */
 
-
     /* 24.21 - (19): Initialize RxBD */
     for (i = 0; i < PKTBUFSRX; i++)
     {
@@ -353,4 +354,4 @@ void restart(void)
 }
 #endif
 
-#endif  /* CONFIG_ETHER_ON_SCC && CFG_CMD_NET */
+#endif