Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
common.h File Reference
#include <linux/etherdevice.h>
#include <linux/netdevice.h>
#include <linux/phy.h>
#include <linux/module.h>
#include <linux/init.h>
#include "descs.h"
#include "mmc.h"

Go to the source code of this file.

Data Structures

struct  stmmac_extra_stats
 
struct  dma_features
 
struct  stmmac_desc_ops
 
struct  stmmac_dma_ops
 
struct  stmmac_ops
 
struct  mac_link
 
struct  mii_regs
 
struct  stmmac_ring_mode_ops
 
struct  mac_device_info
 

Macros

#define CHIP_DBG(fmt, args...)   do { } while (0)
 
#define CSR_F_35M   35000000
 
#define CSR_F_60M   60000000
 
#define CSR_F_100M   100000000
 
#define CSR_F_150M   150000000
 
#define CSR_F_250M   250000000
 
#define CSR_F_300M   300000000
 
#define MAC_CSR_H_FRQ_MASK   0x20
 
#define HASH_TABLE_SIZE   64
 
#define PAUSE_TIME   0x200
 
#define FLOW_OFF   0
 
#define FLOW_RX   1
 
#define FLOW_TX   2
 
#define FLOW_AUTO   (FLOW_TX | FLOW_RX)
 
#define SF_DMA_MODE   1 /* DMA STORE-AND-FORWARD Operation Mode */
 
#define DMA_HW_FEAT_MIISEL   0x00000001 /* 10/100 Mbps Support */
 
#define DMA_HW_FEAT_GMIISEL   0x00000002 /* 1000 Mbps Support */
 
#define DMA_HW_FEAT_HDSEL   0x00000004 /* Half-Duplex Support */
 
#define DMA_HW_FEAT_EXTHASHEN   0x00000008 /* Expanded DA Hash Filter */
 
#define DMA_HW_FEAT_HASHSEL   0x00000010 /* HASH Filter */
 
#define DMA_HW_FEAT_ADDMACADRSEL   0x00000020 /* Multiple MAC Addr Reg */
 
#define DMA_HW_FEAT_PCSSEL   0x00000040 /* PCS registers */
 
#define DMA_HW_FEAT_L3L4FLTREN   0x00000080 /* Layer 3 & Layer 4 Feature */
 
#define DMA_HW_FEAT_SMASEL   0x00000100 /* SMA(MDIO) Interface */
 
#define DMA_HW_FEAT_RWKSEL   0x00000200 /* PMT Remote Wakeup */
 
#define DMA_HW_FEAT_MGKSEL   0x00000400 /* PMT Magic Packet */
 
#define DMA_HW_FEAT_MMCSEL   0x00000800 /* RMON Module */
 
#define DMA_HW_FEAT_TSVER1SEL   0x00001000 /* Only IEEE 1588-2002 Timestamp */
 
#define DMA_HW_FEAT_TSVER2SEL   0x00002000 /* IEEE 1588-2008 Adv Timestamp */
 
#define DMA_HW_FEAT_EEESEL   0x00004000 /* Energy Efficient Ethernet */
 
#define DMA_HW_FEAT_AVSEL   0x00008000 /* AV Feature */
 
#define DMA_HW_FEAT_TXCOESEL   0x00010000 /* Checksum Offload in Tx */
 
#define DMA_HW_FEAT_RXTYP1COE   0x00020000 /* IP csum Offload(Type 1) in Rx */
 
#define DMA_HW_FEAT_RXTYP2COE   0x00040000 /* IP csum Offload(Type 2) in Rx */
 
#define DMA_HW_FEAT_RXFIFOSIZE   0x00080000 /* Rx FIFO > 2048 Bytes */
 
#define DMA_HW_FEAT_RXCHCNT   0x00300000 /* No. of additional Rx Channels */
 
#define DMA_HW_FEAT_TXCHCNT   0x00c00000 /* No. of additional Tx Channels */
 
#define DMA_HW_FEAT_ENHDESSEL   0x01000000 /* Alternate (Enhanced Descriptor) */
 
#define DMA_HW_FEAT_INTTSEN
 
#define DMA_HW_FEAT_FLEXIPPSEN   0x04000000 /* Flexible PPS Output */
 
#define DMA_HW_FEAT_SAVLANINS   0x08000000 /* Source Addr or VLAN Insertion */
 
#define DMA_HW_FEAT_ACTPHYIF   0x70000000 /* Active/selected PHY interface */
 
#define DEFAULT_DMA_PBL   8
 
#define BUF_SIZE_16KiB   16384
 
#define BUF_SIZE_8KiB   8192
 
#define BUF_SIZE_4KiB   4096
 
#define BUF_SIZE_2KiB   2048
 
#define PMT_NOT_SUPPORTED   0
 
#define PMT_SUPPORTED   1
 
#define MAC_CTRL_REG   0x00000000 /* MAC Control */
 
#define MAC_ENABLE_TX   0x00000008 /* Transmitter Enable */
 
