Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
xgmac.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/circ_buf.h>
#include <linux/interrupt.h>
#include <linux/etherdevice.h>
#include <linux/platform_device.h>
#include <linux/skbuff.h>
#include <linux/ethtool.h>
#include <linux/if.h>
#include <linux/crc32.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  xgmac_dma_desc
 
struct  xgmac_extra_stats
 
struct  xgmac_priv
 
struct  xgmac_stats
 

Macros

#define XGMAC_CONTROL   0x00000000 /* MAC Configuration */
 
#define XGMAC_FRAME_FILTER   0x00000004 /* MAC Frame Filter */
 
#define XGMAC_FLOW_CTRL   0x00000018 /* MAC Flow Control */
 
#define XGMAC_VLAN_TAG   0x0000001C /* VLAN Tags */
 
#define XGMAC_VERSION   0x00000020 /* Version */
 
#define XGMAC_VLAN_INCL   0x00000024 /* VLAN tag for tx frames */
 
#define XGMAC_LPI_CTRL   0x00000028 /* LPI Control and Status */
 
#define XGMAC_LPI_TIMER   0x0000002C /* LPI Timers Control */
 
#define XGMAC_TX_PACE   0x00000030 /* Transmit Pace and Stretch */
 
#define XGMAC_VLAN_HASH   0x00000034 /* VLAN Hash Table */
 
#define XGMAC_DEBUG   0x00000038 /* Debug */
 
#define XGMAC_INT_STAT   0x0000003C /* Interrupt and Control */
 
#define XGMAC_ADDR_HIGH(reg)   (0x00000040 + ((reg) * 8))
 
#define XGMAC_ADDR_LOW(reg)   (0x00000044 + ((reg) * 8))
 
#define XGMAC_HASH(n)   (0x00000300 + (n) * 4) /* HASH table regs */
 
#define XGMAC_NUM_HASH   16
 
#define XGMAC_OMR   0x00000400
 
#define XGMAC_REMOTE_WAKE   0x00000700 /* Remote Wake-Up Frm Filter */
 
#define XGMAC_PMT   0x00000704 /* PMT Control and Status */
 
#define XGMAC_MMC_CTRL   0x00000800 /* XGMAC MMC Control */
 
#define XGMAC_MMC_INTR_RX   0x00000804 /* Recieve Interrupt */
 
#define XGMAC_MMC_INTR_TX   0x00000808 /* Transmit Interrupt */
 
#define XGMAC_MMC_INTR_MASK_RX   0x0000080c /* Recieve Interrupt Mask */
 
#define XGMAC_MMC_INTR_MASK_TX   0x00000810 /* Transmit Interrupt Mask */
 
#define XGMAC_MMC_TXOCTET_GB_LO   0x00000814
 
#define XGMAC_MMC_TXOCTET_GB_HI   0x00000818
 
#define XGMAC_MMC_TXFRAME_GB_LO   0x0000081C
 
#define XGMAC_MMC_TXFRAME_GB_HI   0x00000820
 
#define XGMAC_MMC_TXBCFRAME_G   0x00000824
 
#define XGMAC_MMC_TXMCFRAME_G   0x0000082C
 
#define XGMAC_MMC_TXUCFRAME_GB   0x00000864
 
#define XGMAC_MMC_TXMCFRAME_GB   0x0000086C
 
#define XGMAC_MMC_TXBCFRAME_GB   0x00000874
 
#define XGMAC_MMC_TXUNDERFLOW   0x0000087C
 
#define XGMAC_MMC_TXOCTET_G_LO   0x00000884
 
#define XGMAC_MMC_TXOCTET_G_HI   0x00000888
 
#define XGMAC_MMC_TXFRAME_G_LO   0x0000088C
 
#define XGMAC_MMC_TXFRAME_G_HI   0x00000890
 
#define XGMAC_MMC_TXPAUSEFRAME   0x00000894
 
#define XGMAC_MMC_TXVLANFRAME   0x0000089C
 
#define XGMAC_MMC_RXFRAME_GB_LO   0x00000900
 
#define XGMAC_MMC_RXFRAME_GB_HI   0x00000904
 
#define XGMAC_MMC_RXOCTET_GB_LO   0x00000908
 
#define XGMAC_MMC_RXOCTET_GB_HI   0x0000090C
 
#define XGMAC_MMC_RXOCTET_G_LO   0x00000910
 
#define XGMAC_MMC_RXOCTET_G_HI   0x00000914
 
#define XGMAC_MMC_RXBCFRAME_G   0x00000918
 
#define XGMAC_MMC_RXMCFRAME_G   0x00000920
 
#define XGMAC_MMC_RXCRCERR   0x00000928
 
#define XGMAC_MMC_RXRUNT   0x00000930
 
#define XGMAC_MMC_RXJABBER   0x00000934
 
#define XGMAC_MMC_RXUCFRAME_G   0x00000970
 
#define XGMAC_MMC_RXLENGTHERR   0x00000978
 
#define XGMAC_MMC_RXPAUSEFRAME   0x00000988
 
#define XGMAC_MMC_RXOVERFLOW   0x00000990
 
#define XGMAC_MMC_RXVLANFRAME   0x00000998
 
#define XGMAC_MMC_RXWATCHDOG   0x000009a0
 
#define XGMAC_DMA_BUS_MODE   0x00000f00 /* Bus Mode */
 
#define XGMAC_DMA_TX_POLL   0x00000f04 /* Transmit Poll Demand */
 
#define XGMAC_DMA_RX_POLL   0x00000f08 /* Received Poll Demand */
 
#define XGMAC_DMA_RX_BASE_ADDR   0x00000f0c /* Receive List Base */
 
#define XGMAC_DMA_TX_BASE_ADDR   0x00000f10 /* Transmit List Base */
 
#define XGMAC_DMA_STATUS   0x00000f14 /* Status Register */
 
#define XGMAC_DMA_CONTROL   0x00000f18 /* Ctrl (Operational Mode) */
 
#define XGMAC_DMA_INTR_ENA   0x00000f1c /* Interrupt Enable */
 
#define XGMAC_DMA_MISS_FRAME_CTR   0x00000f20 /* Missed Frame Counter */
 
#define XGMAC_DMA_RI_WDOG_TIMER   0x00000f24 /* RX Intr Watchdog Timer */
 
#define XGMAC_DMA_AXI_BUS   0x00000f28 /* AXI Bus Mode */
 
#define XGMAC_DMA_AXI_STATUS   0x00000f2C /* AXI Status */
 
#define XGMAC_DMA_HW_FEATURE   0x00000f58 /* Enabled Hardware Features */
 
#define XGMAC_ADDR_AE   0x80000000
 
#define XGMAC_MAX_FILTER_ADDR   31
 
#define XGMAC_PMT_POINTER_RESET   0x80000000
 
#define XGMAC_PMT_GLBL_UNICAST   0x00000200
 
#define XGMAC_PMT_WAKEUP_RX_FRM   0x00000040
 
#define XGMAC_PMT_MAGIC_PKT   0x00000020
 
#define XGMAC_PMT_WAKEUP_FRM_EN   0x00000004
 
#define XGMAC_PMT_MAGIC_PKT_EN   0x00000002
 
