#include <command.h>
#include <net.h>
+#include <serial.h>
#define MIN_PACKET_LENGTH 64
#define MAX_PACKET_LENGTH 256
static char *ctlr_name[1] = { "SCC" };
-static int used_by_uart[1] = { -1 };
-
/* Ethernet Transmit and Receive Buffers */
#define DBUF_LENGTH 1520
*/
immr->im_cpm.cp_scc[scc_index].scc_gsmrl = (SCC_GSMRL_TCI |
- SCC_GSMRL_TPL_48 |
- SCC_GSMRL_TPP_10 |
- SCC_GSMRL_DIAG_LOOP |
- SCC_GSMRL_MODE_ENET);
+ SCC_GSMRL_TPL_48 |
+ SCC_GSMRL_TPP_10 |
+ SCC_GSMRL_DIAG_LOOP |
+ SCC_GSMRL_MODE_ENET);
/*
* Initialize the DSR -- see section 13.14.4 (pg. 513) v0.4
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)
rxIdx++;
}
- Done:
+Done:
return length;
}
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
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;
}
}
+#if !defined(CONFIG_8xx_CONS_NONE)
+ serial_reinit_all ();
+#endif
return res;
}