int mv88e6xxx_phy_read_c45(struct mv88e6xxx_chip *chip, int phy, int devad, int reg, u16 *val)
{ int addr = phy; /* PHY devices addresses start at 0x0 */ struct mii_bus *bus;
bus = mv88e6xxx_default_mdio_bus(chip); if (!bus) return -EOPNOTSUPP;
if (!chip->info->ops->phy_read_c45) return -EOPNOTSUPP;
int mv88e6xxx_phy_write_c45(struct mv88e6xxx_chip *chip, int phy, int devad, int reg, u16 val)
{ int addr = phy; /* PHY devices addresses start at 0x0 */ struct mii_bus *bus;
bus = mv88e6xxx_default_mdio_bus(chip); if (!bus) return -EOPNOTSUPP;
if (!chip->info->ops->phy_write_c45) return -EOPNOTSUPP;
staticint mv88e6xxx_phy_ppu_access_get(struct mv88e6xxx_chip *chip)
{ int ret;
mutex_lock(&chip->ppu_mutex);
/* If the PHY polling unit is enabled, disable it so that * we can access the PHY registers. If it was already * disabled, cancel the timer that is going to re-enable * it.
*/ if (!chip->ppu_disabled) {
ret = mv88e6xxx_phy_ppu_disable(chip); if (ret < 0) {
mutex_unlock(&chip->ppu_mutex); return ret;
}
chip->ppu_disabled = 1;
} else {
timer_delete(&chip->ppu_timer);
ret = 0;
}
return ret;
}
staticvoid mv88e6xxx_phy_ppu_access_put(struct mv88e6xxx_chip *chip)
{ /* Schedule a timer to re-enable the PHY polling unit. */
mod_timer(&chip->ppu_timer, jiffies + msecs_to_jiffies(10));
mutex_unlock(&chip->ppu_mutex);
}
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.