/* Accept all incoming packets. * This option defaults to disabled (cleared)
*/ #define XTE_OPTION_PROMISC (1 << 0) /* Jumbo frame support for Tx & Rx. * This option defaults to disabled (cleared)
*/ #define XTE_OPTION_JUMBO (1 << 1) /* VLAN Rx & Tx frame support. * This option defaults to disabled (cleared)
*/ #define XTE_OPTION_VLAN (1 << 2) /* Enable recognition of flow control frames on Rx * This option defaults to enabled (set)
*/ #define XTE_OPTION_FLOW_CONTROL (1 << 4) /* Strip FCS and PAD from incoming frames. * Note: PAD from VLAN frames is not stripped. * This option defaults to disabled (set)
*/ #define XTE_OPTION_FCS_STRIP (1 << 5) /* Generate FCS field and add PAD automatically for outgoing frames. * This option defaults to enabled (set)
*/ #define XTE_OPTION_FCS_INSERT (1 << 6) /* Enable Length/Type error checking for incoming frames. When this option is * set, the MAC will filter frames that have a mismatched type/length field * and if XTE_OPTION_REPORT_RXERR is set, the user is notified when these * types of frames are encountered. When this option is cleared, the MAC will * allow these types of frames to be received. * This option defaults to enabled (set)
*/ #define XTE_OPTION_LENTYPE_ERR (1 << 7) /* Enable the transmitter. * This option defaults to enabled (set)
*/ #define XTE_OPTION_TXEN (1 << 11) /* Enable the receiver * This option defaults to enabled (set)
*/ #define XTE_OPTION_RXEN (1 << 12)
/* Default options set when device is initialized or reset */ #define XTE_OPTION_DEFAULTS \
(XTE_OPTION_TXEN | \
XTE_OPTION_FLOW_CONTROL | \
XTE_OPTION_RXEN)
/* MII Management Control register (MGTCR) */ #define XTE_MGTDR_OFFSET 0x000003B0 /* MII data */ #define XTE_MIIMAI_OFFSET 0x000003B4 /* MII control */
/* Connection to PHY device */ struct device_node *phy_node; /* For non-device-tree devices */ char phy_name[MII_BUS_ID_SIZE + 3];
phy_interface_t phy_interface;
/* MDIO bus data */ struct mii_bus *mii_bus; /* MII bus reference */
/* IO registers, dma functions and IRQs */ void __iomem *regs; void __iomem *sdma_regs; #ifdef CONFIG_PPC_DCR
dcr_host_t sdma_dcrs; #endif
u32 (*temac_ior)(struct temac_local *lp, int offset); void (*temac_iow)(struct temac_local *lp, int offset, u32 value);
u32 (*dma_in)(struct temac_local *lp, int reg); void (*dma_out)(struct temac_local *lp, int reg, u32 value);
int tx_irq; int rx_irq; int emac_num;
struct sk_buff **rx_skb;
spinlock_t rx_lock; /* For synchronization of indirect register access. Must be * shared mutex between interfaces in same TEMAC block.
*/
spinlock_t *indirect_lock;
u32 options; /* Current options word */ int last_link; unsignedint temac_features;
/* Buffer descriptors */ struct cdmac_bd *tx_bd_v;
dma_addr_t tx_bd_p;
u32 tx_bd_num; struct cdmac_bd *rx_bd_v;
dma_addr_t rx_bd_p;
u32 rx_bd_num; int tx_bd_ci; int tx_bd_tail; int rx_bd_ci; int rx_bd_tail;
/* Wrappers for temac_ior()/temac_iow() function pointers above */ #define temac_ior(lp, o) ((lp)->temac_ior(lp, o)) #define temac_iow(lp, o, v) ((lp)->temac_iow(lp, o, v))
/* xilinx_temac.c */ int temac_indirect_busywait(struct temac_local *lp);
u32 temac_indirect_in32(struct temac_local *lp, int reg);
u32 temac_indirect_in32_locked(struct temac_local *lp, int reg); void temac_indirect_out32(struct temac_local *lp, int reg, u32 value); void temac_indirect_out32_locked(struct temac_local *lp, int reg, u32 value);
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.