#define XGMAC_PMT_POWERDOWN   0x00000001
 
#define XGMAC_CONTROL_SPD   0x40000000 /* Speed control */
 
#define XGMAC_CONTROL_SPD_MASK   0x60000000
 
#define XGMAC_CONTROL_SPD_1G   0x60000000
 
#define XGMAC_CONTROL_SPD_2_5G   0x40000000
 
#define XGMAC_CONTROL_SPD_10G   0x00000000
 
#define XGMAC_CONTROL_SARC   0x10000000 /* Source Addr Insert/Replace */
 
#define XGMAC_CONTROL_SARK_MASK   0x18000000
 
#define XGMAC_CONTROL_CAR   0x04000000 /* CRC Addition/Replacement */
 
#define XGMAC_CONTROL_CAR_MASK   0x06000000
 
#define XGMAC_CONTROL_DP   0x01000000 /* Disable Padding */
 
#define XGMAC_CONTROL_WD   0x00800000 /* Disable Watchdog on rx */
 
#define XGMAC_CONTROL_JD   0x00400000 /* Jabber disable */
 
#define XGMAC_CONTROL_JE   0x00100000 /* Jumbo frame */
 
#define XGMAC_CONTROL_LM   0x00001000 /* Loop-back mode */
 
#define XGMAC_CONTROL_IPC   0x00000400 /* Checksum Offload */
 
#define XGMAC_CONTROL_ACS   0x00000080 /* Automatic Pad/FCS Strip */
 
#define XGMAC_CONTROL_DDIC   0x00000010 /* Disable Deficit Idle Count */
 
#define XGMAC_CONTROL_TE   0x00000008 /* Transmitter Enable */
 
#define XGMAC_CONTROL_RE   0x00000004 /* Receiver Enable */
 
#define XGMAC_FRAME_FILTER_PR   0x00000001 /* Promiscuous Mode */
 
#define XGMAC_FRAME_FILTER_HUC   0x00000002 /* Hash Unicast */
 
#define XGMAC_FRAME_FILTER_HMC   0x00000004 /* Hash Multicast */
 
#define XGMAC_FRAME_FILTER_DAIF   0x00000008 /* DA Inverse Filtering */
 
#define XGMAC_FRAME_FILTER_PM   0x00000010 /* Pass all multicast */
 
#define XGMAC_FRAME_FILTER_DBF   0x00000020 /* Disable Broadcast frames */
 
#define XGMAC_FRAME_FILTER_SAIF   0x00000100 /* Inverse Filtering */
 
#define XGMAC_FRAME_FILTER_SAF   0x00000200 /* Source Address Filter */
 
#define XGMAC_FRAME_FILTER_HPF   0x00000400 /* Hash or perfect Filter */
 
#define XGMAC_FRAME_FILTER_VHF   0x00000800 /* VLAN Hash Filter */
 
#define XGMAC_FRAME_FILTER_VPF   0x00001000 /* VLAN Perfect Filter */
 
#define XGMAC_FRAME_FILTER_RA   0x80000000 /* Receive all mode */
 
#define XGMAC_FLOW_CTRL_PT_MASK   0xffff0000 /* Pause Time Mask */
 
#define XGMAC_FLOW_CTRL_PT_SHIFT   16
 
#define XGMAC_FLOW_CTRL_DZQP   0x00000080 /* Disable Zero-Quanta Phase */
 
#define XGMAC_FLOW_CTRL_PLT   0x00000020 /* Pause Low Threshhold */
 
#define XGMAC_FLOW_CTRL_PLT_MASK   0x00000030 /* PLT MASK */
 
#define XGMAC_FLOW_CTRL_UP   0x00000008 /* Unicast Pause Frame Detect */
 
#define XGMAC_FLOW_CTRL_RFE   0x00000004 /* Rx Flow Control Enable */
 
#define XGMAC_FLOW_CTRL_TFE   0x00000002 /* Tx Flow Control Enable */
 
#define XGMAC_FLOW_CTRL_FCB_BPA   0x00000001 /* Flow Control Busy ... */
 
#define XGMAC_INT_STAT_PMT   0x0080 /* PMT Interrupt Status */
 
#define XGMAC_INT_STAT_LPI   0x0040 /* LPI Interrupt Status */
 
#define DMA_BUS_MODE_SFT_RESET   0x00000001 /* Software Reset */
 
#define DMA_BUS_MODE_DSL_MASK   0x0000007c /* Descriptor Skip Length */
 
#define DMA_BUS_MODE_DSL_SHIFT   2 /* (in DWORDS) */
 
#define DMA_BUS_MODE_ATDS   0x00000080 /* Alternate Descriptor Size */
 
#define DMA_BUS_MODE_PBL_MASK   0x00003f00 /* Programmable Burst Len */
 
#define DMA_BUS_MODE_PBL_SHIFT   8
 
#define DMA_BUS_MODE_FB   0x00010000 /* Fixed burst */
 
#define DMA_BUS_MODE_RPBL_MASK   0x003e0000 /* Rx-Programmable Burst Len */
 
#define DMA_BUS_MODE_RPBL_SHIFT   17
 
#define DMA_BUS_MODE_USP   0x00800000
 
#define DMA_BUS_MODE_8PBL   0x01000000
 
#define DMA_BUS_MODE_AAL   0x02000000
 
#define DMA_BUS_PR_RATIO_MASK   0x0000c000 /* Rx/Tx priority ratio */
 
#define DMA_BUS_PR_RATIO_SHIFT   14
 
#define DMA_BUS_FB   0x00010000 /* Fixed Burst */
 
#define DMA_CONTROL_ST   0x00002000 /* Start/Stop Transmission */
 
#define DMA_CONTROL_SR   0x00000002 /* Start/Stop Receive */
 
#define DMA_CONTROL_DFF   0x01000000 /* Disable flush of rx frames */
 
#define DMA_INTR_ENA_NIE   0x00010000 /* Normal Summary */
 
#define DMA_INTR_ENA_AIE   0x00008000 /* Abnormal Summary */
 
#define DMA_INTR_ENA_ERE   0x00004000 /* Early Receive */
 
#define DMA_INTR_ENA_FBE   0x00002000 /* Fatal Bus Error */
 
#define DMA_INTR_ENA_ETE   0x00000400 /* Early Transmit */
 
#define DMA_INTR_ENA_RWE   0x00000200 /* Receive Watchdog */
 
#define DMA_INTR_ENA_RSE   0x00000100 /* Receive Stopped */
 
#define DMA_INTR_ENA_RUE   0x00000080 /* Receive Buffer Unavailable */
 
#define DMA_INTR_ENA_RIE   0x00000040 /* Receive Interrupt */
 
#define DMA_INTR_ENA_UNE   0x00000020 /* Tx Underflow */
 
#define DMA_INTR_ENA_OVE   0x00000010 /* Receive Overflow */
 
#define DMA_INTR_ENA_TJE   0x00000008 /* Transmit Jabber */
 
#define DMA_INTR_ENA_TUE   0x00000004 /* Transmit Buffer Unavail */
 
#define DMA_INTR_ENA_TSE   0x00000002 /* Transmit Stopped */
 
