staticint ncn26000_config_init(struct phy_device *phydev)
{ /* HW bug workaround: the default value of the PLCA TO_TIMER should be *32,wherethecurrentversionofNCN26000reports24.Thiswillbe *fixedinfuturePHYversions.Forthetimebeing,weforcethe *correctdefaulthere.
*/ return phy_write_mmd(phydev, MDIO_MMD_VEND2, MDIO_OATC14_PLCA_TOTMR,
TO_TMR_DEFAULT);
}
staticint ncn26000_config_aneg(struct phy_device *phydev)
{ /* Note: the NCN26000 supports only P2MP link mode. Therefore, AN is not *supported.However,thisfunctionisinvokedbyphylibtoenablethe *PHY,regardlessoftheANsupport.
*/
phydev->mdix_ctrl = ETH_TP_MDI_AUTO;
phydev->mdix = ETH_TP_MDI;
// bring up the link return phy_write(phydev, MII_BMCR, NCN26000_BCMR_LINK_CTRL_BIT);
}
staticint ncn26000_read_status(struct phy_device *phydev)
{ /* The NCN26000 reports NCN26000_LINK_STATUS_BIT if the link status of *thePHYisup.ItfurtherreportsthelogicalANDofthelinkstatus *andthePLCAstatusintheBMSR_LSTATUSbit.
*/ int ret;
/* The link state is latched low so that momentary link *dropscanbedetected.Donotdouble-readthestatus *inpollingmodetodetectsuchshortlinkdropsexcept *thelinkwasalreadydown.
*/ if (!phy_polling_mode(phydev) || !phydev->link) {
ret = phy_read(phydev, MII_BMSR); if (ret < 0) return ret; elseif (ret & NCN26000_BMSR_LINK_STATUS_BIT) goto upd_link;
}
ret = phy_read(phydev, MII_BMSR); if (ret < 0) return ret;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.