struct arc_emac_mdio_bus_data { struct gpio_desc *reset_gpio; int msec;
};
/** * struct arc_emac_priv - Storage of EMAC's private information. * @dev: Pointer to the current device. * @phy_dev: Pointer to attached PHY device. * @bus: Pointer to the current MII bus. * @regs: Base address of EMAC memory-mapped control registers. * @napi: Structure for NAPI. * @rxbd: Pointer to Rx BD ring. * @txbd: Pointer to Tx BD ring. * @rxbd_dma: DMA handle for Rx BD ring. * @txbd_dma: DMA handle for Tx BD ring. * @rx_buff: Storage for Rx buffers states. * @tx_buff: Storage for Tx buffers states. * @txbd_curr: Index of Tx BD to use on the next "ndo_start_xmit". * @txbd_dirty: Index of Tx BD to free on the next Tx interrupt. * @last_rx_bd: Index of the last Rx BD we've got from EMAC. * @link: PHY's last seen link state. * @duplex: PHY's last set duplex mode. * @speed: PHY's last set speed.
*/ struct arc_emac_priv { constchar *drv_name; void (*set_mac_speed)(void *priv, unsignedint speed);
/** * arc_reg_set - Sets EMAC register with provided value. * @priv: Pointer to ARC EMAC private data structure. * @reg: Register offset from base address. * @value: Value to set in register.
*/ staticinlinevoid arc_reg_set(struct arc_emac_priv *priv, int reg, int value)
{
iowrite32(value, priv->regs + reg * sizeof(int));
}
/** * arc_reg_get - Gets value of specified EMAC register. * @priv: Pointer to ARC EMAC private data structure. * @reg: Register offset from base address. * * returns: Value of requested register.
*/ staticinlineunsignedint arc_reg_get(struct arc_emac_priv *priv, int reg)
{ return ioread32(priv->regs + reg * sizeof(int));
}
/** * arc_reg_or - Applies mask to specified EMAC register - ("reg" | "mask"). * @priv: Pointer to ARC EMAC private data structure. * @reg: Register offset from base address. * @mask: Mask to apply to specified register. * * This function reads initial register value, then applies provided mask * to it and then writes register back.
*/ staticinlinevoid arc_reg_or(struct arc_emac_priv *priv, int reg, int mask)
{ unsignedint value = arc_reg_get(priv, reg);
arc_reg_set(priv, reg, value | mask);
}
/** * arc_reg_clr - Applies mask to specified EMAC register - ("reg" & ~"mask"). * @priv: Pointer to ARC EMAC private data structure. * @reg: Register offset from base address. * @mask: Mask to apply to specified register. * * This function reads initial register value, then applies provided mask * to it and then writes register back.
*/ staticinlinevoid arc_reg_clr(struct arc_emac_priv *priv, int reg, int mask)
{ unsignedint value = arc_reg_get(priv, reg);
arc_reg_set(priv, reg, value & ~mask);
}
int arc_mdio_probe(struct arc_emac_priv *priv); int arc_mdio_remove(struct arc_emac_priv *priv); int arc_emac_probe(struct net_device *ndev, int interface); void arc_emac_remove(struct net_device *ndev);
#endif/* ARC_EMAC_H */
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
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.