#define DMA_INTR_ENA_TIE   0x00000001 /* Transmit Interrupt */
 
#define DMA_INTR_NORMAL
 
#define DMA_INTR_ABNORMAL
 
#define DMA_INTR_DEFAULT_MASK   (DMA_INTR_NORMAL | DMA_INTR_ABNORMAL)
 
#define DMA_STATUS_GMI   0x08000000 /* MMC interrupt */
 
#define DMA_STATUS_GLI   0x04000000 /* GMAC Line interface int */
 
#define DMA_STATUS_EB_MASK   0x00380000 /* Error Bits Mask */
 
#define DMA_STATUS_EB_TX_ABORT   0x00080000 /* Error Bits - TX Abort */
 
#define DMA_STATUS_EB_RX_ABORT   0x00100000 /* Error Bits - RX Abort */
 
#define DMA_STATUS_TS_MASK   0x00700000 /* Transmit Process State */
 
#define DMA_STATUS_TS_SHIFT   20
 
#define DMA_STATUS_RS_MASK   0x000e0000 /* Receive Process State */
 
#define DMA_STATUS_RS_SHIFT   17
 
#define DMA_STATUS_NIS   0x00010000 /* Normal Interrupt Summary */
 
#define DMA_STATUS_AIS   0x00008000 /* Abnormal Interrupt Summary */
 
#define DMA_STATUS_ERI   0x00004000 /* Early Receive Interrupt */
 
#define DMA_STATUS_FBI   0x00002000 /* Fatal Bus Error Interrupt */
 
#define DMA_STATUS_ETI   0x00000400 /* Early Transmit Interrupt */
 
#define DMA_STATUS_RWT   0x00000200 /* Receive Watchdog Timeout */
 
#define DMA_STATUS_RPS   0x00000100 /* Receive Process Stopped */
 
#define DMA_STATUS_RU   0x00000080 /* Receive Buffer Unavailable */
 
#define DMA_STATUS_RI   0x00000040 /* Receive Interrupt */
 
#define DMA_STATUS_UNF   0x00000020 /* Transmit Underflow */
 
#define DMA_STATUS_OVF   0x00000010 /* Receive Overflow */
 
#define DMA_STATUS_TJT   0x00000008 /* Transmit Jabber Timeout */
 
#define DMA_STATUS_TU   0x00000004 /* Transmit Buffer Unavail */
 
#define DMA_STATUS_TPS   0x00000002 /* Transmit Process Stopped */
 
#define DMA_STATUS_TI   0x00000001 /* Transmit Interrupt */
 
#define MAC_ENABLE_TX   0x00000008 /* Transmitter Enable */
 
#define MAC_ENABLE_RX   0x00000004 /* Receiver Enable */
 
#define XGMAC_OMR_TSF   0x00200000 /* TX FIFO Store and Forward */
 
#define XGMAC_OMR_FTF   0x00100000 /* Flush Transmit FIFO */
 
#define XGMAC_OMR_TTC   0x00020000 /* Transmit Threshhold Ctrl */
 
#define XGMAC_OMR_TTC_MASK   0x00030000
 
#define XGMAC_OMR_RFD   0x00006000 /* FC Deactivation Threshhold */
 
#define XGMAC_OMR_RFD_MASK   0x00007000 /* FC Deact Threshhold MASK */
 
#define XGMAC_OMR_RFA   0x00000600 /* FC Activation Threshhold */
 
#define XGMAC_OMR_RFA_MASK   0x00000E00 /* FC Act Threshhold MASK */
 
#define XGMAC_OMR_EFC   0x00000100 /* Enable Hardware FC */
 
#define XGMAC_OMR_FEF   0x00000080 /* Forward Error Frames */
 
#define XGMAC_OMR_DT   0x00000040 /* Drop TCP/IP csum Errors */
 
#define XGMAC_OMR_RSF   0x00000020 /* RX FIFO Store and Forward */
 
#define XGMAC_OMR_RTC_256   0x00000018 /* RX Threshhold Ctrl */
 
#define XGMAC_OMR_RTC_MASK   0x00000018 /* RX Threshhold Ctrl MASK */
 
#define DMA_HW_FEAT_TXCOESEL   0x00010000 /* TX Checksum offload */
 
#define XGMAC_MMC_CTRL_CNT_FRZ   0x00000008
 
#define MAX_DESC_BUF_SZ   (0x2000 - 8)
 
#define RXDESC_EXT_STATUS   0x00000001
 
#define RXDESC_CRC_ERR   0x00000002
 
#define RXDESC_RX_ERR   0x00000008
 
#define RXDESC_RX_WDOG   0x00000010
 
#define RXDESC_FRAME_TYPE   0x00000020
 
#define RXDESC_GIANT_FRAME   0x00000080
 
#define RXDESC_LAST_SEG   0x00000100
 
#define RXDESC_FIRST_SEG   0x00000200
 
#define RXDESC_VLAN_FRAME   0x00000400
 
#define RXDESC_OVERFLOW_ERR   0x00000800
 
#define RXDESC_LENGTH_ERR   0x00001000
 
#define RXDESC_SA_FILTER_FAIL   0x00002000
 
#define RXDESC_DESCRIPTOR_ERR   0x00004000
 
#define RXDESC_ERROR_SUMMARY   0x00008000
 
#define RXDESC_FRAME_LEN_OFFSET   16
 
#define RXDESC_FRAME_LEN_MASK   0x3fff0000
 
#define RXDESC_DA_FILTER_FAIL   0x40000000
 
#define RXDESC1_END_RING   0x00008000
 
#define RXDESC_IP_PAYLOAD_MASK   0x00000003
 
#define RXDESC_IP_PAYLOAD_UDP   0x00000001
 
#define RXDESC_IP_PAYLOAD_TCP   0x00000002
 
#define RXDESC_IP_PAYLOAD_ICMP   0x00000003
 
#define RXDESC_IP_HEADER_ERR   0x00000008
 
#define RXDESC_IP_PAYLOAD_ERR   0x00000010
 
#define RXDESC_IPV4_PACKET   0x00000040
 
#define RXDESC_IPV6_PACKET   0x00000080
 
#define TXDESC_UNDERFLOW_ERR   0x00000001
 
#define TXDESC_JABBER_TIMEOUT   0x00000002
 
#define TXDESC_LOCAL_FAULT   0x00000004
 
#define TXDESC_REMOTE_FAULT   0x00000008
 
#define TXDESC_VLAN_FRAME   0x00000010
 
#define TXDESC_FRAME_FLUSHED   0x00000020
 
#define TXDESC_IP_HEADER_ERR   0x00000040
 
#define TXDESC_PAYLOAD_CSUM_ERR   0x00000080
 
#define TXDESC_ERROR_SUMMARY   0x00008000
 
#define TXDESC_SA_CTRL_INSERT   0x00040000
 
#define TXDESC_SA_CTRL_REPLACE   0x00080000
 
#define TXDESC_2ND_ADDR_CHAINED   0x00100000
 
#define TXDESC_END_RING   0x00200000
 
#define TXDESC_CSUM_IP   0x00400000
 
#define TXDESC_CSUM_IP_PAYLD   0x00800000
 
