Modifications for 1.0.6:
======================================================================
+* Fix ethernet / MII problems for ICU862 board
+
* Fix memory controller initialization for ICU862 board
* Patch by Stefan Roese, 19 Sep 2001:
j = 0;
while ((rtx->txbd[txIdx].cbd_sc & BD_ENET_TX_READY) && (j<TOUT_LOOP)) {
+#if defined(CONFIG_ICU862)
+ udelay(10);
+#else
udelay(1);
+#endif
j++;
}
if (j>=TOUT_LOOP) {
{
int i;
-#ifndef CONFIG_ICU862
int busfreq;
-#endif
volatile immap_t *immr = (immap_t *) CFG_IMMR;
volatile fec_t *fecp = &(immr->im_cpm.cp_fec);
/* Enable MII mode
*/
-#if !defined(CONFIG_ICU862)
#if 0 /* Full duplex mode */
fecp->fec_r_cntrl = FEC_RCNTRL_MII_MODE;
fecp->fec_x_cntrl = FEC_TCNTRL_FDEN;
fecp->fec_r_cntrl = FEC_RCNTRL_MII_MODE | FEC_RCNTRL_DRT;
fecp->fec_x_cntrl = 0;
#endif
-#else /* defined(CONFIG_ICU862) */
- /* Full duplex mode */
- fecp->fec_r_cntrl = FEC_RCNTRL_MII_MODE;
- fecp->fec_x_cntrl = FEC_TCNTRL_FDEN;
-#endif /* !defined(CONFIG_ICU862) */
/* Enable big endian and don't care about SDMA FC.
*/
* This rounds up to a multiple of 5MHz so MII speed never
* exceeds 2.5MHz for 48 MHz and other non-multiples of 5MHz.
*/
-#if !defined(CONFIG_ICU862)
busfreq = (bd->bi_busfreq * 1000000 + 4999999) / 5000000;
fecp->fec_mii_speed = ((busfreq * 1000000) / 2500000) & 0x7e;
+#if !defined(CONFIG_ICU862)
/* Configure all of port D for MII.
*/
immr->im_ioport.iop_pdpar = 0x1fff;
immr->im_ioport.iop_pddir = 0x1fff; /* Rev. D and later */
}
#else /* defined(CONFIG_ICU862) */
- fecp->fec_mii_speed = 0x40;
- immr->im_ioport.utmode |= 0x80;
+ /* Configure PCMCIA PORT A for MII, UTOPIA is enabled.
+ */
+ immr->im_ioport.iop_pdpar |= 0x4080;
#endif /* !defined(CONFIG_ICU862) */
rxIdx = 0;
#undef CONFIG_SCC1_ENET /* disable SCC1 ethernet */
#define CONFIG_FEC_ENET 1 /* use FEC ethernet */
-#if 0
-#define CFG_DISCOVER_PHY
+#if 1
+#define CFG_DISCOVER_PHY 1
#else
#undef CFG_DISCOVER_PHY
#endif
SCCR_DFBRG00 | SCCR_DFNL000 | SCCR_DFNH000 | \
SCCR_DFLCD000 |SCCR_DFALCD00 )
+/*-----------------------------------------------------------------------
+ * RCCR - RISC Controller Configuration Register 19-4
+ *-----------------------------------------------------------------------
+ */
+/* +0x09C4 => DRQP = 10 (IDMA requests have lowest priority) */
+#define CFG_RCCR 0x0020
+
/*-----------------------------------------------------------------------
*
*-----------------------------------------------------------------------