#define MAC_RNABLE_RX   0x00000004 /* Receiver Enable */
 
#define STMMAC_DEFAULT_LIT_LS_TIMER   0x3E8
 
#define STMMAC_DEFAULT_TWT_LS_TIMER   0x0
 

Enumerations

enum  rx_frame_status { good_frame = 0, discard_frame = 1, csum_none = 2, llc_snap = 4 }
 
enum  tx_dma_irq_status { tx_hard_error = 1, tx_hard_error_bump_tc = 2, handle_tx_rx = 3 }
 
enum  core_specific_irq_mask {
  core_mmc_tx_irq = 1, core_mmc_rx_irq = 2, core_mmc_rx_csum_offload_irq = 4, core_irq_receive_pmt_irq = 8,
  core_irq_tx_path_in_lpi_mode = 16, core_irq_tx_path_exit_lpi_mode = 32, core_irq_rx_path_in_lpi_mode = 64, core_irq_rx_path_exit_lpi_mode = 128
}
 

Functions

struct mac_device_infodwmac1000_setup (void __iomem *ioaddr)
 
struct mac_device_infodwmac100_setup (void __iomem *ioaddr)
 
void stmmac_set_mac_addr (void __iomem *ioaddr, u8 addr[6], unsigned int high, unsigned int low)
 
void stmmac_get_mac_addr (void __iomem *ioaddr, unsigned char *addr, unsigned int high, unsigned int low)
 
void stmmac_set_mac (void __iomem *ioaddr, bool enable)
 
void dwmac_dma_flush_tx_fifo (void __iomem *ioaddr)
 

Variables

struct stmmac_ring_mode_ops ring_mode_ops
 

Macro Definition Documentation

#define BUF_SIZE_16KiB   16384

Definition at line 220 of file common.h.

#define BUF_SIZE_2KiB   2048

Definition at line 223 of file common.h.

#define BUF_SIZE_4KiB   4096

Definition at line 222 of file common.h.

#define BUF_SIZE_8KiB   8192

Definition at line 221 of file common.h.

#define CHIP_DBG (   fmt,
  args... 
)    do { } while (0)

Definition at line 48 of file common.h.

#define CSR_F_100M   100000000

Definition at line 116 of file common.h.

#define CSR_F_150M   150000000

Definition at line 117 of file common.h.

#define CSR_F_250M   250000000

Definition at line 118 of file common.h.

#define CSR_F_300M   300000000

Definition at line 119 of file common.h.

#define CSR_F_35M   35000000

Definition at line 114 of file common.h.

#define CSR_F_60M   60000000

Definition at line 115 of file common.h.

#define DEFAULT_DMA_PBL   8

Definition at line 162 of file common.h.

#define DMA_HW_FEAT_ACTPHYIF   0x70000000 /* Active/selected PHY interface */

Definition at line 161 of file common.h.

#define DMA_HW_FEAT_ADDMACADRSEL   0x00000020 /* Multiple MAC Addr Reg */

Definition at line 140 of file common.h.

#define DMA_HW_FEAT_AVSEL   0x00008000 /* AV Feature */

Definition at line 150 of file common.h.

#define DMA_HW_FEAT_EEESEL   0x00004000 /* Energy Efficient Ethernet */

Definition at line 149 of file common.h.

#define DMA_HW_FEAT_ENHDESSEL   0x01000000 /* Alternate (Enhanced Descriptor) */

Definition at line 157 of file common.h.

#define DMA_HW_FEAT_EXTHASHEN   0x00000008 /* Expanded DA Hash Filter */

Definition at line 138 of file common.h.

#define DMA_HW_FEAT_FLEXIPPSEN   0x04000000 /* Flexible PPS Output */

Definition at line 159 of file common.h.

#define DMA_HW_FEAT_GMIISEL   0x00000002 /* 1000 Mbps Support */

Definition at line 136 of file common.h.

#define DMA_HW_FEAT_HASHSEL   0x00000010 /* HASH Filter */

Definition at line 139 of file common.h.

#define DMA_HW_FEAT_HDSEL   0x00000004 /* Half-Duplex Support */

Definition at line 137 of file common.h.

#define DMA_HW_FEAT_INTTSEN
Value:
0x02000000 /* Timestamping with Internal
System Time */

Definition at line 158 of file common.h.

#define DMA_HW_FEAT_L3L4FLTREN   0x00000080 /* Layer 3 & Layer 4 Feature */

Definition at line 142 of file common.h.

#define DMA_HW_FEAT_MGKSEL   0x00000400 /* PMT Magic Packet */

Definition at line 145 of file common.h.

#define DMA_HW_FEAT_MIISEL   0x00000001 /* 10/100 Mbps Support */

Definition at line 135 of file common.h.

#define DMA_HW_FEAT_MMCSEL   0x00000800 /* RMON Module */

Definition at line 146 of file common.h.

#define DMA_HW_FEAT_PCSSEL   0x00000040 /* PCS registers */