#define TXDESC_CSUM_ALL   0x00C00000
 
#define TXDESC_CRC_EN_REPLACE   0x01000000
 
#define TXDESC_CRC_EN_APPEND   0x02000000
 
#define TXDESC_DISABLE_PAD   0x04000000
 
#define TXDESC_FIRST_SEG   0x10000000
 
#define TXDESC_LAST_SEG   0x20000000
 
#define TXDESC_INTERRUPT   0x40000000
 
#define DESC_OWN   0x80000000
 
#define DESC_BUFFER1_SZ_MASK   0x00001fff
 
#define DESC_BUFFER2_SZ_MASK   0x1fff0000
 
#define DESC_BUFFER2_SZ_OFFSET   16
 
#define MAX_MTU   9000
 
#define PAUSE_TIME   0x400
 
#define DMA_RX_RING_SZ   256
 
#define DMA_TX_RING_SZ   128
 
#define TX_THRESH   (DMA_TX_RING_SZ/4)
 
#define dma_ring_incr(n, s)   (((n) + 1) & ((s) - 1))
 
#define dma_ring_space(h, t, s)   CIRC_SPACE(h, t, s)
 
#define dma_ring_cnt(h, t, s)   CIRC_CNT(h, t, s)
 
#define XGMAC_STAT(m)   { #m, offsetof(struct xgmac_priv, xstats.m), false }
 
#define XGMAC_HW_STAT(m, reg_offset)   { #m, reg_offset, true }
 
#define XGMAC_STATS_LEN   ARRAY_SIZE(xgmac_gstrings_stats)
 
#define XGMAC_PM_OPS   NULL
 

Functions

 MODULE_DEVICE_TABLE (of, xgmac_of_match)
 
 module_platform_driver (xgmac_driver)
 
 MODULE_AUTHOR ("Calxeda, Inc.")
 
 MODULE_DESCRIPTION ("Calxeda 10G XGMAC driver")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define DESC_BUFFER1_SZ_MASK   0x00001fff

Definition at line 330 of file xgmac.c.

#define DESC_BUFFER2_SZ_MASK   0x1fff0000

Definition at line 331 of file xgmac.c.

#define DESC_BUFFER2_SZ_OFFSET   16

Definition at line 332 of file xgmac.c.

#define DESC_OWN   0x80000000

Definition at line 329 of file xgmac.c.

#define DMA_BUS_FB   0x00010000 /* Fixed Burst */

Definition at line 188 of file xgmac.c.

#define DMA_BUS_MODE_8PBL   0x01000000

Definition at line 182 of file xgmac.c.

#define DMA_BUS_MODE_AAL   0x02000000

Definition at line 183 of file xgmac.c.

#define DMA_BUS_MODE_ATDS   0x00000080 /* Alternate Descriptor Size */

Definition at line 173 of file xgmac.c.

#define DMA_BUS_MODE_DSL_MASK   0x0000007c /* Descriptor Skip Length */

Definition at line 171 of file xgmac.c.

#define DMA_BUS_MODE_DSL_SHIFT   2 /* (in DWORDS) */

Definition at line 172 of file xgmac.c.

#define DMA_BUS_MODE_FB   0x00010000 /* Fixed burst */

Definition at line 178 of file xgmac.c.

#define DMA_BUS_MODE_PBL_MASK   0x00003f00 /* Programmable Burst Len */

Definition at line 176 of file xgmac.c.

#define DMA_BUS_MODE_PBL_SHIFT   8

Definition at line 177 of file xgmac.c.

#define DMA_BUS_MODE_RPBL_MASK   0x003e0000 /* Rx-Programmable Burst Len */

Definition at line 179 of file xgmac.c.

#define DMA_BUS_MODE_RPBL_SHIFT   17

Definition at line 180 of file xgmac.c.

#define DMA_BUS_MODE_SFT_RESET   0x00000001 /* Software Reset */

Definition at line 170 of file xgmac.c.

#define DMA_BUS_MODE_USP   0x00800000

Definition at line 181 of file xgmac.c.

#define DMA_BUS_PR_RATIO_MASK   0x0000c000 /* Rx/Tx priority ratio */

Definition at line 186 of file xgmac.c.

#define DMA_BUS_PR_RATIO_SHIFT   14

Definition at line 187 of file xgmac.c.

#define DMA_CONTROL_DFF   0x01000000 /* Disable flush of rx frames */

Definition at line 193 of file xgmac.c.

#define DMA_CONTROL_SR   0x00000002 /* Start/Stop Receive */

Definition at line 192 of file xgmac.c.

#define DMA_CONTROL_ST   0x00002000 /* Start/Stop Transmission */

Definition at line 191 of file xgmac.c.

#define DMA_HW_FEAT_TXCOESEL   0x00010000 /* TX Checksum offload */

Definition at line 271 of file xgmac.c.

#define DMA_INTR_ABNORMAL
Value:
DMA_INTR_ENA_RWE | DMA_INTR_ENA_RSE | \
DMA_INTR_ENA_RUE | DMA_INTR_ENA_UNE | \
DMA_INTR_ENA_OVE | DMA_INTR_ENA_TJE | \
DMA_INTR_ENA_TSE)

Definition at line 215 of file xgmac.c.

#define DMA_INTR_DEFAULT_MASK   (DMA_INTR_NORMAL | DMA_INTR_ABNORMAL)

Definition at line 222 of file xgmac.c.

#define DMA_INTR_ENA_AIE   0x00008000 /* Abnormal Summary */

Definition at line 197 of file xgmac.c.

#define DMA_INTR_ENA_ERE   0x00004000 /* Early Receive */

Definition at line 198 of file xgmac.c.

#define DMA_INTR_ENA_ETE   0x00000400 /* Early Transmit */

Definition at line 200 of file xgmac.c.

#define DMA_INTR_ENA_FBE   0x00002000 /* Fatal Bus Error */

Definition at line 199 of file xgmac.c.

#define DMA_INTR_ENA_NIE   0x00010000 /* Normal Summary */

Definition at line 196 of file xgmac.c.

#define DMA_INTR_ENA_OVE   0x00000010 /* Receive Overflow */

Definition at line 206 of file xgmac.c.

#define DMA_INTR_ENA_RIE   0x00000040 /* Receive Interrupt */

Definition at line 204 of file xgmac.c.

#define DMA_INTR_ENA_RSE   0x00000100 /* Receive Stopped */

Definition at line 202 of file xgmac.c.

#define DMA_INTR_ENA_RUE   0x00000080 /* Receive Buffer Unavailable */

Definition at line 203 of file xgmac.c.

#define DMA_INTR_ENA_RWE   0x00000200 /* Receive Watchdog */

Definition at line 201 of file xgmac.c.

#define DMA_INTR_ENA_TIE   0x00000001 /* Transmit Interrupt */

Definition at line 210 of file xgmac.c.

#define DMA_INTR_ENA_TJE   0x00000008 /* Transmit Jabber */

Definition at line 207 of file xgmac.c.

#define DMA_INTR_ENA_TSE   0x00000002 /* Transmit Stopped */

Definition at line 209 of file xgmac.c.

#define DMA_INTR_ENA_TUE   0x00000004 /* Transmit Buffer Unavail */

