Mark,
Looking at the code below, once I call fnMIIwrite(), how would I know if link is established?
if (!(pars->usMode & (LAN_10M | LAN_100M))) {
usMIIData |= PHY_R0_RAN; // start autonegotiation
}
else {
if (pars->usMode & FULL_DUPLEX) {
usMIIData |= PHY_R0_DPLX; // set full duplex operation
}
else {
usMIIData &= ~PHY_R0_DPLX; // set half-duplex operation
}
if (pars->usMode & LAN_100M) {
usMIIData |= PHY_R0_DR; // set manual 100Mb
}
else {
usMIIData &= ~PHY_R0_DR; // set manual 10Mb
}
}
fnMIIwrite(PHY_ADDRESS, PHY_REG_CR, usMIIData); // command operating mode of PHY
Your system already seems to handle loosing link (hot unplug cable) and re-establishing link (hot plug cable). Is this not configuring the PHY each time?
Since this Freescale chip can not be guaranteed to auto negotiate, I need a software solution anyway. I know that's what the Internich folks ended up doing. I figured I should just be able to change the order.
Thanks,
Aaron