Definition at line 141 of file common.h.

#define DMA_HW_FEAT_RWKSEL   0x00000200 /* PMT Remote Wakeup */

Definition at line 144 of file common.h.

#define DMA_HW_FEAT_RXCHCNT   0x00300000 /* No. of additional Rx Channels */

Definition at line 155 of file common.h.

#define DMA_HW_FEAT_RXFIFOSIZE   0x00080000 /* Rx FIFO > 2048 Bytes */

Definition at line 154 of file common.h.

#define DMA_HW_FEAT_RXTYP1COE   0x00020000 /* IP csum Offload(Type 1) in Rx */

Definition at line 152 of file common.h.

#define DMA_HW_FEAT_RXTYP2COE   0x00040000 /* IP csum Offload(Type 2) in Rx */

Definition at line 153 of file common.h.

#define DMA_HW_FEAT_SAVLANINS   0x08000000 /* Source Addr or VLAN Insertion */

Definition at line 160 of file common.h.

#define DMA_HW_FEAT_SMASEL   0x00000100 /* SMA(MDIO) Interface */

Definition at line 143 of file common.h.

#define DMA_HW_FEAT_TSVER1SEL   0x00001000 /* Only IEEE 1588-2002 Timestamp */

Definition at line 147 of file common.h.

#define DMA_HW_FEAT_TSVER2SEL   0x00002000 /* IEEE 1588-2008 Adv Timestamp */

Definition at line 148 of file common.h.

#define DMA_HW_FEAT_TXCHCNT   0x00c00000 /* No. of additional Tx Channels */

Definition at line 156 of file common.h.

#define DMA_HW_FEAT_TXCOESEL   0x00010000 /* Checksum Offload in Tx */

Definition at line 151 of file common.h.

#define FLOW_AUTO   (FLOW_TX | FLOW_RX)

Definition at line 130 of file common.h.

#define FLOW_OFF   0

Definition at line 127 of file common.h.

#define FLOW_RX   1

Definition at line 128 of file common.h.

#define FLOW_TX   2

Definition at line 129 of file common.h.

#define HASH_TABLE_SIZE   64

Definition at line 123 of file common.h.

#define MAC_CSR_H_FRQ_MASK   0x20

Definition at line 121 of file common.h.

#define MAC_CTRL_REG   0x00000000 /* MAC Control */

Definition at line 230 of file common.h.

#define MAC_ENABLE_TX   0x00000008 /* Transmitter Enable */

Definition at line 231 of file common.h.

#define MAC_RNABLE_RX   0x00000004 /* Receiver Enable */

Definition at line 232 of file common.h.

#define PAUSE_TIME   0x200

Definition at line 124 of file common.h.

#define PMT_NOT_SUPPORTED   0

Definition at line 226 of file common.h.

#define PMT_SUPPORTED   1

Definition at line 227 of file common.h.

#define SF_DMA_MODE   1 /* DMA STORE-AND-FORWARD Operation Mode */

Definition at line 132 of file common.h.

#define STMMAC_DEFAULT_LIT_LS_TIMER   0x3E8

Definition at line 235 of file common.h.

#define STMMAC_DEFAULT_TWT_LS_TIMER   0x0

Definition at line 236 of file common.h.

Enumeration Type Documentation

Enumerator:
core_mmc_tx_irq 
core_mmc_rx_irq 
core_mmc_rx_csum_offload_irq 
core_irq_receive_pmt_irq 
core_irq_tx_path_in_lpi_mode 
core_irq_tx_path_exit_lpi_mode 
core_irq_rx_path_in_lpi_mode 
core_irq_rx_path_exit_lpi_mode 

Definition at line 177 of file common.h.

Enumerator:
good_frame 
discard_frame 
csum_none 
llc_snap 

Definition at line 164 of file common.h.

Enumerator:
tx_hard_error 
tx_hard_error_bump_tc 
handle_tx_rx 

Definition at line 171 of file common.h.

Function Documentation

struct mac_device_info* dwmac1000_setup ( void __iomem ioaddr)
read

Definition at line 316 of file dwmac1000_core.c.

struct mac_device_info* dwmac100_setup ( void __iomem ioaddr)
read

Definition at line 173 of file dwmac100_core.c.

void dwmac_dma_flush_tx_fifo ( void __iomem ioaddr)

Definition at line 224 of file dwmac_lib.c.

void stmmac_get_mac_addr ( void __iomem ioaddr,
unsigned char addr,
unsigned int  high,
unsigned int  low 
)

Definition at line 260 of file dwmac_lib.c.

void stmmac_set_mac ( void __iomem ioaddr,
bool  enable 
)

Definition at line 248 of file dwmac_lib.c.

void stmmac_set_mac_addr ( void __iomem ioaddr,
u8  addr[6],
unsigned int  high,
unsigned int  low 
)

Definition at line 232 of file dwmac_lib.c.

Variable Documentation

Definition at line 129 of file chain_mode.c.