Definition at line 208 of file xgmac.c.

#define DMA_INTR_ENA_UNE   0x00000020 /* Tx Underflow */

Definition at line 205 of file xgmac.c.

#define DMA_INTR_NORMAL
Value:
DMA_INTR_ENA_TUE)

Definition at line 212 of file xgmac.c.

#define dma_ring_cnt (   h,
  t,
  s 
)    CIRC_CNT(h, t, s)

Definition at line 407 of file xgmac.c.

#define dma_ring_incr (   n,
  s 
)    (((n) + 1) & ((s) - 1))

Definition at line 405 of file xgmac.c.

#define dma_ring_space (   h,
  t,
  s 
)    CIRC_SPACE(h, t, s)

Definition at line 406 of file xgmac.c.

#define DMA_RX_RING_SZ   256

Definition at line 399 of file xgmac.c.

#define DMA_STATUS_AIS   0x00008000 /* Abnormal Interrupt Summary */

Definition at line 235 of file xgmac.c.

#define DMA_STATUS_EB_MASK   0x00380000 /* Error Bits Mask */

Definition at line 227 of file xgmac.c.

#define DMA_STATUS_EB_RX_ABORT   0x00100000 /* Error Bits - RX Abort */

Definition at line 229 of file xgmac.c.

#define DMA_STATUS_EB_TX_ABORT   0x00080000 /* Error Bits - TX Abort */

Definition at line 228 of file xgmac.c.

#define DMA_STATUS_ERI   0x00004000 /* Early Receive Interrupt */

Definition at line 236 of file xgmac.c.

#define DMA_STATUS_ETI   0x00000400 /* Early Transmit Interrupt */

Definition at line 238 of file xgmac.c.

#define DMA_STATUS_FBI   0x00002000 /* Fatal Bus Error Interrupt */

Definition at line 237 of file xgmac.c.

#define DMA_STATUS_GLI   0x04000000 /* GMAC Line interface int */

Definition at line 226 of file xgmac.c.

#define DMA_STATUS_GMI   0x08000000 /* MMC interrupt */

Definition at line 225 of file xgmac.c.

#define DMA_STATUS_NIS   0x00010000 /* Normal Interrupt Summary */

Definition at line 234 of file xgmac.c.

#define DMA_STATUS_OVF   0x00000010 /* Receive Overflow */

Definition at line 244 of file xgmac.c.

#define DMA_STATUS_RI   0x00000040 /* Receive Interrupt */

Definition at line 242 of file xgmac.c.

#define DMA_STATUS_RPS   0x00000100 /* Receive Process Stopped */

Definition at line 240 of file xgmac.c.

#define DMA_STATUS_RS_MASK   0x000e0000 /* Receive Process State */

Definition at line 232 of file xgmac.c.

#define DMA_STATUS_RS_SHIFT   17

Definition at line 233 of file xgmac.c.

#define DMA_STATUS_RU   0x00000080 /* Receive Buffer Unavailable */

Definition at line 241 of file xgmac.c.

#define DMA_STATUS_RWT   0x00000200 /* Receive Watchdog Timeout */

Definition at line 239 of file xgmac.c.

#define DMA_STATUS_TI   0x00000001 /* Transmit Interrupt */

Definition at line 248 of file xgmac.c.

#define DMA_STATUS_TJT   0x00000008 /* Transmit Jabber Timeout */

Definition at line 245 of file xgmac.c.

#define DMA_STATUS_TPS   0x00000002 /* Transmit Process Stopped */

Definition at line 247 of file xgmac.c.

#define DMA_STATUS_TS_MASK   0x00700000 /* Transmit Process State */

Definition at line 230 of file xgmac.c.

#define DMA_STATUS_TS_SHIFT   20

Definition at line 231 of file xgmac.c.

#define DMA_STATUS_TU   0x00000004 /* Transmit Buffer Unavail */

Definition at line 246 of file xgmac.c.

#define DMA_STATUS_UNF   0x00000020 /* Transmit Underflow */

Definition at line 243 of file xgmac.c.

#define DMA_TX_RING_SZ   128

Definition at line 400 of file xgmac.c.

#define MAC_ENABLE_RX   0x00000004 /* Receiver Enable */

Definition at line 252 of file xgmac.c.

#define MAC_ENABLE_TX   0x00000008 /* Transmitter Enable */

Definition at line 251 of file xgmac.c.

#define MAX_DESC_BUF_SZ   (0x2000 - 8)

Definition at line 276 of file xgmac.c.

#define MAX_MTU   9000

Definition at line 396 of file xgmac.c.

#define PAUSE_TIME   0x400

Definition at line 397 of file xgmac.c.

#define RXDESC1_END_RING   0x00008000

Definition at line 296 of file xgmac.c.

#define RXDESC_CRC_ERR   0x00000002

Definition at line 279 of file xgmac.c.

#define RXDESC_DA_FILTER_FAIL   0x40000000

Definition at line 294 of file xgmac.c.

#define RXDESC_DESCRIPTOR_ERR   0x00004000

Definition at line 290 of file xgmac.c.

#define RXDESC_ERROR_SUMMARY   0x00008000

Definition at line 291 of file xgmac.c.

#define RXDESC_EXT_STATUS   0x00000001

Definition at line 278 of file xgmac.c.

#define RXDESC_FIRST_SEG   0x00000200

Definition at line 285 of file xgmac.c.

#define RXDESC_FRAME_LEN_MASK   0x3fff0000

Definition at line 293 of file xgmac.c.

#define RXDESC_FRAME_LEN_OFFSET   16

Definition at line 292 of file xgmac.c.

#define RXDESC_FRAME_TYPE   0x00000020

Definition at line 282 of file xgmac.c.

#define RXDESC_GIANT_FRAME   0x00000080

Definition at line 283 of file xgmac.c.

#define RXDESC_IP_HEADER_ERR   0x00000008

Definition at line 302 of file xgmac.c.

#define RXDESC_IP_PAYLOAD_ERR   0x00000010

Definition at line 303 of file xgmac.c.

#define RXDESC_IP_PAYLOAD_ICMP   0x00000003

Definition at line 301 of file xgmac.c.

#define RXDESC_IP_PAYLOAD_MASK   0x00000003

Definition at line 298 of file xgmac.c.

#define RXDESC_IP_PAYLOAD_TCP   0x00000002

Definition at line 300 of file xgmac.c.

#define RXDESC_IP_PAYLOAD_UDP   0x00000001

Definition at line 299 of file xgmac.c.

#define RXDESC_IPV4_PACKET   0x00000040

Definition at line 304 of file xgmac.c.

#define RXDESC_IPV6_PACKET   0x00000080

Definition at line 305 of file xgmac.c.

#define RXDESC_LAST_SEG   0x00000100

Definition at line 284 of file xgmac.c.

#define RXDESC_LENGTH_ERR   0x00001000

Definition at line 288 of file xgmac.c.

#define RXDESC_OVERFLOW_ERR   0x00000800

Definition at line 287 of file xgmac.c.

#define RXDESC_RX_ERR   0x00000008

Definition at line 280 of file xgmac.c.

#define RXDESC_RX_WDOG   0x00000010

Definition at line 281 of file xgmac.c.

#define RXDESC_SA_FILTER_FAIL   0x00002000

Definition at line 289 of file xgmac.c.

#define RXDESC_VLAN_FRAME   0x00000400

Definition at line 286 of file xgmac.c.

#define TX_THRESH   (DMA_TX_RING_SZ/4)

Definition at line 402 of file xgmac.c.

#define TXDESC_2ND_ADDR_CHAINED   0x00100000

Definition at line 317 of file xgmac.c.

#define TXDESC_CRC_EN_APPEND   0x02000000

Definition at line 323 of file xgmac.c.

#define TXDESC_CRC_EN_REPLACE   0x01000000

Definition at line 322 of file xgmac.c.

#define TXDESC_CSUM_ALL   0x00C00000

Definition at line 321 of file xgmac.c.

#define TXDESC_CSUM_IP   0x00400000

Definition at line 319 of file xgmac.c.

#define TXDESC_CSUM_IP_PAYLD   0x00800000

Definition at line 320 of file xgmac.c.

#define TXDESC_DISABLE_PAD   0x04000000

Definition at line 324 of file xgmac.c.

#define TXDESC_END_RING   0x00200000

Definition at line 318 of file xgmac.c.

#define TXDESC_ERROR_SUMMARY   0x00008000

Definition at line 314 of file xgmac.c.

#define TXDESC_FIRST_SEG   0x10000000

Definition at line 325 of file xgmac.c.

#define TXDESC_FRAME_FLUSHED   0x00000020

Definition at line 311 of file xgmac.c.

#define TXDESC_INTERRUPT   0x40000000

Definition at line 327 of file xgmac.c.

#define TXDESC_IP_HEADER_ERR   0x00000040

Definition at line 312 of file xgmac.c.

#define TXDESC_JABBER_TIMEOUT   0x00000002

Definition at line 307 of file xgmac.c.

#define TXDESC_LAST_SEG   0x20000000

Definition at line 326 of file xgmac.c.

#define TXDESC_LOCAL_FAULT   0x00000004

Definition at line 308 of file xgmac.c.

#define TXDESC_PAYLOAD_CSUM_ERR   0x00000080

Definition at line 313 of file xgmac.c.

#define TXDESC_REMOTE_FAULT   0x00000008

Definition at line 309 of file xgmac.c.

#define TXDESC_SA_CTRL_INSERT   0x00040000

Definition at line 315 of file xgmac.c.

#define TXDESC_SA_CTRL_REPLACE   0x00080000

Definition at line 316 of file xgmac.c.

#define TXDESC_UNDERFLOW_ERR   0x00000001

Definition at line 306 of file xgmac.c.

#define TXDESC_VLAN_FRAME   0x00000010

Definition at line 310 of file xgmac.c.

#define XGMAC_ADDR_AE   0x80000000

Definition at line 108 of file xgmac.c.

#define XGMAC_ADDR_HIGH (   reg)    (0x00000040 + ((reg) * 8))

Definition at line 43 of file xgmac.c.

#define XGMAC_ADDR_LOW (   reg)    (0x00000044 + ((reg) * 8))

Definition at line 44 of file xgmac.c.

#define XGMAC_CONTROL   0x00000000 /* MAC Configuration */

Definition at line 31 of file xgmac.c.

#define XGMAC_CONTROL_ACS   0x00000080 /* Automatic Pad/FCS Strip */

Definition at line 135 of file xgmac.c.

#define XGMAC_CONTROL_CAR   0x04000000 /* CRC Addition/Replacement */

Definition at line 127 of file xgmac.c.

#define XGMAC_CONTROL_CAR_MASK   0x06000000

Definition at line 128 of file xgmac.c.

#define XGMAC_CONTROL_DDIC   0x00000010 /* Disable Deficit Idle Count */

Definition at line 136 of file xgmac.c.

#define XGMAC_CONTROL_DP   0x01000000 /* Disable Padding */

Definition at line 129 of file xgmac.c.

#define XGMAC_CONTROL_IPC   0x00000400 /* Checksum Offload */

Definition at line 134 of file xgmac.c.

#define XGMAC_CONTROL_JD   0x00400000 /* Jabber disable */

Definition at line 131 of file xgmac.c.

#define XGMAC_CONTROL_JE   0x00100000 /* Jumbo frame */

Definition at line 132 of file xgmac.c.

#define XGMAC_CONTROL_LM   0x00001000 /* Loop-back mode */

Definition at line 133 of file xgmac.c.

#define XGMAC_CONTROL_RE   0x00000004 /* Receiver Enable */

Definition at line 138 of file xgmac.c.

#define XGMAC_CONTROL_SARC   0x10000000 /* Source Addr Insert/Replace */

Definition at line 125 of file xgmac.c.

#define XGMAC_CONTROL_SARK_MASK   0x18000000

Definition at line 126 of file xgmac.c.

#define XGMAC_CONTROL_SPD   0x40000000 /* Speed control */

Definition at line 120 of file xgmac.c.

#define XGMAC_CONTROL_SPD_10G   0x00000000

Definition at line 124 of file xgmac.c.

#define XGMAC_CONTROL_SPD_1G   0x60000000

Definition at line 122 of file xgmac.c.

#define XGMAC_CONTROL_SPD_2_5G   0x40000000

Definition at line 123 of file xgmac.c.

#define XGMAC_CONTROL_SPD_MASK   0x60000000

Definition at line 121 of file xgmac.c.

#define XGMAC_CONTROL_TE   0x00000008 /* Transmitter Enable */

Definition at line 137 of file xgmac.c.

#define XGMAC_CONTROL_WD   0x00800000 /* Disable Watchdog on rx */

Definition at line 130 of file xgmac.c.

#define XGMAC_DEBUG   0x00000038 /* Debug */

Definition at line 41 of file xgmac.c.

#define XGMAC_DMA_AXI_BUS   0x00000f28 /* AXI Bus Mode */

Definition at line 104 of file xgmac.c.

#define XGMAC_DMA_AXI_STATUS   0x00000f2C /* AXI Status */

Definition at line 105 of file xgmac.c.

#define XGMAC_DMA_BUS_MODE   0x00000f00 /* Bus Mode */

Definition at line 94 of file xgmac.c.

#define XGMAC_DMA_CONTROL   0x00000f18 /* Ctrl (Operational Mode) */

Definition at line 100 of file xgmac.c.

#define XGMAC_DMA_HW_FEATURE   0x00000f58 /* Enabled Hardware Features */

Definition at line 106 of file xgmac.c.

#define XGMAC_DMA_INTR_ENA   0x00000f1c /* Interrupt Enable */

Definition at line 101 of file xgmac.c.

#define XGMAC_DMA_MISS_FRAME_CTR   0x00000f20 /* Missed Frame Counter */

Definition at line 102 of file xgmac.c.

#define XGMAC_DMA_RI_WDOG_TIMER   0x00000f24 /* RX Intr Watchdog Timer */

Definition at line 103 of file xgmac.c.

#define XGMAC_DMA_RX_BASE_ADDR   0x00000f0c /* Receive List Base */

Definition at line 97 of file xgmac.c.

#define XGMAC_DMA_RX_POLL   0x00000f08 /* Received Poll Demand */

Definition at line 96 of file xgmac.c.

#define XGMAC_DMA_STATUS   0x00000f14 /* Status Register */

Definition at line 99 of file xgmac.c.

#define XGMAC_DMA_TX_BASE_ADDR   0x00000f10 /* Transmit List Base */

Definition at line 98 of file xgmac.c.

#define XGMAC_DMA_TX_POLL   0x00000f04 /* Transmit Poll Demand */

Definition at line 95 of file xgmac.c.

#define XGMAC_FLOW_CTRL   0x00000018 /* MAC Flow Control */

Definition at line 33 of file xgmac.c.

#define XGMAC_FLOW_CTRL_DZQP   0x00000080 /* Disable Zero-Quanta Phase */

Definition at line 157 of file xgmac.c.

#define XGMAC_FLOW_CTRL_FCB_BPA   0x00000001 /* Flow Control Busy ... */

Definition at line 163 of file xgmac.c.

#define XGMAC_FLOW_CTRL_PLT   0x00000020 /* Pause Low Threshhold */

Definition at line 158 of file xgmac.c.

#define XGMAC_FLOW_CTRL_PLT_MASK   0x00000030 /* PLT MASK */

Definition at line 159 of file xgmac.c.

#define XGMAC_FLOW_CTRL_PT_MASK   0xffff0000 /* Pause Time Mask */

Definition at line 155 of file xgmac.c.

#define XGMAC_FLOW_CTRL_PT_SHIFT   16

Definition at line 156 of file xgmac.c.

#define XGMAC_FLOW_CTRL_RFE   0x00000004 /* Rx Flow Control Enable */

Definition at line 161 of file xgmac.c.

#define XGMAC_FLOW_CTRL_TFE   0x00000002 /* Tx Flow Control Enable */

Definition at line 162 of file xgmac.c.

#define XGMAC_FLOW_CTRL_UP   0x00000008 /* Unicast Pause Frame Detect */

Definition at line 160 of file xgmac.c.

#define XGMAC_FRAME_FILTER   0x00000004 /* MAC Frame Filter */

Definition at line 32 of file xgmac.c.

#define XGMAC_FRAME_FILTER_DAIF   0x00000008 /* DA Inverse Filtering */

Definition at line 144 of file xgmac.c.

#define XGMAC_FRAME_FILTER_DBF   0x00000020 /* Disable Broadcast frames */

Definition at line 146 of file xgmac.c.

#define XGMAC_FRAME_FILTER_HMC   0x00000004 /* Hash Multicast */

Definition at line 143 of file xgmac.c.

#define XGMAC_FRAME_FILTER_HPF   0x00000400 /* Hash or perfect Filter */

Definition at line 149 of file xgmac.c.

#define XGMAC_FRAME_FILTER_HUC   0x00000002 /* Hash Unicast */

Definition at line 142 of file xgmac.c.

#define XGMAC_FRAME_FILTER_PM   0x00000010 /* Pass all multicast */

Definition at line 145 of file xgmac.c.

#define XGMAC_FRAME_FILTER_PR   0x00000001 /* Promiscuous Mode */

Definition at line 141 of file xgmac.c.

#define XGMAC_FRAME_FILTER_RA   0x80000000 /* Receive all mode */

Definition at line 152 of file xgmac.c.

#define XGMAC_FRAME_FILTER_SAF   0x00000200 /* Source Address Filter */

Definition at line 148 of file xgmac.c.

#define XGMAC_FRAME_FILTER_SAIF   0x00000100 /* Inverse Filtering */

Definition at line 147 of file xgmac.c.

#define XGMAC_FRAME_FILTER_VHF   0x00000800 /* VLAN Hash Filter */

Definition at line 150 of file xgmac.c.

#define XGMAC_FRAME_FILTER_VPF   0x00001000 /* VLAN Perfect Filter */

Definition at line 151 of file xgmac.c.

#define XGMAC_HASH (   n)    (0x00000300 + (n) * 4) /* HASH table regs */

Definition at line 45 of file xgmac.c.

#define XGMAC_HW_STAT (   m,
  reg_offset 
)    { #m, reg_offset, true }

Definition at line 1552 of file xgmac.c.

#define XGMAC_INT_STAT   0x0000003C /* Interrupt and Control */

Definition at line 42 of file xgmac.c.

#define XGMAC_INT_STAT_LPI   0x0040 /* LPI Interrupt Status */

Definition at line 167 of file xgmac.c.

#define XGMAC_INT_STAT_PMT   0x0080 /* PMT Interrupt Status */

Definition at line 166 of file xgmac.c.

#define XGMAC_LPI_CTRL   0x00000028 /* LPI Control and Status */

Definition at line 37 of file xgmac.c.

#define XGMAC_LPI_TIMER   0x0000002C /* LPI Timers Control */

Definition at line 38 of file xgmac.c.

#define XGMAC_MAX_FILTER_ADDR   31

Definition at line 109 of file xgmac.c.

#define XGMAC_MMC_CTRL   0x00000800 /* XGMAC MMC Control */

Definition at line 50 of file xgmac.c.

#define XGMAC_MMC_CTRL_CNT_FRZ   0x00000008

Definition at line 273 of file xgmac.c.

#define XGMAC_MMC_INTR_MASK_RX   0x0000080c /* Recieve Interrupt Mask */

Definition at line 53 of file xgmac.c.

#define XGMAC_MMC_INTR_MASK_TX   0x00000810 /* Transmit Interrupt Mask */

Definition at line 54 of file xgmac.c.

#define XGMAC_MMC_INTR_RX   0x00000804 /* Recieve Interrupt */

Definition at line 51 of file xgmac.c.

#define XGMAC_MMC_INTR_TX   0x00000808 /* Transmit Interrupt */

Definition at line 52 of file xgmac.c.

#define XGMAC_MMC_RXBCFRAME_G   0x00000918

Definition at line 81 of file xgmac.c.

#define XGMAC_MMC_RXCRCERR   0x00000928

Definition at line 83 of file xgmac.c.

#define XGMAC_MMC_RXFRAME_GB_HI   0x00000904

Definition at line 76 of file xgmac.c.

#define XGMAC_MMC_RXFRAME_GB_LO   0x00000900

Definition at line 75 of file xgmac.c.

#define XGMAC_MMC_RXJABBER   0x00000934

Definition at line 85 of file xgmac.c.

#define XGMAC_MMC_RXLENGTHERR   0x00000978

Definition at line 87 of file xgmac.c.

#define XGMAC_MMC_RXMCFRAME_G   0x00000920

Definition at line 82 of file xgmac.c.

#define XGMAC_MMC_RXOCTET_G_HI   0x00000914

Definition at line 80 of file xgmac.c.

#define XGMAC_MMC_RXOCTET_G_LO   0x00000910

Definition at line 79 of file xgmac.c.

#define XGMAC_MMC_RXOCTET_GB_HI   0x0000090C

Definition at line 78 of file xgmac.c.

#define XGMAC_MMC_RXOCTET_GB_LO   0x00000908

Definition at line 77 of file xgmac.c.

#define XGMAC_MMC_RXOVERFLOW   0x00000990

Definition at line 89 of file xgmac.c.

#define XGMAC_MMC_RXPAUSEFRAME   0x00000988

Definition at line 88 of file xgmac.c.

#define XGMAC_MMC_RXRUNT   0x00000930

Definition at line 84 of file xgmac.c.

#define XGMAC_MMC_RXUCFRAME_G   0x00000970

Definition at line 86 of file xgmac.c.

#define XGMAC_MMC_RXVLANFRAME   0x00000998

Definition at line 90 of file xgmac.c.

#define XGMAC_MMC_RXWATCHDOG   0x000009a0

Definition at line 91 of file xgmac.c.

#define XGMAC_MMC_TXBCFRAME_G   0x00000824

Definition at line 61 of file xgmac.c.

#define XGMAC_MMC_TXBCFRAME_GB   0x00000874

Definition at line 65 of file xgmac.c.

#define XGMAC_MMC_TXFRAME_G_HI   0x00000890

Definition at line 70 of file xgmac.c.

#define XGMAC_MMC_TXFRAME_G_LO   0x0000088C

Definition at line 69 of file xgmac.c.

#define XGMAC_MMC_TXFRAME_GB_HI   0x00000820

Definition at line 60 of file xgmac.c.

#define XGMAC_MMC_TXFRAME_GB_LO   0x0000081C

Definition at line 59 of file xgmac.c.

#define XGMAC_MMC_TXMCFRAME_G   0x0000082C

Definition at line 62 of file xgmac.c.

#define XGMAC_MMC_TXMCFRAME_GB   0x0000086C

Definition at line 64 of file xgmac.c.

#define XGMAC_MMC_TXOCTET_G_HI   0x00000888

Definition at line 68 of file xgmac.c.

#define XGMAC_MMC_TXOCTET_G_LO   0x00000884

Definition at line 67 of file xgmac.c.

#define XGMAC_MMC_TXOCTET_GB_HI   0x00000818

Definition at line 58 of file xgmac.c.

#define XGMAC_MMC_TXOCTET_GB_LO   0x00000814

Definition at line 57 of file xgmac.c.

#define XGMAC_MMC_TXPAUSEFRAME   0x00000894

Definition at line 71 of file xgmac.c.

#define XGMAC_MMC_TXUCFRAME_GB   0x00000864

Definition at line 63 of file xgmac.c.

#define XGMAC_MMC_TXUNDERFLOW   0x0000087C

Definition at line 66 of file xgmac.c.

#define XGMAC_MMC_TXVLANFRAME   0x0000089C

Definition at line 72 of file xgmac.c.

#define XGMAC_NUM_HASH   16

Definition at line 46 of file xgmac.c.

#define XGMAC_OMR   0x00000400

Definition at line 47 of file xgmac.c.

#define XGMAC_OMR_DT   0x00000040 /* Drop TCP/IP csum Errors */

Definition at line 265 of file xgmac.c.

#define XGMAC_OMR_EFC   0x00000100 /* Enable Hardware FC */

Definition at line 263 of file xgmac.c.

#define XGMAC_OMR_FEF   0x00000080 /* Forward Error Frames */

Definition at line 264 of file xgmac.c.

#define XGMAC_OMR_FTF   0x00100000 /* Flush Transmit FIFO */

Definition at line 256 of file xgmac.c.

#define XGMAC_OMR_RFA   0x00000600 /* FC Activation Threshhold */

Definition at line 261 of file xgmac.c.

#define XGMAC_OMR_RFA_MASK   0x00000E00 /* FC Act Threshhold MASK */

Definition at line 262 of file xgmac.c.

#define XGMAC_OMR_RFD   0x00006000 /* FC Deactivation Threshhold */

Definition at line 259 of file xgmac.c.

#define XGMAC_OMR_RFD_MASK   0x00007000 /* FC Deact Threshhold MASK */

Definition at line 260 of file xgmac.c.

#define XGMAC_OMR_RSF   0x00000020 /* RX FIFO Store and Forward */

Definition at line 266 of file xgmac.c.

#define XGMAC_OMR_RTC_256   0x00000018 /* RX Threshhold Ctrl */

Definition at line 267 of file xgmac.c.

#define XGMAC_OMR_RTC_MASK   0x00000018 /* RX Threshhold Ctrl MASK */

Definition at line 268 of file xgmac.c.

#define XGMAC_OMR_TSF   0x00200000 /* TX FIFO Store and Forward */

Definition at line 255 of file xgmac.c.

#define XGMAC_OMR_TTC   0x00020000 /* Transmit Threshhold Ctrl */

Definition at line 257 of file xgmac.c.

#define XGMAC_OMR_TTC_MASK   0x00030000

Definition at line 258 of file xgmac.c.

#define XGMAC_PM_OPS   NULL

Definition at line 1890 of file xgmac.c.

#define XGMAC_PMT   0x00000704 /* PMT Control and Status */

Definition at line 49 of file xgmac.c.

#define XGMAC_PMT_GLBL_UNICAST   0x00000200

Definition at line 113 of file xgmac.c.

#define XGMAC_PMT_MAGIC_PKT   0x00000020

Definition at line 115 of file xgmac.c.

#define XGMAC_PMT_MAGIC_PKT_EN   0x00000002

Definition at line 117 of file xgmac.c.

#define XGMAC_PMT_POINTER_RESET   0x80000000

Definition at line 112 of file xgmac.c.

#define XGMAC_PMT_POWERDOWN   0x00000001

Definition at line 118 of file xgmac.c.

#define XGMAC_PMT_WAKEUP_FRM_EN   0x00000004

Definition at line 116 of file xgmac.c.

#define XGMAC_PMT_WAKEUP_RX_FRM   0x00000040

Definition at line 114 of file xgmac.c.

#define XGMAC_REMOTE_WAKE   0x00000700 /* Remote Wake-Up Frm Filter */

Definition at line 48 of file xgmac.c.

#define XGMAC_STAT (   m)    { #m, offsetof(struct xgmac_priv, xstats.m), false }

Definition at line 1550 of file xgmac.c.

#define XGMAC_STATS_LEN   ARRAY_SIZE(xgmac_gstrings_stats)

Definition at line 1577 of file xgmac.c.

#define XGMAC_TX_PACE   0x00000030 /* Transmit Pace and Stretch */

Definition at line 39 of file xgmac.c.

#define XGMAC_VERSION   0x00000020 /* Version */

Definition at line 35 of file xgmac.c.

#define XGMAC_VLAN_HASH   0x00000034 /* VLAN Hash Table */

Definition at line 40 of file xgmac.c.

#define XGMAC_VLAN_INCL   0x00000024 /* VLAN tag for tx frames */

Definition at line 36 of file xgmac.c.

#define XGMAC_VLAN_TAG   0x0000001C /* VLAN Tags */

Definition at line 34 of file xgmac.c.

Function Documentation

MODULE_AUTHOR ( Calxeda,
Inc."   
)
MODULE_DESCRIPTION ( "Calxeda 10G XGMAC driver"  )
MODULE_DEVICE_TABLE ( of  ,
xgmac_of_match   
)
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( xgmac_driver  )