atl1e.h File Reference

#include <mii.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <byteswap.h>
#include <errno.h>
#include <gpxe/malloc.h>
#include <gpxe/pci.h>
#include <gpxe/pci_io.h>
#include <gpxe/iobuf.h>
#include <gpxe/netdevice.h>
#include <gpxe/ethernet.h>
#include <gpxe/if_ether.h>
#include <gpxe/io.h>

Go to the source code of this file.

Data Structures

struct  atl1e_tpd_desc
struct  atl1e_recv_ret_status
struct  atl1e_hw
struct  atl1e_tx_buffer
struct  atl1e_rx_page
struct  atl1e_rx_page_desc
struct  atl1e_tx_ring
struct  atl1e_rx_ring
struct  atl1e_adapter

Defines

#define ETH_FCS_LEN   4
#define VLAN_HLEN   4
#define NET_IP_ALIGN   2
#define SPEED_0   0xffff
#define SPEED_10   10
#define SPEED_100   100
#define SPEED_1000   1000
#define HALF_DUPLEX   1
#define FULL_DUPLEX   2
#define AT_ERR_EEPROM   1
#define AT_ERR_PHY   2
#define AT_ERR_CONFIG   3
#define AT_ERR_PARAM   4
#define AT_ERR_MAC_TYPE   5
#define AT_ERR_PHY_TYPE   6
#define AT_ERR_PHY_SPEED   7
#define AT_ERR_PHY_RES   8
#define AT_ERR_TIMEOUT   9
#define AT_MAX_RECEIVE_QUEUE   4
#define AT_PAGE_NUM_PER_QUEUE   2
#define AT_TWSI_EEPROM_TIMEOUT   100
#define AT_HW_MAX_IDLE_DELAY   10
#define AT_REGS_LEN   75
#define AT_EEPROM_LEN   512
#define TPD_BUFLEN_MASK   0x3FFF
#define TPD_BUFLEN_SHIFT   0
#define TPD_EOP_MASK   0x0001
#define TPD_EOP_SHIFT   0
#define MAX_TX_BUF_LEN   0x2000
#define MAX_TX_BUF_SHIFT   13
#define RRS_RX_CSUM_MASK   0xFFFF
#define RRS_RX_CSUM_SHIFT   0
#define RRS_PKT_SIZE_MASK   0x3FFF
#define RRS_PKT_SIZE_SHIFT   16
#define RRS_CPU_NUM_MASK   0x0003
#define RRS_CPU_NUM_SHIFT   30
#define RRS_IS_RSS_IPV4   0x0001
#define RRS_IS_RSS_IPV4_TCP   0x0002
#define RRS_IS_RSS_IPV6   0x0004
#define RRS_IS_RSS_IPV6_TCP   0x0008
#define RRS_IS_IPV6   0x0010
#define RRS_IS_IP_FRAG   0x0020
#define RRS_IS_IP_DF   0x0040
#define RRS_IS_802_3   0x0080
#define RRS_IS_VLAN_TAG   0x0100
#define RRS_IS_ERR_FRAME   0x0200
#define RRS_IS_IPV4   0x0400
#define RRS_IS_UDP   0x0800
#define RRS_IS_TCP   0x1000
#define RRS_IS_BCAST   0x2000
#define RRS_IS_MCAST   0x4000
#define RRS_IS_PAUSE   0x8000
#define RRS_ERR_BAD_CRC   0x0001
#define RRS_ERR_CODE   0x0002
#define RRS_ERR_DRIBBLE   0x0004
#define RRS_ERR_RUNT   0x0008
#define RRS_ERR_RX_OVERFLOW   0x0010
#define RRS_ERR_TRUNC   0x0020
#define RRS_ERR_IP_CSUM   0x0040
#define RRS_ERR_L4_CSUM   0x0080
#define RRS_ERR_LENGTH   0x0100
#define RRS_ERR_DES_ADDR   0x0200
#define AT_WRITE_REG(a, reg, value)   writel((value), ((a)->hw_addr + reg))
#define AT_WRITE_FLUSH(a)   readl((a)->hw_addr)
#define AT_READ_REG(a, reg)   readl((a)->hw_addr + reg)
#define AT_WRITE_REGB(a, reg, value)   writeb((value), ((a)->hw_addr + reg))
#define AT_READ_REGB(a, reg)   readb((a)->hw_addr + reg)
#define AT_WRITE_REGW(a, reg, value)   writew((value), ((a)->hw_addr + reg))
#define AT_READ_REGW(a, reg)   readw((a)->hw_addr + reg)
#define AT_WRITE_REG_ARRAY(a, reg, offset, value)   writel((value), (((a)->hw_addr + reg) + ((offset) << 2)))
#define AT_READ_REG_ARRAY(a, reg, offset)   readl(((a)->hw_addr + reg) + ((offset) << 2))
#define REG_PM_CTRLSTAT   0x44
#define REG_PCIE_CAP_LIST   0x58
#define REG_DEVICE_CAP   0x5C
#define DEVICE_CAP_MAX_PAYLOAD_MASK   0x7
#define DEVICE_CAP_MAX_PAYLOAD_SHIFT   0
#define REG_DEVICE_CTRL   0x60
#define DEVICE_CTRL_MAX_PAYLOAD_MASK   0x7
#define DEVICE_CTRL_MAX_PAYLOAD_SHIFT   5
#define DEVICE_CTRL_MAX_RREQ_SZ_MASK   0x7
#define DEVICE_CTRL_MAX_RREQ_SZ_SHIFT   12
#define REG_VPD_CAP   0x6C
#define VPD_CAP_ID_MASK   0xff
#define VPD_CAP_ID_SHIFT   0
#define VPD_CAP_NEXT_PTR_MASK   0xFF
#define VPD_CAP_NEXT_PTR_SHIFT   8
#define VPD_CAP_VPD_ADDR_MASK   0x7FFF
#define VPD_CAP_VPD_ADDR_SHIFT   16
#define VPD_CAP_VPD_FLAG   0x80000000
#define REG_VPD_DATA   0x70
#define REG_SPI_FLASH_CTRL   0x200
#define SPI_FLASH_CTRL_STS_NON_RDY   0x1
#define SPI_FLASH_CTRL_STS_WEN   0x2
#define SPI_FLASH_CTRL_STS_WPEN   0x80
#define SPI_FLASH_CTRL_DEV_STS_MASK   0xFF
#define SPI_FLASH_CTRL_DEV_STS_SHIFT   0
#define SPI_FLASH_CTRL_INS_MASK   0x7
#define SPI_FLASH_CTRL_INS_SHIFT   8
#define SPI_FLASH_CTRL_START   0x800
#define SPI_FLASH_CTRL_EN_VPD   0x2000
#define SPI_FLASH_CTRL_LDSTART   0x8000
#define SPI_FLASH_CTRL_CS_HI_MASK   0x3
#define SPI_FLASH_CTRL_CS_HI_SHIFT   16
#define SPI_FLASH_CTRL_CS_HOLD_MASK   0x3
#define SPI_FLASH_CTRL_CS_HOLD_SHIFT   18
#define SPI_FLASH_CTRL_CLK_LO_MASK   0x3
#define SPI_FLASH_CTRL_CLK_LO_SHIFT   20
#define SPI_FLASH_CTRL_CLK_HI_MASK   0x3
#define SPI_FLASH_CTRL_CLK_HI_SHIFT   22
#define SPI_FLASH_CTRL_CS_SETUP_MASK   0x3
#define SPI_FLASH_CTRL_CS_SETUP_SHIFT   24
#define SPI_FLASH_CTRL_EROM_PGSZ_MASK   0x3
#define SPI_FLASH_CTRL_EROM_PGSZ_SHIFT   26
#define SPI_FLASH_CTRL_WAIT_READY   0x10000000
#define REG_SPI_ADDR   0x204
#define REG_SPI_DATA   0x208
#define REG_SPI_FLASH_CONFIG   0x20C
#define SPI_FLASH_CONFIG_LD_ADDR_MASK   0xFFFFFF
#define SPI_FLASH_CONFIG_LD_ADDR_SHIFT   0
#define SPI_FLASH_CONFIG_VPD_ADDR_MASK   0x3
#define SPI_FLASH_CONFIG_VPD_ADDR_SHIFT   24
#define SPI_FLASH_CONFIG_LD_EXIST   0x4000000
#define REG_SPI_FLASH_OP_PROGRAM   0x210
#define REG_SPI_FLASH_OP_SC_ERASE   0x211
#define REG_SPI_FLASH_OP_CHIP_ERASE   0x212
#define REG_SPI_FLASH_OP_RDID   0x213
#define REG_SPI_FLASH_OP_WREN   0x214
#define REG_SPI_FLASH_OP_RDSR   0x215
#define REG_SPI_FLASH_OP_WRSR   0x216
#define REG_SPI_FLASH_OP_READ   0x217
#define REG_TWSI_CTRL   0x218
#define TWSI_CTRL_LD_OFFSET_MASK   0xFF
#define TWSI_CTRL_LD_OFFSET_SHIFT   0
#define TWSI_CTRL_LD_SLV_ADDR_MASK   0x7
#define TWSI_CTRL_LD_SLV_ADDR_SHIFT   8
#define TWSI_CTRL_SW_LDSTART   0x800
#define TWSI_CTRL_HW_LDSTART   0x1000
#define TWSI_CTRL_SMB_SLV_ADDR_MASK   0x0x7F
#define TWSI_CTRL_SMB_SLV_ADDR_SHIFT   15
#define TWSI_CTRL_LD_EXIST   0x400000
#define TWSI_CTRL_READ_FREQ_SEL_MASK   0x3
#define TWSI_CTRL_READ_FREQ_SEL_SHIFT   23
#define TWSI_CTRL_FREQ_SEL_100K   0
#define TWSI_CTRL_FREQ_SEL_200K   1
#define TWSI_CTRL_FREQ_SEL_300K   2
#define TWSI_CTRL_FREQ_SEL_400K   3
#define TWSI_CTRL_SMB_SLV_ADDR
#define TWSI_CTRL_WRITE_FREQ_SEL_MASK   0x3
#define TWSI_CTRL_WRITE_FREQ_SEL_SHIFT   24
#define REG_PCIE_DEV_MISC_CTRL   0x21C
#define PCIE_DEV_MISC_CTRL_EXT_PIPE   0x2
#define PCIE_DEV_MISC_CTRL_RETRY_BUFDIS   0x1
#define PCIE_DEV_MISC_CTRL_SPIROM_EXIST   0x4
#define PCIE_DEV_MISC_CTRL_SERDES_ENDIAN   0x8
#define PCIE_DEV_MISC_CTRL_SERDES_SEL_DIN   0x10
#define REG_PCIE_PHYMISC   0x1000
#define PCIE_PHYMISC_FORCE_RCV_DET   0x4
#define REG_LTSSM_TEST_MODE   0x12FC
#define LTSSM_TEST_MODE_DEF   0xE000
#define REG_MASTER_CTRL   0x1400
#define MASTER_CTRL_SOFT_RST   0x1
#define MASTER_CTRL_MTIMER_EN   0x2
#define MASTER_CTRL_ITIMER_EN   0x4
#define MASTER_CTRL_MANUAL_INT   0x8
#define MASTER_CTRL_ITIMER2_EN   0x20
#define MASTER_CTRL_INT_RDCLR   0x40
#define MASTER_CTRL_LED_MODE   0x200
#define MASTER_CTRL_REV_NUM_SHIFT   16
#define MASTER_CTRL_REV_NUM_MASK   0xff
#define MASTER_CTRL_DEV_ID_SHIFT   24
#define MASTER_CTRL_DEV_ID_MASK   0xff
#define REG_MANUAL_TIMER_INIT   0x1404
#define REG_IRQ_MODU_TIMER_INIT   0x1408
#define REG_IRQ_MODU_TIMER2_INIT   0x140A
#define REG_GPHY_CTRL   0x140C
#define GPHY_CTRL_EXT_RESET   1
#define GPHY_CTRL_PIPE_MOD   2
#define GPHY_CTRL_TEST_MODE_MASK   3
#define GPHY_CTRL_TEST_MODE_SHIFT   2
#define GPHY_CTRL_BERT_START   0x10
#define GPHY_CTRL_GATE_25M_EN   0x20
#define GPHY_CTRL_LPW_EXIT   0x40
#define GPHY_CTRL_PHY_IDDQ   0x80
#define GPHY_CTRL_PHY_IDDQ_DIS   0x100
#define GPHY_CTRL_PCLK_SEL_DIS   0x200
#define GPHY_CTRL_HIB_EN   0x400
#define GPHY_CTRL_HIB_PULSE   0x800
#define GPHY_CTRL_SEL_ANA_RST   0x1000
#define GPHY_CTRL_PHY_PLL_ON   0x2000
#define GPHY_CTRL_PWDOWN_HW   0x4000
#define GPHY_CTRL_DEFAULT
#define GPHY_CTRL_PW_WOL_DIS
#define REG_CMBDISDMA_TIMER   0x140E
#define REG_IDLE_STATUS   0x1410
#define IDLE_STATUS_RXMAC   1
#define IDLE_STATUS_TXMAC   2
#define IDLE_STATUS_RXQ   4
#define IDLE_STATUS_TXQ   8
#define IDLE_STATUS_DMAR   0x10
#define IDLE_STATUS_DMAW   0x20
#define IDLE_STATUS_SMB   0x40
#define IDLE_STATUS_CMB   0x80
#define REG_MDIO_CTRL   0x1414
#define MDIO_DATA_MASK   0xffff
#define MDIO_DATA_SHIFT   0
#define MDIO_REG_ADDR_MASK   0x1f
#define MDIO_REG_ADDR_SHIFT   16
#define MDIO_RW   0x200000
#define MDIO_SUP_PREAMBLE   0x400000
#define MDIO_START   0x800000
#define MDIO_CLK_SEL_SHIFT   24
#define MDIO_CLK_25_4   0
#define MDIO_CLK_25_6   2
#define MDIO_CLK_25_8   3
#define MDIO_CLK_25_10   4
#define MDIO_CLK_25_14   5
#define MDIO_CLK_25_20   6
#define MDIO_CLK_25_28   7
#define MDIO_BUSY   0x8000000
#define MDIO_AP_EN   0x10000000
#define MDIO_WAIT_TIMES   10
#define REG_PHY_STATUS   0x1418
#define PHY_STATUS_100M   0x20000
#define PHY_STATUS_EMI_CA   0x40000
#define REG_BIST0_CTRL   0x141c
#define BIST0_NOW   0x1
#define BIST0_SRAM_FAIL   0x2
#define BIST0_FUSE_FLAG   0x4
#define REG_BIST1_CTRL   0x1420
#define BIST1_NOW   0x1
#define BIST1_SRAM_FAIL   0x2
#define BIST1_FUSE_FLAG   0x4
#define REG_SERDES_LOCK   0x1424
#define SERDES_LOCK_DETECT   1
#define SERDES_LOCK_DETECT_EN   2
#define REG_MAC_CTRL   0x1480
#define MAC_CTRL_TX_EN   1
#define MAC_CTRL_RX_EN   2
#define MAC_CTRL_TX_FLOW   4
#define MAC_CTRL_RX_FLOW   8
#define MAC_CTRL_LOOPBACK   0x10
#define MAC_CTRL_DUPLX   0x20
#define MAC_CTRL_ADD_CRC   0x40
#define MAC_CTRL_PAD   0x80
#define MAC_CTRL_LENCHK   0x100
#define MAC_CTRL_HUGE_EN   0x200
#define MAC_CTRL_PRMLEN_SHIFT   10
#define MAC_CTRL_PRMLEN_MASK   0xf
#define MAC_CTRL_RMV_VLAN   0x4000
#define MAC_CTRL_PROMIS_EN   0x8000
#define MAC_CTRL_TX_PAUSE   0x10000
#define MAC_CTRL_SCNT   0x20000
#define MAC_CTRL_SRST_TX   0x40000
#define MAC_CTRL_TX_SIMURST   0x80000
#define MAC_CTRL_SPEED_SHIFT   20
#define MAC_CTRL_SPEED_MASK   0x300000
#define MAC_CTRL_SPEED_1000   2
#define MAC_CTRL_SPEED_10_100   1
#define MAC_CTRL_DBG_TX_BKPRESURE   0x400000
#define MAC_CTRL_TX_HUGE   0x800000
#define MAC_CTRL_RX_CHKSUM_EN   0x1000000
#define MAC_CTRL_MC_ALL_EN   0x2000000
#define MAC_CTRL_BC_EN   0x4000000
#define MAC_CTRL_DBG   0x8000000
#define REG_MAC_IPG_IFG   0x1484
#define MAC_IPG_IFG_IPGT_SHIFT   0
#define MAC_IPG_IFG_IPGT_MASK   0x7f
#define MAC_IPG_IFG_MIFG_SHIFT   8
#define MAC_IPG_IFG_MIFG_MASK   0xff
#define MAC_IPG_IFG_IPGR1_SHIFT   16
#define MAC_IPG_IFG_IPGR1_MASK   0x7f
#define MAC_IPG_IFG_IPGR2_SHIFT   24
#define MAC_IPG_IFG_IPGR2_MASK   0x7f
#define REG_MAC_STA_ADDR   0x1488
#define REG_RX_HASH_TABLE   0x1490
#define REG_MAC_HALF_DUPLX_CTRL   0x1498
#define MAC_HALF_DUPLX_CTRL_LCOL_SHIFT   0
#define MAC_HALF_DUPLX_CTRL_LCOL_MASK   0x3ff
#define MAC_HALF_DUPLX_CTRL_RETRY_SHIFT   12
#define MAC_HALF_DUPLX_CTRL_RETRY_MASK   0xf
#define MAC_HALF_DUPLX_CTRL_EXC_DEF_EN   0x10000
#define MAC_HALF_DUPLX_CTRL_NO_BACK_C   0x20000
#define MAC_HALF_DUPLX_CTRL_NO_BACK_P   0x40000
#define MAC_HALF_DUPLX_CTRL_ABEBE   0x80000
#define MAC_HALF_DUPLX_CTRL_ABEBT_SHIFT   20
#define MAC_HALF_DUPLX_CTRL_ABEBT_MASK   0xf
#define MAC_HALF_DUPLX_CTRL_JAMIPG_SHIFT   24
#define MAC_HALF_DUPLX_CTRL_JAMIPG_MASK   0xf
#define REG_MTU   0x149c
#define REG_WOL_CTRL   0x14a0
#define WOL_PATTERN_EN   0x00000001
#define WOL_PATTERN_PME_EN   0x00000002
#define WOL_MAGIC_EN   0x00000004
#define WOL_MAGIC_PME_EN   0x00000008
#define WOL_LINK_CHG_EN   0x00000010
#define WOL_LINK_CHG_PME_EN   0x00000020
#define WOL_PATTERN_ST   0x00000100
#define WOL_MAGIC_ST   0x00000200
#define WOL_LINKCHG_ST   0x00000400
#define WOL_CLK_SWITCH_EN   0x00008000
#define WOL_PT0_EN   0x00010000
#define WOL_PT1_EN   0x00020000
#define WOL_PT2_EN   0x00040000
#define WOL_PT3_EN   0x00080000
#define WOL_PT4_EN   0x00100000
#define WOL_PT5_EN   0x00200000
#define WOL_PT6_EN   0x00400000
#define REG_WOL_PATTERN_LEN   0x14a4
#define WOL_PT_LEN_MASK   0x7f
#define WOL_PT0_LEN_SHIFT   0
#define WOL_PT1_LEN_SHIFT   8
#define WOL_PT2_LEN_SHIFT   16
#define WOL_PT3_LEN_SHIFT   24
#define WOL_PT4_LEN_SHIFT   0
#define WOL_PT5_LEN_SHIFT   8
#define WOL_PT6_LEN_SHIFT   16
#define REG_SRAM_TRD_ADDR   0x1518
#define REG_SRAM_TRD_LEN   0x151C
#define REG_SRAM_RXF_ADDR   0x1520
#define REG_SRAM_RXF_LEN   0x1524
#define REG_SRAM_TXF_ADDR   0x1528
#define REG_SRAM_TXF_LEN   0x152C
#define REG_SRAM_TCPH_ADDR   0x1530
#define REG_SRAM_PKTH_ADDR   0x1532
#define REG_LOAD_PTR   0x1534
#define REG_RXF3_BASE_ADDR_HI   0x153C
#define REG_DESC_BASE_ADDR_HI   0x1540
#define REG_RXF0_BASE_ADDR_HI   0x1540
#define REG_HOST_RXF0_PAGE0_LO   0x1544
#define REG_HOST_RXF0_PAGE1_LO   0x1548
#define REG_TPD_BASE_ADDR_LO   0x154C
#define REG_RXF1_BASE_ADDR_HI   0x1550
#define REG_RXF2_BASE_ADDR_HI   0x1554
#define REG_HOST_RXFPAGE_SIZE   0x1558
#define REG_TPD_RING_SIZE   0x155C
#define REG_RSS_KEY0   0x14B0
#define REG_RSS_KEY1   0x14B4
#define REG_RSS_KEY2   0x14B8
#define REG_RSS_KEY3   0x14BC
#define REG_RSS_KEY4   0x14C0
#define REG_RSS_KEY5   0x14C4
#define REG_RSS_KEY6   0x14C8
#define REG_RSS_KEY7   0x14CC
#define REG_RSS_KEY8   0x14D0
#define REG_RSS_KEY9   0x14D4
#define REG_IDT_TABLE4   0x14E0
#define REG_IDT_TABLE5   0x14E4
#define REG_IDT_TABLE6   0x14E8
#define REG_IDT_TABLE7   0x14EC
#define REG_IDT_TABLE0   0x1560
#define REG_IDT_TABLE1   0x1564
#define REG_IDT_TABLE2   0x1568
#define REG_IDT_TABLE3   0x156C
#define REG_IDT_TABLE   REG_IDT_TABLE0
#define REG_RSS_HASH_VALUE   0x1570
#define REG_RSS_HASH_FLAG   0x1574
#define REG_BASE_CPU_NUMBER   0x157C
#define REG_TXQ_CTRL   0x1580
#define TXQ_CTRL_NUM_TPD_BURST_MASK   0xF
#define TXQ_CTRL_NUM_TPD_BURST_SHIFT   0
#define TXQ_CTRL_EN   0x20
#define TXQ_CTRL_ENH_MODE   0x40
#define TXQ_CTRL_TXF_BURST_NUM_SHIFT   16
#define TXQ_CTRL_TXF_BURST_NUM_MASK   0xffff
#define REG_TX_EARLY_TH   0x1584
#define TX_TX_EARLY_TH_MASK   0x7ff
#define TX_TX_EARLY_TH_SHIFT   0
#define REG_RXQ_CTRL   0x15A0
#define RXQ_CTRL_PBA_ALIGN_32   0
#define RXQ_CTRL_PBA_ALIGN_64   1
#define RXQ_CTRL_PBA_ALIGN_128   2
#define RXQ_CTRL_PBA_ALIGN_256   3
#define RXQ_CTRL_Q1_EN   0x10
#define RXQ_CTRL_Q2_EN   0x20
#define RXQ_CTRL_Q3_EN   0x40
#define RXQ_CTRL_IPV6_XSUM_VERIFY_EN   0x80
#define RXQ_CTRL_HASH_TLEN_SHIFT   8
#define RXQ_CTRL_HASH_TLEN_MASK   0xFF
#define RXQ_CTRL_HASH_TYPE_IPV4   0x10000
#define RXQ_CTRL_HASH_TYPE_IPV4_TCP   0x20000
#define RXQ_CTRL_HASH_TYPE_IPV6   0x40000
#define RXQ_CTRL_HASH_TYPE_IPV6_TCP   0x80000
#define RXQ_CTRL_RSS_MODE_DISABLE   0
#define RXQ_CTRL_RSS_MODE_SQSINT   0x4000000
#define RXQ_CTRL_RSS_MODE_MQUESINT   0x8000000
#define RXQ_CTRL_RSS_MODE_MQUEMINT   0xC000000
#define RXQ_CTRL_NIP_QUEUE_SEL_TBL   0x10000000
#define RXQ_CTRL_HASH_ENABLE   0x20000000
#define RXQ_CTRL_CUT_THRU_EN   0x40000000
#define RXQ_CTRL_EN   0x80000000
#define REG_RXQ_JMBOSZ_RRDTIM   0x15A4
#define RXQ_JMBOSZ_TH_MASK   0x7ff
#define RXQ_JMBOSZ_TH_SHIFT   0
#define RXQ_JMBO_LKAH_MASK   0xf
#define RXQ_JMBO_LKAH_SHIFT   11
#define REG_RXQ_RXF_PAUSE_THRESH   0x15A8
#define RXQ_RXF_PAUSE_TH_HI_SHIFT   0
#define RXQ_RXF_PAUSE_TH_HI_MASK   0xfff
#define RXQ_RXF_PAUSE_TH_LO_SHIFT   16
#define RXQ_RXF_PAUSE_TH_LO_MASK   0xfff
#define REG_DMA_CTRL   0x15C0
#define DMA_CTRL_DMAR_IN_ORDER   0x1
#define DMA_CTRL_DMAR_ENH_ORDER   0x2
#define DMA_CTRL_DMAR_OUT_ORDER   0x4
#define DMA_CTRL_RCB_VALUE   0x8
#define DMA_CTRL_DMAR_BURST_LEN_SHIFT   4
#define DMA_CTRL_DMAR_BURST_LEN_MASK   7
#define DMA_CTRL_DMAW_BURST_LEN_SHIFT   7
#define DMA_CTRL_DMAW_BURST_LEN_MASK   7
#define DMA_CTRL_DMAR_REQ_PRI   0x400
#define DMA_CTRL_DMAR_DLY_CNT_MASK   0x1F
#define DMA_CTRL_DMAR_DLY_CNT_SHIFT   11
#define DMA_CTRL_DMAW_DLY_CNT_MASK   0xF
#define DMA_CTRL_DMAW_DLY_CNT_SHIFT   16
#define DMA_CTRL_TXCMB_EN   0x100000
#define DMA_CTRL_RXCMB_EN   0x200000
#define REG_SMB_STAT_TIMER   0x15C4
#define REG_TRIG_RRD_THRESH   0x15CA
#define REG_TRIG_TPD_THRESH   0x15C8
#define REG_TRIG_TXTIMER   0x15CC
#define REG_TRIG_RXTIMER   0x15CE
#define REG_HOST_RXF1_PAGE0_LO   0x15D0
#define REG_HOST_RXF1_PAGE1_LO   0x15D4
#define REG_HOST_RXF2_PAGE0_LO   0x15D8
#define REG_HOST_RXF2_PAGE1_LO   0x15DC
#define REG_HOST_RXF3_PAGE0_LO   0x15E0
#define REG_HOST_RXF3_PAGE1_LO   0x15E4
#define REG_MB_RXF1_RADDR   0x15B4
#define REG_MB_RXF2_RADDR   0x15B8
#define REG_MB_RXF3_RADDR   0x15BC
#define REG_MB_TPD_PROD_IDX   0x15F0
#define REG_HOST_RXF0_PAGE0_VLD   0x15F4
#define HOST_RXF_VALID   1
#define HOST_RXF_PAGENO_SHIFT   1
#define HOST_RXF_PAGENO_MASK   0x7F
#define REG_HOST_RXF0_PAGE1_VLD   0x15F5
#define REG_HOST_RXF1_PAGE0_VLD   0x15F6
#define REG_HOST_RXF1_PAGE1_VLD   0x15F7
#define REG_HOST_RXF2_PAGE0_VLD   0x15F8
#define REG_HOST_RXF2_PAGE1_VLD   0x15F9
#define REG_HOST_RXF3_PAGE0_VLD   0x15FA
#define REG_HOST_RXF3_PAGE1_VLD   0x15FB
#define REG_ISR   0x1600
#define ISR_SMB   1
#define ISR_TIMER   2
#define ISR_MANUAL   4
#define ISR_HW_RXF_OV   8
#define ISR_HOST_RXF0_OV   0x10
#define ISR_HOST_RXF1_OV   0x20
#define ISR_HOST_RXF2_OV   0x40
#define ISR_HOST_RXF3_OV   0x80
#define ISR_TXF_UN   0x100
#define ISR_RX0_PAGE_FULL   0x200
#define ISR_DMAR_TO_RST   0x400
#define ISR_DMAW_TO_RST   0x800
#define ISR_GPHY   0x1000
#define ISR_TX_CREDIT   0x2000
#define ISR_GPHY_LPW   0x4000
#define ISR_RX_PKT   0x10000
#define ISR_TX_PKT   0x20000
#define ISR_TX_DMA   0x40000
#define ISR_RX_PKT_1   0x80000
#define ISR_RX_PKT_2   0x100000
#define ISR_RX_PKT_3   0x200000
#define ISR_MAC_RX   0x400000
#define ISR_MAC_TX   0x800000
#define ISR_UR_DETECTED   0x1000000
#define ISR_FERR_DETECTED   0x2000000
#define ISR_NFERR_DETECTED   0x4000000
#define ISR_CERR_DETECTED   0x8000000
#define ISR_PHY_LINKDOWN   0x10000000
#define ISR_DIS_INT   0x80000000
#define REG_IMR   0x1604
#define IMR_NORMAL_MASK
#define ISR_TX_EVENT   (ISR_TXF_UN | ISR_TX_PKT)
#define ISR_RX_EVENT   (ISR_HOST_RXF0_OV | ISR_HW_RXF_OV | ISR_RX_PKT)
#define REG_MAC_RX_STATUS_BIN   0x1700
#define REG_MAC_RX_STATUS_END   0x175c
#define REG_MAC_TX_STATUS_BIN   0x1760
#define REG_MAC_TX_STATUS_END   0x17c0
#define REG_HOST_RXF0_PAGEOFF   0x1800
#define REG_TPD_CONS_IDX   0x1804
#define REG_HOST_RXF1_PAGEOFF   0x1808
#define REG_HOST_RXF2_PAGEOFF   0x180C
#define REG_HOST_RXF3_PAGEOFF   0x1810
#define REG_HOST_RXF0_MB0_LO   0x1820
#define REG_HOST_RXF0_MB1_LO   0x1824
#define REG_HOST_RXF1_MB0_LO   0x1828
#define REG_HOST_RXF1_MB1_LO   0x182C
#define REG_HOST_RXF2_MB0_LO   0x1830
#define REG_HOST_RXF2_MB1_LO   0x1834
#define REG_HOST_RXF3_MB0_LO   0x1838
#define REG_HOST_RXF3_MB1_LO   0x183C
#define REG_HOST_TX_CMB_LO   0x1840
#define REG_HOST_SMB_ADDR_LO   0x1844
#define REG_DEBUG_DATA0   0x1900
#define REG_DEBUG_DATA1   0x1904
#define MII_BMCR   0x00
#define MII_BMSR   0x01
#define MII_PHYSID1   0x02
#define MII_PHYSID2   0x03
#define MII_ADVERTISE   0x04
#define MII_LPA   0x05
#define MII_EXPANSION   0x06
#define MII_AT001_CR   0x09
#define MII_AT001_SR   0x0A
#define MII_AT001_ESR   0x0F
#define MII_AT001_PSCR   0x10
#define MII_AT001_PSSR   0x11
#define MII_INT_CTRL   0x12
#define MII_INT_STATUS   0x13
#define MII_SMARTSPEED   0x14
#define MII_RERRCOUNTER   0x15
#define MII_SREVISION   0x16
#define MII_RESV1   0x17
#define MII_LBRERROR   0x18
#define MII_PHYADDR   0x19
#define MII_RESV2   0x1a
#define MII_TPISTATUS   0x1b
#define MII_NCONFIG   0x1c
#define MII_DBG_ADDR   0x1D
#define MII_DBG_DATA   0x1E
#define MII_CR_SPEED_SELECT_MSB   0x0040
#define MII_CR_COLL_TEST_ENABLE   0x0080
#define MII_CR_FULL_DUPLEX   0x0100
#define MII_CR_RESTART_AUTO_NEG   0x0200
#define MII_CR_ISOLATE   0x0400
#define MII_CR_POWER_DOWN   0x0800
#define MII_CR_AUTO_NEG_EN   0x1000
#define MII_CR_SPEED_SELECT_LSB   0x2000
#define MII_CR_LOOPBACK   0x4000
#define MII_CR_RESET   0x8000
#define MII_CR_SPEED_MASK   0x2040
#define MII_CR_SPEED_1000   0x0040
#define MII_CR_SPEED_100   0x2000
#define MII_CR_SPEED_10   0x0000
#define MII_SR_EXTENDED_CAPS   0x0001
#define MII_SR_JABBER_DETECT   0x0002
#define MII_SR_LINK_STATUS   0x0004
#define MII_SR_AUTONEG_CAPS   0x0008
#define MII_SR_REMOTE_FAULT   0x0010
#define MII_SR_AUTONEG_COMPLETE   0x0020
#define MII_SR_PREAMBLE_SUPPRESS   0x0040
#define MII_SR_EXTENDED_STATUS   0x0100
#define MII_SR_100T2_HD_CAPS   0x0200
#define MII_SR_100T2_FD_CAPS   0x0400
#define MII_SR_10T_HD_CAPS   0x0800
#define MII_SR_10T_FD_CAPS   0x1000
#define MII_SR_100X_HD_CAPS   0x2000
#define MII_SR_100X_FD_CAPS   0x4000
#define MII_SR_100T4_CAPS   0x8000
#define MII_LPA_SLCT   0x001f
#define MII_LPA_10HALF   0x0020
#define MII_LPA_10FULL   0x0040
#define MII_LPA_100HALF   0x0080
#define MII_LPA_100FULL   0x0100
#define MII_LPA_100BASE4   0x0200
#define MII_LPA_PAUSE   0x0400
#define MII_LPA_ASYPAUSE   0x0800
#define MII_LPA_RFAULT   0x2000
#define MII_LPA_LPACK   0x4000
#define MII_LPA_NPAGE   0x8000
#define MII_AR_SELECTOR_FIELD   0x0001
#define MII_AR_10T_HD_CAPS   0x0020
#define MII_AR_10T_FD_CAPS   0x0040
#define MII_AR_100TX_HD_CAPS   0x0080
#define MII_AR_100TX_FD_CAPS   0x0100
#define MII_AR_100T4_CAPS   0x0200
#define MII_AR_PAUSE   0x0400
#define MII_AR_ASM_DIR   0x0800
#define MII_AR_REMOTE_FAULT   0x2000
#define MII_AR_NEXT_PAGE   0x8000
#define MII_AR_SPEED_MASK   0x01E0
#define MII_AR_DEFAULT_CAP_MASK   0x0DE0
#define MII_AT001_CR_1000T_HD_CAPS   0x0100
#define MII_AT001_CR_1000T_FD_CAPS   0x0200
#define MII_AT001_CR_1000T_REPEATER_DTE   0x0400
#define MII_AT001_CR_1000T_MS_VALUE   0x0800
#define MII_AT001_CR_1000T_MS_ENABLE   0x1000
#define MII_AT001_CR_1000T_TEST_MODE_NORMAL   0x0000
#define MII_AT001_CR_1000T_TEST_MODE_1   0x2000
#define MII_AT001_CR_1000T_TEST_MODE_2   0x4000
#define MII_AT001_CR_1000T_TEST_MODE_3   0x6000
#define MII_AT001_CR_1000T_TEST_MODE_4   0x8000
#define MII_AT001_CR_1000T_SPEED_MASK   0x0300
#define MII_AT001_CR_1000T_DEFAULT_CAP_MASK   0x0300
#define MII_AT001_SR_1000T_LP_HD_CAPS   0x0400
#define MII_AT001_SR_1000T_LP_FD_CAPS   0x0800
#define MII_AT001_SR_1000T_REMOTE_RX_STATUS   0x1000
#define MII_AT001_SR_1000T_LOCAL_RX_STATUS   0x2000
#define MII_AT001_SR_1000T_MS_CONFIG_RES   0x4000
#define MII_AT001_SR_1000T_MS_CONFIG_FAULT   0x8000
#define MII_AT001_SR_1000T_REMOTE_RX_STATUS_SHIFT   12
#define MII_AT001_SR_1000T_LOCAL_RX_STATUS_SHIFT   13
#define MII_AT001_ESR_1000T_HD_CAPS   0x1000
#define MII_AT001_ESR_1000T_FD_CAPS   0x2000
#define MII_AT001_ESR_1000X_HD_CAPS   0x4000
#define MII_AT001_ESR_1000X_FD_CAPS   0x8000
#define MII_AT001_PSCR_JABBER_DISABLE   0x0001
#define MII_AT001_PSCR_POLARITY_REVERSAL   0x0002
#define MII_AT001_PSCR_SQE_TEST   0x0004
#define MII_AT001_PSCR_MAC_POWERDOWN   0x0008
#define MII_AT001_PSCR_CLK125_DISABLE   0x0010
#define MII_AT001_PSCR_MDI_MANUAL_MODE   0x0000
#define MII_AT001_PSCR_MDIX_MANUAL_MODE   0x0020
#define MII_AT001_PSCR_AUTO_X_1000T   0x0040
#define MII_AT001_PSCR_AUTO_X_MODE   0x0060
#define MII_AT001_PSCR_10BT_EXT_DIST_ENABLE   0x0080
#define MII_AT001_PSCR_MII_5BIT_ENABLE   0x0100
#define MII_AT001_PSCR_SCRAMBLER_DISABLE   0x0200
#define MII_AT001_PSCR_FORCE_LINK_GOOD   0x0400
#define MII_AT001_PSCR_ASSERT_CRS_ON_TX   0x0800
#define MII_AT001_PSCR_POLARITY_REVERSAL_SHIFT   1
#define MII_AT001_PSCR_AUTO_X_MODE_SHIFT   5
#define MII_AT001_PSCR_10BT_EXT_DIST_ENABLE_SHIFT   7
#define MII_AT001_PSSR_SPD_DPLX_RESOLVED   0x0800
#define MII_AT001_PSSR_DPLX   0x2000
#define MII_AT001_PSSR_SPEED   0xC000
#define MII_AT001_PSSR_10MBS   0x0000
#define MII_AT001_PSSR_100MBS   0x4000
#define MII_AT001_PSSR_1000MBS   0x8000

Enumerations

enum  atl1e_dma_req_block {
  atl1e_dma_req_128 = 0, atl1e_dma_req_256 = 1, atl1e_dma_req_512 = 2, atl1e_dma_req_1024 = 3,
  atl1e_dma_req_2048 = 4, atl1e_dma_req_4096 = 5
}
enum  atl1e_nic_type { athr_l1e = 0, athr_l2e_revA = 1, athr_l2e_revB = 2 }

Functions

int atl1e_up (struct atl1e_adapter *adapter)
void atl1e_down (struct atl1e_adapter *adapter)
s32 atl1e_reset_hw (struct atl1e_hw *hw)
s32 atl1e_read_mac_addr (struct atl1e_hw *hw)
s32 atl1e_init_hw (struct atl1e_hw *hw)
s32 atl1e_phy_commit (struct atl1e_hw *hw)
s32 atl1e_get_speed_and_duplex (struct atl1e_hw *hw, u16 *speed, u16 *duplex)
u32 atl1e_auto_get_fc (struct atl1e_adapter *adapter, u16 duplex)
s32 atl1e_read_phy_reg (struct atl1e_hw *hw, u16 reg_addr, u16 *phy_data)
s32 atl1e_write_phy_reg (struct atl1e_hw *hw, u32 reg_addr, u16 phy_data)
s32 atl1e_validate_mdi_setting (struct atl1e_hw *hw)
void atl1e_hw_set_mac_addr (struct atl1e_hw *hw)
s32 atl1e_phy_enter_power_saving (struct atl1e_hw *hw)
s32 atl1e_phy_leave_power_saving (struct atl1e_hw *hw)
s32 atl1e_phy_init (struct atl1e_hw *hw)
int atl1e_check_eeprom_exist (struct atl1e_hw *hw)
void atl1e_force_ps (struct atl1e_hw *hw)
s32 atl1e_restart_autoneg (struct atl1e_hw *hw)


Define Documentation

#define ETH_FCS_LEN   4

#define VLAN_HLEN   4

Definition at line 44 of file atl1e.h.

Referenced by atl1e_configure(), atl1e_configure_tx(), and atl1e_init_ring_resources().

#define NET_IP_ALIGN   2

Definition at line 45 of file atl1e.h.

Referenced by atl1e_clean_rx_irq().

#define SPEED_0   0xffff

Definition at line 47 of file atl1e.h.

Referenced by atl1e_check_link(), atl1e_down(), and atl1e_sw_init().

#define SPEED_10   10

#define SPEED_100   100

#define SPEED_1000   1000

#define HALF_DUPLEX   1

#define FULL_DUPLEX   2

#define AT_ERR_EEPROM   1

Definition at line 55 of file atl1e.h.

Referenced by atl1e_read_mac_addr().

#define AT_ERR_PHY   2

Definition at line 56 of file atl1e.h.

Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().

#define AT_ERR_CONFIG   3

Definition at line 57 of file atl1e.h.

#define AT_ERR_PARAM   4

Definition at line 58 of file atl1e.h.

#define AT_ERR_MAC_TYPE   5

Definition at line 59 of file atl1e.h.

#define AT_ERR_PHY_TYPE   6

Definition at line 60 of file atl1e.h.

#define AT_ERR_PHY_SPEED   7

Definition at line 61 of file atl1e.h.

Referenced by atl1e_get_speed_and_duplex().

#define AT_ERR_PHY_RES   8

Definition at line 62 of file atl1e.h.

Referenced by atl1e_get_speed_and_duplex().

#define AT_ERR_TIMEOUT   9

Definition at line 63 of file atl1e.h.

Referenced by atl1e_get_permanent_address(), and atl1e_reset_hw().

#define AT_MAX_RECEIVE_QUEUE   4

Definition at line 65 of file atl1e.h.

#define AT_PAGE_NUM_PER_QUEUE   2

#define AT_TWSI_EEPROM_TIMEOUT   100

Definition at line 68 of file atl1e.h.

Referenced by atl1e_get_permanent_address().

#define AT_HW_MAX_IDLE_DELAY   10

Definition at line 69 of file atl1e.h.

Referenced by atl1e_reset_hw().

#define AT_REGS_LEN   75

Definition at line 71 of file atl1e.h.

#define AT_EEPROM_LEN   512

Definition at line 72 of file atl1e.h.

#define TPD_BUFLEN_MASK   0x3FFF

Definition at line 75 of file atl1e.h.

Referenced by atl1e_tx_map().

#define TPD_BUFLEN_SHIFT   0

Definition at line 76 of file atl1e.h.

Referenced by atl1e_tx_map().

#define TPD_EOP_MASK   0x0001

Definition at line 79 of file atl1e.h.

#define TPD_EOP_SHIFT   0

Definition at line 80 of file atl1e.h.

Referenced by atl1e_tx_map().

#define MAX_TX_BUF_LEN   0x2000

Definition at line 88 of file atl1e.h.

#define MAX_TX_BUF_SHIFT   13

Definition at line 89 of file atl1e.h.

#define RRS_RX_CSUM_MASK   0xFFFF

Definition at line 92 of file atl1e.h.

#define RRS_RX_CSUM_SHIFT   0

Definition at line 93 of file atl1e.h.

#define RRS_PKT_SIZE_MASK   0x3FFF

Definition at line 94 of file atl1e.h.

Referenced by atl1e_clean_rx_irq().

#define RRS_PKT_SIZE_SHIFT   16

Definition at line 95 of file atl1e.h.

Referenced by atl1e_clean_rx_irq().

#define RRS_CPU_NUM_MASK   0x0003

Definition at line 96 of file atl1e.h.

#define RRS_CPU_NUM_SHIFT   30

Definition at line 97 of file atl1e.h.

#define RRS_IS_RSS_IPV4   0x0001

Definition at line 99 of file atl1e.h.

#define RRS_IS_RSS_IPV4_TCP   0x0002

Definition at line 100 of file atl1e.h.

#define RRS_IS_RSS_IPV6   0x0004

Definition at line 101 of file atl1e.h.

#define RRS_IS_RSS_IPV6_TCP   0x0008

Definition at line 102 of file atl1e.h.

#define RRS_IS_IPV6   0x0010

Definition at line 103 of file atl1e.h.

#define RRS_IS_IP_FRAG   0x0020

Definition at line 104 of file atl1e.h.

#define RRS_IS_IP_DF   0x0040

Definition at line 105 of file atl1e.h.

#define RRS_IS_802_3   0x0080

Definition at line 106 of file atl1e.h.

#define RRS_IS_VLAN_TAG   0x0100

Definition at line 107 of file atl1e.h.

#define RRS_IS_ERR_FRAME   0x0200

Definition at line 108 of file atl1e.h.

Referenced by atl1e_clean_rx_irq().

#define RRS_IS_IPV4   0x0400

Definition at line 109 of file atl1e.h.

#define RRS_IS_UDP   0x0800

Definition at line 110 of file atl1e.h.

#define RRS_IS_TCP   0x1000

Definition at line 111 of file atl1e.h.

#define RRS_IS_BCAST   0x2000

Definition at line 112 of file atl1e.h.

#define RRS_IS_MCAST   0x4000

Definition at line 113 of file atl1e.h.

#define RRS_IS_PAUSE   0x8000

Definition at line 114 of file atl1e.h.

#define RRS_ERR_BAD_CRC   0x0001

Definition at line 116 of file atl1e.h.

Referenced by atl1e_clean_rx_irq().

#define RRS_ERR_CODE   0x0002

Definition at line 117 of file atl1e.h.

Referenced by atl1e_clean_rx_irq().

#define RRS_ERR_DRIBBLE   0x0004

Definition at line 118 of file atl1e.h.

Referenced by atl1e_clean_rx_irq().

#define RRS_ERR_RUNT   0x0008

Definition at line 119 of file atl1e.h.

#define RRS_ERR_RX_OVERFLOW   0x0010

Definition at line 120 of file atl1e.h.

#define RRS_ERR_TRUNC   0x0020

Definition at line 121 of file atl1e.h.

Referenced by atl1e_clean_rx_irq().

#define RRS_ERR_IP_CSUM   0x0040

Definition at line 122 of file atl1e.h.

#define RRS_ERR_L4_CSUM   0x0080

Definition at line 123 of file atl1e.h.

#define RRS_ERR_LENGTH   0x0100

Definition at line 124 of file atl1e.h.

#define RRS_ERR_DES_ADDR   0x0200

Definition at line 125 of file atl1e.h.

#define AT_WRITE_REG ( a,
reg,
value   )     writel((value), ((a)->hw_addr + reg))

#define AT_WRITE_FLUSH (  )     readl((a)->hw_addr)

Definition at line 242 of file atl1e.h.

Referenced by atl1e_irq_disable(), atl1e_irq_enable(), and atl1e_irq_reset().

#define AT_READ_REG ( a,
reg   )     readl((a)->hw_addr + reg)

#define AT_WRITE_REGB ( a,
reg,
value   )     writeb((value), ((a)->hw_addr + reg))

Definition at line 248 of file atl1e.h.

Referenced by atl1e_clean_rx_irq(), and atl1e_configure_des_ring().

#define AT_READ_REGB ( a,
reg   )     readb((a)->hw_addr + reg)

Definition at line 251 of file atl1e.h.

#define AT_WRITE_REGW ( a,
reg,
value   )     writew((value), ((a)->hw_addr + reg))

#define AT_READ_REGW ( a,
reg   )     readw((a)->hw_addr + reg)

Definition at line 257 of file atl1e.h.

Referenced by atl1e_check_eeprom_exist(), and atl1e_clean_tx_irq().

#define AT_WRITE_REG_ARRAY ( a,
reg,
offset,
value   )     writel((value), (((a)->hw_addr + reg) + ((offset) << 2)))

Definition at line 260 of file atl1e.h.

Referenced by atl1e_configure(), atl1e_hw_set_mac_addr(), and atl1e_init_hw().

#define AT_READ_REG_ARRAY ( a,
reg,
offset   )     readl(((a)->hw_addr + reg) + ((offset) << 2))

Definition at line 263 of file atl1e.h.

#define REG_PM_CTRLSTAT   0x44

Definition at line 291 of file atl1e.h.

Referenced by atl1e_setup_pcicmd().

#define REG_PCIE_CAP_LIST   0x58

Definition at line 293 of file atl1e.h.

Referenced by atl1e_check_eeprom_exist().

#define REG_DEVICE_CAP   0x5C

Definition at line 295 of file atl1e.h.

#define DEVICE_CAP_MAX_PAYLOAD_MASK   0x7

Definition at line 296 of file atl1e.h.

#define DEVICE_CAP_MAX_PAYLOAD_SHIFT   0

Definition at line 297 of file atl1e.h.

#define REG_DEVICE_CTRL   0x60

Definition at line 299 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define DEVICE_CTRL_MAX_PAYLOAD_MASK   0x7

Definition at line 300 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define DEVICE_CTRL_MAX_PAYLOAD_SHIFT   5

Definition at line 301 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define DEVICE_CTRL_MAX_RREQ_SZ_MASK   0x7

Definition at line 302 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define DEVICE_CTRL_MAX_RREQ_SZ_SHIFT   12

Definition at line 303 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define REG_VPD_CAP   0x6C

Definition at line 305 of file atl1e.h.

#define VPD_CAP_ID_MASK   0xff

Definition at line 306 of file atl1e.h.

#define VPD_CAP_ID_SHIFT   0

Definition at line 307 of file atl1e.h.

#define VPD_CAP_NEXT_PTR_MASK   0xFF

Definition at line 308 of file atl1e.h.

#define VPD_CAP_NEXT_PTR_SHIFT   8

Definition at line 309 of file atl1e.h.

#define VPD_CAP_VPD_ADDR_MASK   0x7FFF

Definition at line 310 of file atl1e.h.

#define VPD_CAP_VPD_ADDR_SHIFT   16

Definition at line 311 of file atl1e.h.

#define VPD_CAP_VPD_FLAG   0x80000000

Definition at line 312 of file atl1e.h.

#define REG_VPD_DATA   0x70

Definition at line 314 of file atl1e.h.

#define REG_SPI_FLASH_CTRL   0x200

Definition at line 316 of file atl1e.h.

Referenced by atl1e_check_eeprom_exist().

#define SPI_FLASH_CTRL_STS_NON_RDY   0x1

Definition at line 317 of file atl1e.h.

#define SPI_FLASH_CTRL_STS_WEN   0x2

Definition at line 318 of file atl1e.h.

#define SPI_FLASH_CTRL_STS_WPEN   0x80

Definition at line 319 of file atl1e.h.

#define SPI_FLASH_CTRL_DEV_STS_MASK   0xFF

Definition at line 320 of file atl1e.h.

#define SPI_FLASH_CTRL_DEV_STS_SHIFT   0

Definition at line 321 of file atl1e.h.

#define SPI_FLASH_CTRL_INS_MASK   0x7

Definition at line 322 of file atl1e.h.

#define SPI_FLASH_CTRL_INS_SHIFT   8

Definition at line 323 of file atl1e.h.

#define SPI_FLASH_CTRL_START   0x800

Definition at line 324 of file atl1e.h.

#define SPI_FLASH_CTRL_EN_VPD   0x2000

Definition at line 325 of file atl1e.h.

Referenced by atl1e_check_eeprom_exist().

#define SPI_FLASH_CTRL_LDSTART   0x8000

Definition at line 326 of file atl1e.h.

#define SPI_FLASH_CTRL_CS_HI_MASK   0x3

Definition at line 327 of file atl1e.h.

#define SPI_FLASH_CTRL_CS_HI_SHIFT   16

Definition at line 328 of file atl1e.h.

#define SPI_FLASH_CTRL_CS_HOLD_MASK   0x3

Definition at line 329 of file atl1e.h.

#define SPI_FLASH_CTRL_CS_HOLD_SHIFT   18

Definition at line 330 of file atl1e.h.

#define SPI_FLASH_CTRL_CLK_LO_MASK   0x3

Definition at line 331 of file atl1e.h.

#define SPI_FLASH_CTRL_CLK_LO_SHIFT   20

Definition at line 332 of file atl1e.h.

#define SPI_FLASH_CTRL_CLK_HI_MASK   0x3

Definition at line 333 of file atl1e.h.

#define SPI_FLASH_CTRL_CLK_HI_SHIFT   22

Definition at line 334 of file atl1e.h.

#define SPI_FLASH_CTRL_CS_SETUP_MASK   0x3

Definition at line 335 of file atl1e.h.

#define SPI_FLASH_CTRL_CS_SETUP_SHIFT   24

Definition at line 336 of file atl1e.h.

#define SPI_FLASH_CTRL_EROM_PGSZ_MASK   0x3

Definition at line 337 of file atl1e.h.

#define SPI_FLASH_CTRL_EROM_PGSZ_SHIFT   26

Definition at line 338 of file atl1e.h.

#define SPI_FLASH_CTRL_WAIT_READY   0x10000000

Definition at line 339 of file atl1e.h.

#define REG_SPI_ADDR   0x204

Definition at line 341 of file atl1e.h.

#define REG_SPI_DATA   0x208

Definition at line 343 of file atl1e.h.

#define REG_SPI_FLASH_CONFIG   0x20C

Definition at line 345 of file atl1e.h.

#define SPI_FLASH_CONFIG_LD_ADDR_MASK   0xFFFFFF

Definition at line 346 of file atl1e.h.

#define SPI_FLASH_CONFIG_LD_ADDR_SHIFT   0

Definition at line 347 of file atl1e.h.

#define SPI_FLASH_CONFIG_VPD_ADDR_MASK   0x3

Definition at line 348 of file atl1e.h.

#define SPI_FLASH_CONFIG_VPD_ADDR_SHIFT   24

Definition at line 349 of file atl1e.h.

#define SPI_FLASH_CONFIG_LD_EXIST   0x4000000

Definition at line 350 of file atl1e.h.

#define REG_SPI_FLASH_OP_PROGRAM   0x210

Definition at line 353 of file atl1e.h.

#define REG_SPI_FLASH_OP_SC_ERASE   0x211

Definition at line 354 of file atl1e.h.

#define REG_SPI_FLASH_OP_CHIP_ERASE   0x212

Definition at line 355 of file atl1e.h.

#define REG_SPI_FLASH_OP_RDID   0x213

Definition at line 356 of file atl1e.h.

#define REG_SPI_FLASH_OP_WREN   0x214

Definition at line 357 of file atl1e.h.

#define REG_SPI_FLASH_OP_RDSR   0x215

Definition at line 358 of file atl1e.h.

#define REG_SPI_FLASH_OP_WRSR   0x216

Definition at line 359 of file atl1e.h.

#define REG_SPI_FLASH_OP_READ   0x217

Definition at line 360 of file atl1e.h.

#define REG_TWSI_CTRL   0x218

Definition at line 362 of file atl1e.h.

Referenced by atl1e_get_permanent_address().

#define TWSI_CTRL_LD_OFFSET_MASK   0xFF

Definition at line 363 of file atl1e.h.

#define TWSI_CTRL_LD_OFFSET_SHIFT   0

Definition at line 364 of file atl1e.h.

#define TWSI_CTRL_LD_SLV_ADDR_MASK   0x7

Definition at line 365 of file atl1e.h.

#define TWSI_CTRL_LD_SLV_ADDR_SHIFT   8

Definition at line 366 of file atl1e.h.

#define TWSI_CTRL_SW_LDSTART   0x800

Definition at line 367 of file atl1e.h.

Referenced by atl1e_get_permanent_address().

#define TWSI_CTRL_HW_LDSTART   0x1000

Definition at line 368 of file atl1e.h.

#define TWSI_CTRL_SMB_SLV_ADDR_MASK   0x0x7F

Definition at line 369 of file atl1e.h.

#define TWSI_CTRL_SMB_SLV_ADDR_SHIFT   15

Definition at line 370 of file atl1e.h.

#define TWSI_CTRL_LD_EXIST   0x400000

Definition at line 371 of file atl1e.h.

#define TWSI_CTRL_READ_FREQ_SEL_MASK   0x3

Definition at line 372 of file atl1e.h.

#define TWSI_CTRL_READ_FREQ_SEL_SHIFT   23

Definition at line 373 of file atl1e.h.

#define TWSI_CTRL_FREQ_SEL_100K   0

Definition at line 374 of file atl1e.h.

#define TWSI_CTRL_FREQ_SEL_200K   1

Definition at line 375 of file atl1e.h.

#define TWSI_CTRL_FREQ_SEL_300K   2

Definition at line 376 of file atl1e.h.

#define TWSI_CTRL_FREQ_SEL_400K   3

Definition at line 377 of file atl1e.h.

#define TWSI_CTRL_SMB_SLV_ADDR

Definition at line 378 of file atl1e.h.

#define TWSI_CTRL_WRITE_FREQ_SEL_MASK   0x3

Definition at line 379 of file atl1e.h.

#define TWSI_CTRL_WRITE_FREQ_SEL_SHIFT   24

Definition at line 380 of file atl1e.h.

#define REG_PCIE_DEV_MISC_CTRL   0x21C

Definition at line 383 of file atl1e.h.

#define PCIE_DEV_MISC_CTRL_EXT_PIPE   0x2

Definition at line 384 of file atl1e.h.

#define PCIE_DEV_MISC_CTRL_RETRY_BUFDIS   0x1

Definition at line 385 of file atl1e.h.

#define PCIE_DEV_MISC_CTRL_SPIROM_EXIST   0x4

Definition at line 386 of file atl1e.h.

#define PCIE_DEV_MISC_CTRL_SERDES_ENDIAN   0x8

Definition at line 387 of file atl1e.h.

#define PCIE_DEV_MISC_CTRL_SERDES_SEL_DIN   0x10

Definition at line 388 of file atl1e.h.

#define REG_PCIE_PHYMISC   0x1000

Definition at line 390 of file atl1e.h.

#define PCIE_PHYMISC_FORCE_RCV_DET   0x4

Definition at line 391 of file atl1e.h.

#define REG_LTSSM_TEST_MODE   0x12FC

Definition at line 393 of file atl1e.h.

#define LTSSM_TEST_MODE_DEF   0xE000

Definition at line 394 of file atl1e.h.

#define REG_MASTER_CTRL   0x1400

Definition at line 397 of file atl1e.h.

Referenced by atl1e_configure(), atl1e_reset_hw(), and atl1e_up().

#define MASTER_CTRL_SOFT_RST   0x1

Definition at line 398 of file atl1e.h.

Referenced by atl1e_reset_hw().

#define MASTER_CTRL_MTIMER_EN   0x2

Definition at line 399 of file atl1e.h.

#define MASTER_CTRL_ITIMER_EN   0x4

Definition at line 400 of file atl1e.h.

Referenced by atl1e_configure().

#define MASTER_CTRL_MANUAL_INT   0x8

Definition at line 401 of file atl1e.h.

Referenced by atl1e_up().

#define MASTER_CTRL_ITIMER2_EN   0x20

Definition at line 402 of file atl1e.h.

Referenced by atl1e_configure().

#define MASTER_CTRL_INT_RDCLR   0x40

Definition at line 403 of file atl1e.h.

#define MASTER_CTRL_LED_MODE   0x200

Definition at line 404 of file atl1e.h.

Referenced by atl1e_configure(), and atl1e_reset_hw().

#define MASTER_CTRL_REV_NUM_SHIFT   16

Definition at line 405 of file atl1e.h.

#define MASTER_CTRL_REV_NUM_MASK   0xff

Definition at line 406 of file atl1e.h.

#define MASTER_CTRL_DEV_ID_SHIFT   24

Definition at line 407 of file atl1e.h.

#define MASTER_CTRL_DEV_ID_MASK   0xff

Definition at line 408 of file atl1e.h.

#define REG_MANUAL_TIMER_INIT   0x1404

Definition at line 411 of file atl1e.h.

#define REG_IRQ_MODU_TIMER_INIT   0x1408

Definition at line 415 of file atl1e.h.

Referenced by atl1e_configure().

#define REG_IRQ_MODU_TIMER2_INIT   0x140A

Definition at line 416 of file atl1e.h.

Referenced by atl1e_configure().

#define REG_GPHY_CTRL   0x140C

Definition at line 419 of file atl1e.h.

Referenced by atl1e_force_ps(), and atl1e_phy_init().

#define GPHY_CTRL_EXT_RESET   1

Definition at line 420 of file atl1e.h.

Referenced by atl1e_force_ps(), and atl1e_phy_init().

#define GPHY_CTRL_PIPE_MOD   2

Definition at line 421 of file atl1e.h.

#define GPHY_CTRL_TEST_MODE_MASK   3

Definition at line 422 of file atl1e.h.

#define GPHY_CTRL_TEST_MODE_SHIFT   2

Definition at line 423 of file atl1e.h.

#define GPHY_CTRL_BERT_START   0x10

Definition at line 424 of file atl1e.h.

#define GPHY_CTRL_GATE_25M_EN   0x20

Definition at line 425 of file atl1e.h.

#define GPHY_CTRL_LPW_EXIT   0x40

Definition at line 426 of file atl1e.h.

#define GPHY_CTRL_PHY_IDDQ   0x80

Definition at line 427 of file atl1e.h.

#define GPHY_CTRL_PHY_IDDQ_DIS   0x100

Definition at line 428 of file atl1e.h.

#define GPHY_CTRL_PCLK_SEL_DIS   0x200

Definition at line 429 of file atl1e.h.

#define GPHY_CTRL_HIB_EN   0x400

Definition at line 430 of file atl1e.h.

#define GPHY_CTRL_HIB_PULSE   0x800

Definition at line 431 of file atl1e.h.

#define GPHY_CTRL_SEL_ANA_RST   0x1000

Definition at line 432 of file atl1e.h.

#define GPHY_CTRL_PHY_PLL_ON   0x2000

Definition at line 433 of file atl1e.h.

#define GPHY_CTRL_PWDOWN_HW   0x4000

Definition at line 434 of file atl1e.h.

#define GPHY_CTRL_DEFAULT

Value:

Definition at line 435 of file atl1e.h.

Referenced by atl1e_phy_init().

#define GPHY_CTRL_PW_WOL_DIS

#define REG_CMBDISDMA_TIMER   0x140E

Definition at line 451 of file atl1e.h.

Referenced by atl1e_configure().

#define REG_IDLE_STATUS   0x1410

Definition at line 455 of file atl1e.h.

Referenced by atl1e_reset_hw().

#define IDLE_STATUS_RXMAC   1

Definition at line 456 of file atl1e.h.

#define IDLE_STATUS_TXMAC   2

Definition at line 457 of file atl1e.h.

#define IDLE_STATUS_RXQ   4

Definition at line 458 of file atl1e.h.

#define IDLE_STATUS_TXQ   8

Definition at line 459 of file atl1e.h.

#define IDLE_STATUS_DMAR   0x10

Definition at line 460 of file atl1e.h.

#define IDLE_STATUS_DMAW   0x20

Definition at line 461 of file atl1e.h.

#define IDLE_STATUS_SMB   0x40

Definition at line 462 of file atl1e.h.

#define IDLE_STATUS_CMB   0x80

Definition at line 463 of file atl1e.h.

#define REG_MDIO_CTRL   0x1414

Definition at line 466 of file atl1e.h.

Referenced by atl1e_phy_commit(), atl1e_read_phy_reg(), and atl1e_write_phy_reg().

#define MDIO_DATA_MASK   0xffff

Definition at line 467 of file atl1e.h.

Referenced by atl1e_write_phy_reg().

#define MDIO_DATA_SHIFT   0

Definition at line 468 of file atl1e.h.

Referenced by atl1e_write_phy_reg().

#define MDIO_REG_ADDR_MASK   0x1f

#define MDIO_REG_ADDR_SHIFT   16

Definition at line 470 of file atl1e.h.

Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().

#define MDIO_RW   0x200000

Definition at line 471 of file atl1e.h.

Referenced by atl1e_read_phy_reg().

#define MDIO_SUP_PREAMBLE   0x400000

Definition at line 472 of file atl1e.h.

Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().

#define MDIO_START   0x800000

Definition at line 473 of file atl1e.h.

Referenced by atl1e_phy_commit(), atl1e_read_phy_reg(), and atl1e_write_phy_reg().

#define MDIO_CLK_SEL_SHIFT   24

Definition at line 474 of file atl1e.h.

Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().

#define MDIO_CLK_25_4   0

Definition at line 475 of file atl1e.h.

Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().

#define MDIO_CLK_25_6   2

Definition at line 476 of file atl1e.h.

#define MDIO_CLK_25_8   3

Definition at line 477 of file atl1e.h.

#define MDIO_CLK_25_10   4

Definition at line 478 of file atl1e.h.

#define MDIO_CLK_25_14   5

Definition at line 479 of file atl1e.h.

#define MDIO_CLK_25_20   6

Definition at line 480 of file atl1e.h.

#define MDIO_CLK_25_28   7

Definition at line 481 of file atl1e.h.

#define MDIO_BUSY   0x8000000

Definition at line 482 of file atl1e.h.

Referenced by atl1e_phy_commit(), atl1e_read_phy_reg(), and atl1e_write_phy_reg().

#define MDIO_AP_EN   0x10000000

Definition at line 483 of file atl1e.h.

#define MDIO_WAIT_TIMES   10

Definition at line 484 of file atl1e.h.

Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().

#define REG_PHY_STATUS   0x1418

Definition at line 487 of file atl1e.h.

Referenced by atl1e_sw_init().

#define PHY_STATUS_100M   0x20000

Definition at line 488 of file atl1e.h.

Referenced by atl1e_sw_init().

#define PHY_STATUS_EMI_CA   0x40000

Definition at line 489 of file atl1e.h.

Referenced by atl1e_sw_init().

#define REG_BIST0_CTRL   0x141c

Definition at line 492 of file atl1e.h.

#define BIST0_NOW   0x1

Definition at line 493 of file atl1e.h.

#define BIST0_SRAM_FAIL   0x2

Definition at line 495 of file atl1e.h.

#define BIST0_FUSE_FLAG   0x4

Definition at line 497 of file atl1e.h.

#define REG_BIST1_CTRL   0x1420

Definition at line 500 of file atl1e.h.

#define BIST1_NOW   0x1

Definition at line 501 of file atl1e.h.

#define BIST1_SRAM_FAIL   0x2

Definition at line 503 of file atl1e.h.

#define BIST1_FUSE_FLAG   0x4

Definition at line 505 of file atl1e.h.

#define REG_SERDES_LOCK   0x1424

Definition at line 508 of file atl1e.h.

#define SERDES_LOCK_DETECT   1

Definition at line 509 of file atl1e.h.

#define SERDES_LOCK_DETECT_EN   2

Definition at line 510 of file atl1e.h.

#define REG_MAC_CTRL   0x1480

Definition at line 513 of file atl1e.h.

Referenced by atl1e_check_link(), and atl1e_setup_mac_ctrl().

#define MAC_CTRL_TX_EN   1

Definition at line 514 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_RX_EN   2

Definition at line 515 of file atl1e.h.

Referenced by atl1e_check_link(), and atl1e_setup_mac_ctrl().

#define MAC_CTRL_TX_FLOW   4

Definition at line 516 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_RX_FLOW   8

Definition at line 517 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_LOOPBACK   0x10

Definition at line 518 of file atl1e.h.

#define MAC_CTRL_DUPLX   0x20

Definition at line 519 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_ADD_CRC   0x40

Definition at line 520 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_PAD   0x80

Definition at line 521 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_LENCHK   0x100

Definition at line 522 of file atl1e.h.

#define MAC_CTRL_HUGE_EN   0x200

Definition at line 523 of file atl1e.h.

#define MAC_CTRL_PRMLEN_SHIFT   10

Definition at line 524 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_PRMLEN_MASK   0xf

Definition at line 525 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_RMV_VLAN   0x4000

Definition at line 526 of file atl1e.h.

#define MAC_CTRL_PROMIS_EN   0x8000

Definition at line 527 of file atl1e.h.

#define MAC_CTRL_TX_PAUSE   0x10000

Definition at line 528 of file atl1e.h.

#define MAC_CTRL_SCNT   0x20000

Definition at line 529 of file atl1e.h.

#define MAC_CTRL_SRST_TX   0x40000

Definition at line 530 of file atl1e.h.

#define MAC_CTRL_TX_SIMURST   0x80000

Definition at line 531 of file atl1e.h.

#define MAC_CTRL_SPEED_SHIFT   20

Definition at line 532 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_SPEED_MASK   0x300000

Definition at line 533 of file atl1e.h.

#define MAC_CTRL_SPEED_1000   2

Definition at line 534 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_SPEED_10_100   1

Definition at line 535 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_DBG_TX_BKPRESURE   0x400000

Definition at line 536 of file atl1e.h.

#define MAC_CTRL_TX_HUGE   0x800000

Definition at line 537 of file atl1e.h.

#define MAC_CTRL_RX_CHKSUM_EN   0x1000000

Definition at line 538 of file atl1e.h.

#define MAC_CTRL_MC_ALL_EN   0x2000000

Definition at line 539 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_BC_EN   0x4000000

Definition at line 540 of file atl1e.h.

Referenced by atl1e_setup_mac_ctrl().

#define MAC_CTRL_DBG   0x8000000

Definition at line 541 of file atl1e.h.

#define REG_MAC_IPG_IFG   0x1484

Definition at line 544 of file atl1e.h.

#define MAC_IPG_IFG_IPGT_SHIFT   0

Definition at line 545 of file atl1e.h.

#define MAC_IPG_IFG_IPGT_MASK   0x7f

Definition at line 546 of file atl1e.h.

#define MAC_IPG_IFG_MIFG_SHIFT   8

Definition at line 547 of file atl1e.h.

#define MAC_IPG_IFG_MIFG_MASK   0xff

Definition at line 548 of file atl1e.h.

#define MAC_IPG_IFG_IPGR1_SHIFT   16

Definition at line 549 of file atl1e.h.

#define MAC_IPG_IFG_IPGR1_MASK   0x7f

Definition at line 550 of file atl1e.h.

#define MAC_IPG_IFG_IPGR2_SHIFT   24

Definition at line 551 of file atl1e.h.

#define MAC_IPG_IFG_IPGR2_MASK   0x7f

Definition at line 552 of file atl1e.h.

#define REG_MAC_STA_ADDR   0x1488

Definition at line 555 of file atl1e.h.

Referenced by atl1e_get_permanent_address(), and atl1e_hw_set_mac_addr().

#define REG_RX_HASH_TABLE   0x1490

Definition at line 558 of file atl1e.h.

Referenced by atl1e_configure(), and atl1e_init_hw().

#define REG_MAC_HALF_DUPLX_CTRL   0x1498

Definition at line 562 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_LCOL_SHIFT   0

Definition at line 563 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_LCOL_MASK   0x3ff

Definition at line 564 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_RETRY_SHIFT   12

Definition at line 565 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_RETRY_MASK   0xf

Definition at line 566 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_EXC_DEF_EN   0x10000

Definition at line 567 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_NO_BACK_C   0x20000

Definition at line 568 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_NO_BACK_P   0x40000

Definition at line 569 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_ABEBE   0x80000

Definition at line 570 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_ABEBT_SHIFT   20

Definition at line 571 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_ABEBT_MASK   0xf

Definition at line 572 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_JAMIPG_SHIFT   24

Definition at line 573 of file atl1e.h.

#define MAC_HALF_DUPLX_CTRL_JAMIPG_MASK   0xf

Definition at line 574 of file atl1e.h.

#define REG_MTU   0x149c

Definition at line 577 of file atl1e.h.

Referenced by atl1e_configure().

#define REG_WOL_CTRL   0x14a0

Definition at line 580 of file atl1e.h.

Referenced by atl1e_configure().

#define WOL_PATTERN_EN   0x00000001

Definition at line 581 of file atl1e.h.

#define WOL_PATTERN_PME_EN   0x00000002

Definition at line 582 of file atl1e.h.

#define WOL_MAGIC_EN   0x00000004

Definition at line 583 of file atl1e.h.

#define WOL_MAGIC_PME_EN   0x00000008

Definition at line 584 of file atl1e.h.

#define WOL_LINK_CHG_EN   0x00000010

Definition at line 585 of file atl1e.h.

#define WOL_LINK_CHG_PME_EN   0x00000020

Definition at line 586 of file atl1e.h.

#define WOL_PATTERN_ST   0x00000100

Definition at line 587 of file atl1e.h.

#define WOL_MAGIC_ST   0x00000200

Definition at line 588 of file atl1e.h.

#define WOL_LINKCHG_ST   0x00000400

Definition at line 589 of file atl1e.h.

#define WOL_CLK_SWITCH_EN   0x00008000

Definition at line 590 of file atl1e.h.

#define WOL_PT0_EN   0x00010000

Definition at line 591 of file atl1e.h.

#define WOL_PT1_EN   0x00020000

Definition at line 592 of file atl1e.h.

#define WOL_PT2_EN   0x00040000

Definition at line 593 of file atl1e.h.

#define WOL_PT3_EN   0x00080000

Definition at line 594 of file atl1e.h.

#define WOL_PT4_EN   0x00100000

Definition at line 595 of file atl1e.h.

#define WOL_PT5_EN   0x00200000

Definition at line 596 of file atl1e.h.

#define WOL_PT6_EN   0x00400000

Definition at line 597 of file atl1e.h.

#define REG_WOL_PATTERN_LEN   0x14a4

Definition at line 599 of file atl1e.h.

#define WOL_PT_LEN_MASK   0x7f

Definition at line 600 of file atl1e.h.

#define WOL_PT0_LEN_SHIFT   0

Definition at line 601 of file atl1e.h.

#define WOL_PT1_LEN_SHIFT   8

Definition at line 602 of file atl1e.h.

#define WOL_PT2_LEN_SHIFT   16

Definition at line 603 of file atl1e.h.

#define WOL_PT3_LEN_SHIFT   24

Definition at line 604 of file atl1e.h.

#define WOL_PT4_LEN_SHIFT   0

Definition at line 605 of file atl1e.h.

#define WOL_PT5_LEN_SHIFT   8

Definition at line 606 of file atl1e.h.

#define WOL_PT6_LEN_SHIFT   16

Definition at line 607 of file atl1e.h.

#define REG_SRAM_TRD_ADDR   0x1518

Definition at line 610 of file atl1e.h.

#define REG_SRAM_TRD_LEN   0x151C

Definition at line 611 of file atl1e.h.

#define REG_SRAM_RXF_ADDR   0x1520

Definition at line 612 of file atl1e.h.

#define REG_SRAM_RXF_LEN   0x1524

Definition at line 613 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define REG_SRAM_TXF_ADDR   0x1528

Definition at line 614 of file atl1e.h.

#define REG_SRAM_TXF_LEN   0x152C

Definition at line 615 of file atl1e.h.

#define REG_SRAM_TCPH_ADDR   0x1530

Definition at line 616 of file atl1e.h.

#define REG_SRAM_PKTH_ADDR   0x1532

Definition at line 617 of file atl1e.h.

#define REG_LOAD_PTR   0x1534

Definition at line 620 of file atl1e.h.

Referenced by atl1e_configure_des_ring().

#define REG_RXF3_BASE_ADDR_HI   0x153C

Definition at line 630 of file atl1e.h.

#define REG_DESC_BASE_ADDR_HI   0x1540

Definition at line 631 of file atl1e.h.

Referenced by atl1e_configure_des_ring().

#define REG_RXF0_BASE_ADDR_HI   0x1540

Definition at line 632 of file atl1e.h.

Referenced by atl1e_configure_des_ring().

#define REG_HOST_RXF0_PAGE0_LO   0x1544

Definition at line 633 of file atl1e.h.

#define REG_HOST_RXF0_PAGE1_LO   0x1548

Definition at line 634 of file atl1e.h.

#define REG_TPD_BASE_ADDR_LO   0x154C

Definition at line 635 of file atl1e.h.

Referenced by atl1e_configure_des_ring().

#define REG_RXF1_BASE_ADDR_HI   0x1550

Definition at line 636 of file atl1e.h.

#define REG_RXF2_BASE_ADDR_HI   0x1554

Definition at line 637 of file atl1e.h.

#define REG_HOST_RXFPAGE_SIZE   0x1558

Definition at line 638 of file atl1e.h.

Referenced by atl1e_configure_des_ring().

#define REG_TPD_RING_SIZE   0x155C

Definition at line 639 of file atl1e.h.

Referenced by atl1e_configure_des_ring().

#define REG_RSS_KEY0   0x14B0

Definition at line 641 of file atl1e.h.

#define REG_RSS_KEY1   0x14B4

Definition at line 642 of file atl1e.h.

#define REG_RSS_KEY2   0x14B8

Definition at line 643 of file atl1e.h.

#define REG_RSS_KEY3   0x14BC

Definition at line 644 of file atl1e.h.

#define REG_RSS_KEY4   0x14C0

Definition at line 645 of file atl1e.h.

#define REG_RSS_KEY5   0x14C4

Definition at line 646 of file atl1e.h.

#define REG_RSS_KEY6   0x14C8

Definition at line 647 of file atl1e.h.

#define REG_RSS_KEY7   0x14CC

Definition at line 648 of file atl1e.h.

#define REG_RSS_KEY8   0x14D0

Definition at line 649 of file atl1e.h.

#define REG_RSS_KEY9   0x14D4

Definition at line 650 of file atl1e.h.

#define REG_IDT_TABLE4   0x14E0

Definition at line 651 of file atl1e.h.

#define REG_IDT_TABLE5   0x14E4

Definition at line 652 of file atl1e.h.

#define REG_IDT_TABLE6   0x14E8

Definition at line 653 of file atl1e.h.

#define REG_IDT_TABLE7   0x14EC

Definition at line 654 of file atl1e.h.

#define REG_IDT_TABLE0   0x1560

Definition at line 655 of file atl1e.h.

#define REG_IDT_TABLE1   0x1564

Definition at line 656 of file atl1e.h.

#define REG_IDT_TABLE2   0x1568

Definition at line 657 of file atl1e.h.

#define REG_IDT_TABLE3   0x156C

Definition at line 658 of file atl1e.h.

#define REG_IDT_TABLE   REG_IDT_TABLE0

Definition at line 659 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define REG_RSS_HASH_VALUE   0x1570

Definition at line 660 of file atl1e.h.

#define REG_RSS_HASH_FLAG   0x1574

Definition at line 661 of file atl1e.h.

#define REG_BASE_CPU_NUMBER   0x157C

Definition at line 662 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define REG_TXQ_CTRL   0x1580

Definition at line 666 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define TXQ_CTRL_NUM_TPD_BURST_MASK   0xF

Definition at line 667 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define TXQ_CTRL_NUM_TPD_BURST_SHIFT   0

Definition at line 668 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define TXQ_CTRL_EN   0x20

Definition at line 669 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define TXQ_CTRL_ENH_MODE   0x40

Definition at line 670 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define TXQ_CTRL_TXF_BURST_NUM_SHIFT   16

Definition at line 671 of file atl1e.h.

#define TXQ_CTRL_TXF_BURST_NUM_MASK   0xffff

Definition at line 672 of file atl1e.h.

#define REG_TX_EARLY_TH   0x1584

Definition at line 675 of file atl1e.h.

Referenced by atl1e_configure_tx().

#define TX_TX_EARLY_TH_MASK   0x7ff

Definition at line 677 of file atl1e.h.

#define TX_TX_EARLY_TH_SHIFT   0

Definition at line 678 of file atl1e.h.

#define REG_RXQ_CTRL   0x15A0

Definition at line 682 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_CTRL_PBA_ALIGN_32   0

Definition at line 683 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_CTRL_PBA_ALIGN_64   1

Definition at line 684 of file atl1e.h.

#define RXQ_CTRL_PBA_ALIGN_128   2

Definition at line 685 of file atl1e.h.

#define RXQ_CTRL_PBA_ALIGN_256   3

Definition at line 686 of file atl1e.h.

#define RXQ_CTRL_Q1_EN   0x10

Definition at line 687 of file atl1e.h.

#define RXQ_CTRL_Q2_EN   0x20

Definition at line 688 of file atl1e.h.

#define RXQ_CTRL_Q3_EN   0x40

Definition at line 689 of file atl1e.h.

#define RXQ_CTRL_IPV6_XSUM_VERIFY_EN   0x80

Definition at line 690 of file atl1e.h.

#define RXQ_CTRL_HASH_TLEN_SHIFT   8

Definition at line 691 of file atl1e.h.

#define RXQ_CTRL_HASH_TLEN_MASK   0xFF

Definition at line 692 of file atl1e.h.

#define RXQ_CTRL_HASH_TYPE_IPV4   0x10000

Definition at line 693 of file atl1e.h.

#define RXQ_CTRL_HASH_TYPE_IPV4_TCP   0x20000

Definition at line 694 of file atl1e.h.

#define RXQ_CTRL_HASH_TYPE_IPV6   0x40000

Definition at line 695 of file atl1e.h.

#define RXQ_CTRL_HASH_TYPE_IPV6_TCP   0x80000

Definition at line 696 of file atl1e.h.

#define RXQ_CTRL_RSS_MODE_DISABLE   0

Definition at line 697 of file atl1e.h.

#define RXQ_CTRL_RSS_MODE_SQSINT   0x4000000

Definition at line 698 of file atl1e.h.

#define RXQ_CTRL_RSS_MODE_MQUESINT   0x8000000

Definition at line 699 of file atl1e.h.

#define RXQ_CTRL_RSS_MODE_MQUEMINT   0xC000000

Definition at line 700 of file atl1e.h.

#define RXQ_CTRL_NIP_QUEUE_SEL_TBL   0x10000000

Definition at line 701 of file atl1e.h.

#define RXQ_CTRL_HASH_ENABLE   0x20000000

Definition at line 702 of file atl1e.h.

#define RXQ_CTRL_CUT_THRU_EN   0x40000000

Definition at line 703 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_CTRL_EN   0x80000000

Definition at line 704 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define REG_RXQ_JMBOSZ_RRDTIM   0x15A4

Definition at line 707 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_JMBOSZ_TH_MASK   0x7ff

Definition at line 713 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_JMBOSZ_TH_SHIFT   0

Definition at line 714 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_JMBO_LKAH_MASK   0xf

Definition at line 715 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_JMBO_LKAH_SHIFT   11

Definition at line 716 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define REG_RXQ_RXF_PAUSE_THRESH   0x15A8

Definition at line 719 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_RXF_PAUSE_TH_HI_SHIFT   0

Definition at line 720 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_RXF_PAUSE_TH_HI_MASK   0xfff

Definition at line 721 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_RXF_PAUSE_TH_LO_SHIFT   16

Definition at line 722 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define RXQ_RXF_PAUSE_TH_LO_MASK   0xfff

Definition at line 723 of file atl1e.h.

Referenced by atl1e_configure_rx().

#define REG_DMA_CTRL   0x15C0

Definition at line 727 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_DMAR_IN_ORDER   0x1

Definition at line 728 of file atl1e.h.

#define DMA_CTRL_DMAR_ENH_ORDER   0x2

Definition at line 729 of file atl1e.h.

#define DMA_CTRL_DMAR_OUT_ORDER   0x4

Definition at line 730 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_RCB_VALUE   0x8

Definition at line 731 of file atl1e.h.

#define DMA_CTRL_DMAR_BURST_LEN_SHIFT   4

Definition at line 732 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_DMAR_BURST_LEN_MASK   7

Definition at line 733 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_DMAW_BURST_LEN_SHIFT   7

Definition at line 734 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_DMAW_BURST_LEN_MASK   7

Definition at line 735 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_DMAR_REQ_PRI   0x400

Definition at line 736 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_DMAR_DLY_CNT_MASK   0x1F

Definition at line 737 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_DMAR_DLY_CNT_SHIFT   11

Definition at line 738 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_DMAW_DLY_CNT_MASK   0xF

Definition at line 739 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_DMAW_DLY_CNT_SHIFT   16

Definition at line 740 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define DMA_CTRL_TXCMB_EN   0x100000

Definition at line 741 of file atl1e.h.

#define DMA_CTRL_RXCMB_EN   0x200000

Definition at line 742 of file atl1e.h.

Referenced by atl1e_configure_dma().

#define REG_SMB_STAT_TIMER   0x15C4

Definition at line 746 of file atl1e.h.

Referenced by atl1e_configure().

#define REG_TRIG_RRD_THRESH   0x15CA

Definition at line 747 of file atl1e.h.

Referenced by atl1e_configure().

#define REG_TRIG_TPD_THRESH   0x15C8

Definition at line 748 of file atl1e.h.

Referenced by atl1e_configure().

#define REG_TRIG_TXTIMER   0x15CC

Definition at line 749 of file atl1e.h.

Referenced by atl1e_configure().

#define REG_TRIG_RXTIMER   0x15CE

Definition at line 750 of file atl1e.h.

Referenced by atl1e_configure().

#define REG_HOST_RXF1_PAGE0_LO   0x15D0

Definition at line 753 of file atl1e.h.

#define REG_HOST_RXF1_PAGE1_LO   0x15D4

Definition at line 754 of file atl1e.h.

#define REG_HOST_RXF2_PAGE0_LO   0x15D8

Definition at line 755 of file atl1e.h.

#define REG_HOST_RXF2_PAGE1_LO   0x15DC

Definition at line 756 of file atl1e.h.

#define REG_HOST_RXF3_PAGE0_LO   0x15E0

Definition at line 757 of file atl1e.h.

#define REG_HOST_RXF3_PAGE1_LO   0x15E4

Definition at line 758 of file atl1e.h.

#define REG_MB_RXF1_RADDR   0x15B4

Definition at line 761 of file atl1e.h.

#define REG_MB_RXF2_RADDR   0x15B8

Definition at line 762 of file atl1e.h.

#define REG_MB_RXF3_RADDR   0x15BC

Definition at line 763 of file atl1e.h.

#define REG_MB_TPD_PROD_IDX   0x15F0

Definition at line 764 of file atl1e.h.

Referenced by atl1e_tx_queue().

#define REG_HOST_RXF0_PAGE0_VLD   0x15F4

Definition at line 767 of file atl1e.h.

#define HOST_RXF_VALID   1

Definition at line 768 of file atl1e.h.

#define HOST_RXF_PAGENO_SHIFT   1

Definition at line 769 of file atl1e.h.

#define HOST_RXF_PAGENO_MASK   0x7F

Definition at line 770 of file atl1e.h.

#define REG_HOST_RXF0_PAGE1_VLD   0x15F5

Definition at line 771 of file atl1e.h.

#define REG_HOST_RXF1_PAGE0_VLD   0x15F6

Definition at line 772 of file atl1e.h.

#define REG_HOST_RXF1_PAGE1_VLD   0x15F7

Definition at line 773 of file atl1e.h.

#define REG_HOST_RXF2_PAGE0_VLD   0x15F8

Definition at line 774 of file atl1e.h.

#define REG_HOST_RXF2_PAGE1_VLD   0x15F9

Definition at line 775 of file atl1e.h.

#define REG_HOST_RXF3_PAGE0_VLD   0x15FA

Definition at line 776 of file atl1e.h.

#define REG_HOST_RXF3_PAGE1_VLD   0x15FB

Definition at line 777 of file atl1e.h.

#define REG_ISR   0x1600

Definition at line 780 of file atl1e.h.

Referenced by atl1e_configure(), atl1e_irq_enable(), atl1e_irq_reset(), and atl1e_poll().

#define ISR_SMB   1

Definition at line 781 of file atl1e.h.

#define ISR_TIMER   2

Definition at line 782 of file atl1e.h.

#define ISR_MANUAL   4

Definition at line 787 of file atl1e.h.

Referenced by atl1e_poll().

#define ISR_HW_RXF_OV   8

Definition at line 788 of file atl1e.h.

#define ISR_HOST_RXF0_OV   0x10

Definition at line 789 of file atl1e.h.

#define ISR_HOST_RXF1_OV   0x20

Definition at line 790 of file atl1e.h.

#define ISR_HOST_RXF2_OV   0x40

Definition at line 791 of file atl1e.h.

#define ISR_HOST_RXF3_OV   0x80

Definition at line 792 of file atl1e.h.

#define ISR_TXF_UN   0x100

Definition at line 793 of file atl1e.h.

#define ISR_RX0_PAGE_FULL   0x200

Definition at line 794 of file atl1e.h.

#define ISR_DMAR_TO_RST   0x400

Definition at line 795 of file atl1e.h.

Referenced by atl1e_poll().

#define ISR_DMAW_TO_RST   0x800

Definition at line 796 of file atl1e.h.

Referenced by atl1e_poll().

#define ISR_GPHY   0x1000

Definition at line 797 of file atl1e.h.

Referenced by atl1e_poll().

#define ISR_TX_CREDIT   0x2000

Definition at line 798 of file atl1e.h.

#define ISR_GPHY_LPW   0x4000

Definition at line 799 of file atl1e.h.

#define ISR_RX_PKT   0x10000

Definition at line 800 of file atl1e.h.

#define ISR_TX_PKT   0x20000

Definition at line 801 of file atl1e.h.

#define ISR_TX_DMA   0x40000

Definition at line 802 of file atl1e.h.

#define ISR_RX_PKT_1   0x80000

Definition at line 803 of file atl1e.h.

#define ISR_RX_PKT_2   0x100000

Definition at line 804 of file atl1e.h.

#define ISR_RX_PKT_3   0x200000

Definition at line 805 of file atl1e.h.

#define ISR_MAC_RX   0x400000

Definition at line 806 of file atl1e.h.

#define ISR_MAC_TX   0x800000

Definition at line 807 of file atl1e.h.

#define ISR_UR_DETECTED   0x1000000

Definition at line 808 of file atl1e.h.

#define ISR_FERR_DETECTED   0x2000000

Definition at line 809 of file atl1e.h.

#define ISR_NFERR_DETECTED   0x4000000

Definition at line 810 of file atl1e.h.

#define ISR_CERR_DETECTED   0x8000000

Definition at line 811 of file atl1e.h.

#define ISR_PHY_LINKDOWN   0x10000000

Definition at line 812 of file atl1e.h.

Referenced by atl1e_configure(), and atl1e_poll().

#define ISR_DIS_INT   0x80000000

Definition at line 813 of file atl1e.h.

Referenced by atl1e_poll().

#define REG_IMR   0x1604

Definition at line 817 of file atl1e.h.

Referenced by atl1e_irq_disable(), atl1e_irq_enable(), and atl1e_irq_reset().

#define IMR_NORMAL_MASK

#define ISR_TX_EVENT   (ISR_TXF_UN | ISR_TX_PKT)

Definition at line 834 of file atl1e.h.

Referenced by atl1e_poll().

#define ISR_RX_EVENT   (ISR_HOST_RXF0_OV | ISR_HW_RXF_OV | ISR_RX_PKT)

Definition at line 835 of file atl1e.h.

Referenced by atl1e_poll().

#define REG_MAC_RX_STATUS_BIN   0x1700

Definition at line 837 of file atl1e.h.

#define REG_MAC_RX_STATUS_END   0x175c

Definition at line 838 of file atl1e.h.

#define REG_MAC_TX_STATUS_BIN   0x1760

Definition at line 839 of file atl1e.h.

#define REG_MAC_TX_STATUS_END   0x17c0

Definition at line 840 of file atl1e.h.

#define REG_HOST_RXF0_PAGEOFF   0x1800

Definition at line 843 of file atl1e.h.

#define REG_TPD_CONS_IDX   0x1804

Definition at line 844 of file atl1e.h.

Referenced by atl1e_clean_tx_irq().

#define REG_HOST_RXF1_PAGEOFF   0x1808

Definition at line 845 of file atl1e.h.

#define REG_HOST_RXF2_PAGEOFF   0x180C

Definition at line 846 of file atl1e.h.

#define REG_HOST_RXF3_PAGEOFF   0x1810

Definition at line 847 of file atl1e.h.

#define REG_HOST_RXF0_MB0_LO   0x1820

Definition at line 850 of file atl1e.h.

#define REG_HOST_RXF0_MB1_LO   0x1824

Definition at line 851 of file atl1e.h.

#define REG_HOST_RXF1_MB0_LO   0x1828

Definition at line 852 of file atl1e.h.

#define REG_HOST_RXF1_MB1_LO   0x182C

Definition at line 853 of file atl1e.h.

#define REG_HOST_RXF2_MB0_LO   0x1830

Definition at line 854 of file atl1e.h.

#define REG_HOST_RXF2_MB1_LO   0x1834

Definition at line 855 of file atl1e.h.

#define REG_HOST_RXF3_MB0_LO   0x1838

Definition at line 856 of file atl1e.h.

#define REG_HOST_RXF3_MB1_LO   0x183C

Definition at line 857 of file atl1e.h.

#define REG_HOST_TX_CMB_LO   0x1840

Definition at line 860 of file atl1e.h.

Referenced by atl1e_configure_des_ring().

#define REG_HOST_SMB_ADDR_LO   0x1844

Definition at line 861 of file atl1e.h.

#define REG_DEBUG_DATA0   0x1900

Definition at line 864 of file atl1e.h.

#define REG_DEBUG_DATA1   0x1904

Definition at line 865 of file atl1e.h.

#define MII_BMCR   0x00

#define MII_BMSR   0x01

#define MII_PHYSID1   0x02

#define MII_PHYSID2   0x03

#define MII_ADVERTISE   0x04

#define MII_LPA   0x05

#define MII_EXPANSION   0x06

Definition at line 875 of file atl1e.h.

Referenced by sis190_phy_task().

#define MII_AT001_CR   0x09

Definition at line 876 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv(), and atl1e_restart_autoneg().

#define MII_AT001_SR   0x0A

Definition at line 877 of file atl1e.h.

#define MII_AT001_ESR   0x0F

Definition at line 878 of file atl1e.h.

#define MII_AT001_PSCR   0x10

Definition at line 879 of file atl1e.h.

#define MII_AT001_PSSR   0x11

Definition at line 880 of file atl1e.h.

Referenced by atl1e_get_speed_and_duplex().

#define MII_INT_CTRL   0x12

Definition at line 881 of file atl1e.h.

Referenced by atl1e_phy_init().

#define MII_INT_STATUS   0x13

Definition at line 882 of file atl1e.h.

Referenced by atl1e_clear_phy_int().

#define MII_SMARTSPEED   0x14

Definition at line 883 of file atl1e.h.

#define MII_RERRCOUNTER   0x15

Definition at line 884 of file atl1e.h.

#define MII_SREVISION   0x16

Definition at line 885 of file atl1e.h.

Referenced by phy_init().

#define MII_RESV1   0x17

Definition at line 886 of file atl1e.h.

Referenced by phy_init().

#define MII_LBRERROR   0x18

Definition at line 887 of file atl1e.h.

#define MII_PHYADDR   0x19

Definition at line 888 of file atl1e.h.

#define MII_RESV2   0x1a

Definition at line 889 of file atl1e.h.

#define MII_TPISTATUS   0x1b

Definition at line 890 of file atl1e.h.

#define MII_NCONFIG   0x1c

Definition at line 891 of file atl1e.h.

Referenced by phy_init().

#define MII_DBG_ADDR   0x1D

Definition at line 893 of file atl1e.h.

Referenced by atl1e_phy_init().

#define MII_DBG_DATA   0x1E

Definition at line 894 of file atl1e.h.

Referenced by atl1e_phy_init().

#define MII_CR_SPEED_SELECT_MSB   0x0040

Definition at line 898 of file atl1e.h.

#define MII_CR_COLL_TEST_ENABLE   0x0080

Definition at line 899 of file atl1e.h.

#define MII_CR_FULL_DUPLEX   0x0100

Definition at line 900 of file atl1e.h.

#define MII_CR_RESTART_AUTO_NEG   0x0200

#define MII_CR_ISOLATE   0x0400

Definition at line 902 of file atl1e.h.

#define MII_CR_POWER_DOWN   0x0800

#define MII_CR_AUTO_NEG_EN   0x1000

#define MII_CR_SPEED_SELECT_LSB   0x2000

Definition at line 905 of file atl1e.h.

#define MII_CR_LOOPBACK   0x4000

Definition at line 906 of file atl1e.h.

#define MII_CR_RESET   0x8000

#define MII_CR_SPEED_MASK   0x2040

Definition at line 908 of file atl1e.h.

#define MII_CR_SPEED_1000   0x0040

Definition at line 909 of file atl1e.h.

#define MII_CR_SPEED_100   0x2000

Definition at line 910 of file atl1e.h.

#define MII_CR_SPEED_10   0x0000

Definition at line 911 of file atl1e.h.

#define MII_SR_EXTENDED_CAPS   0x0001

Definition at line 915 of file atl1e.h.

#define MII_SR_JABBER_DETECT   0x0002

Definition at line 916 of file atl1e.h.

#define MII_SR_LINK_STATUS   0x0004

#define MII_SR_AUTONEG_CAPS   0x0008

Definition at line 918 of file atl1e.h.

#define MII_SR_REMOTE_FAULT   0x0010

Definition at line 919 of file atl1e.h.

#define MII_SR_AUTONEG_COMPLETE   0x0020

#define MII_SR_PREAMBLE_SUPPRESS   0x0040

Definition at line 921 of file atl1e.h.

#define MII_SR_EXTENDED_STATUS   0x0100

Definition at line 922 of file atl1e.h.

#define MII_SR_100T2_HD_CAPS   0x0200

Definition at line 923 of file atl1e.h.

#define MII_SR_100T2_FD_CAPS   0x0400

Definition at line 924 of file atl1e.h.

#define MII_SR_10T_HD_CAPS   0x0800

Definition at line 925 of file atl1e.h.

#define MII_SR_10T_FD_CAPS   0x1000

Definition at line 926 of file atl1e.h.

#define MII_SR_100X_HD_CAPS   0x2000

Definition at line 927 of file atl1e.h.

#define MII_SR_100X_FD_CAPS   0x4000

Definition at line 928 of file atl1e.h.

#define MII_SR_100T4_CAPS   0x8000

Definition at line 929 of file atl1e.h.

#define MII_LPA_SLCT   0x001f

Definition at line 932 of file atl1e.h.

#define MII_LPA_10HALF   0x0020

Definition at line 933 of file atl1e.h.

#define MII_LPA_10FULL   0x0040

Definition at line 934 of file atl1e.h.

#define MII_LPA_100HALF   0x0080

Definition at line 935 of file atl1e.h.

#define MII_LPA_100FULL   0x0100

Definition at line 936 of file atl1e.h.

#define MII_LPA_100BASE4   0x0200

Definition at line 937 of file atl1e.h.

#define MII_LPA_PAUSE   0x0400

Definition at line 938 of file atl1e.h.

#define MII_LPA_ASYPAUSE   0x0800

Definition at line 939 of file atl1e.h.

#define MII_LPA_RFAULT   0x2000

Definition at line 940 of file atl1e.h.

#define MII_LPA_LPACK   0x4000

Definition at line 941 of file atl1e.h.

#define MII_LPA_NPAGE   0x8000

Definition at line 942 of file atl1e.h.

#define MII_AR_SELECTOR_FIELD   0x0001

Definition at line 945 of file atl1e.h.

#define MII_AR_10T_HD_CAPS   0x0020

Definition at line 946 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AR_10T_FD_CAPS   0x0040

Definition at line 947 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AR_100TX_HD_CAPS   0x0080

Definition at line 948 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AR_100TX_FD_CAPS   0x0100

Definition at line 949 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AR_100T4_CAPS   0x0200

Definition at line 950 of file atl1e.h.

#define MII_AR_PAUSE   0x0400

Definition at line 951 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AR_ASM_DIR   0x0800

Definition at line 952 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AR_REMOTE_FAULT   0x2000

Definition at line 953 of file atl1e.h.

#define MII_AR_NEXT_PAGE   0x8000

Definition at line 954 of file atl1e.h.

#define MII_AR_SPEED_MASK   0x01E0

Definition at line 955 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AR_DEFAULT_CAP_MASK   0x0DE0

Definition at line 956 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AT001_CR_1000T_HD_CAPS   0x0100

Definition at line 959 of file atl1e.h.

#define MII_AT001_CR_1000T_FD_CAPS   0x0200

Definition at line 960 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AT001_CR_1000T_REPEATER_DTE   0x0400

Definition at line 961 of file atl1e.h.

#define MII_AT001_CR_1000T_MS_VALUE   0x0800

Definition at line 963 of file atl1e.h.

#define MII_AT001_CR_1000T_MS_ENABLE   0x1000

Definition at line 965 of file atl1e.h.

#define MII_AT001_CR_1000T_TEST_MODE_NORMAL   0x0000

Definition at line 967 of file atl1e.h.

#define MII_AT001_CR_1000T_TEST_MODE_1   0x2000

Definition at line 968 of file atl1e.h.

#define MII_AT001_CR_1000T_TEST_MODE_2   0x4000

Definition at line 969 of file atl1e.h.

#define MII_AT001_CR_1000T_TEST_MODE_3   0x6000

Definition at line 970 of file atl1e.h.

#define MII_AT001_CR_1000T_TEST_MODE_4   0x8000

Definition at line 971 of file atl1e.h.

#define MII_AT001_CR_1000T_SPEED_MASK   0x0300

Definition at line 972 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AT001_CR_1000T_DEFAULT_CAP_MASK   0x0300

Definition at line 973 of file atl1e.h.

Referenced by atl1e_phy_setup_autoneg_adv().

#define MII_AT001_SR_1000T_LP_HD_CAPS   0x0400

Definition at line 976 of file atl1e.h.

#define MII_AT001_SR_1000T_LP_FD_CAPS   0x0800

Definition at line 977 of file atl1e.h.

#define MII_AT001_SR_1000T_REMOTE_RX_STATUS   0x1000

Definition at line 978 of file atl1e.h.

#define MII_AT001_SR_1000T_LOCAL_RX_STATUS   0x2000

Definition at line 979 of file atl1e.h.

#define MII_AT001_SR_1000T_MS_CONFIG_RES   0x4000

Definition at line 980 of file atl1e.h.

#define MII_AT001_SR_1000T_MS_CONFIG_FAULT   0x8000

Definition at line 981 of file atl1e.h.

#define MII_AT001_SR_1000T_REMOTE_RX_STATUS_SHIFT   12

Definition at line 982 of file atl1e.h.

#define MII_AT001_SR_1000T_LOCAL_RX_STATUS_SHIFT   13

Definition at line 983 of file atl1e.h.

#define MII_AT001_ESR_1000T_HD_CAPS   0x1000

Definition at line 986 of file atl1e.h.

#define MII_AT001_ESR_1000T_FD_CAPS   0x2000

Definition at line 987 of file atl1e.h.

#define MII_AT001_ESR_1000X_HD_CAPS   0x4000

Definition at line 988 of file atl1e.h.

#define MII_AT001_ESR_1000X_FD_CAPS   0x8000

Definition at line 989 of file atl1e.h.

#define MII_AT001_PSCR_JABBER_DISABLE   0x0001

Definition at line 992 of file atl1e.h.

#define MII_AT001_PSCR_POLARITY_REVERSAL   0x0002

Definition at line 993 of file atl1e.h.

#define MII_AT001_PSCR_SQE_TEST   0x0004

Definition at line 994 of file atl1e.h.

#define MII_AT001_PSCR_MAC_POWERDOWN   0x0008

Definition at line 995 of file atl1e.h.

#define MII_AT001_PSCR_CLK125_DISABLE   0x0010

Definition at line 996 of file atl1e.h.

#define MII_AT001_PSCR_MDI_MANUAL_MODE   0x0000

Definition at line 999 of file atl1e.h.

#define MII_AT001_PSCR_MDIX_MANUAL_MODE   0x0020

Definition at line 1001 of file atl1e.h.

#define MII_AT001_PSCR_AUTO_X_1000T   0x0040

Definition at line 1002 of file atl1e.h.

#define MII_AT001_PSCR_AUTO_X_MODE   0x0060

Definition at line 1006 of file atl1e.h.

#define MII_AT001_PSCR_10BT_EXT_DIST_ENABLE   0x0080

Definition at line 1009 of file atl1e.h.

#define MII_AT001_PSCR_MII_5BIT_ENABLE   0x0100

Definition at line 1013 of file atl1e.h.

#define MII_AT001_PSCR_SCRAMBLER_DISABLE   0x0200

Definition at line 1016 of file atl1e.h.

#define MII_AT001_PSCR_FORCE_LINK_GOOD   0x0400

Definition at line 1017 of file atl1e.h.

#define MII_AT001_PSCR_ASSERT_CRS_ON_TX   0x0800

Definition at line 1018 of file atl1e.h.

#define MII_AT001_PSCR_POLARITY_REVERSAL_SHIFT   1

Definition at line 1019 of file atl1e.h.

#define MII_AT001_PSCR_AUTO_X_MODE_SHIFT   5

Definition at line 1020 of file atl1e.h.

#define MII_AT001_PSCR_10BT_EXT_DIST_ENABLE_SHIFT   7

Definition at line 1021 of file atl1e.h.

#define MII_AT001_PSSR_SPD_DPLX_RESOLVED   0x0800

Definition at line 1023 of file atl1e.h.

Referenced by atl1e_get_speed_and_duplex().

#define MII_AT001_PSSR_DPLX   0x2000

Definition at line 1024 of file atl1e.h.

Referenced by atl1e_get_speed_and_duplex().

#define MII_AT001_PSSR_SPEED   0xC000

Definition at line 1025 of file atl1e.h.

Referenced by atl1e_get_speed_and_duplex().

#define MII_AT001_PSSR_10MBS   0x0000

Definition at line 1026 of file atl1e.h.

Referenced by atl1e_get_speed_and_duplex().

#define MII_AT001_PSSR_100MBS   0x4000

Definition at line 1027 of file atl1e.h.

Referenced by atl1e_get_speed_and_duplex().

#define MII_AT001_PSSR_1000MBS   0x8000

Definition at line 1028 of file atl1e.h.

Referenced by atl1e_get_speed_and_duplex().


Enumeration Type Documentation

Enumerator:
atl1e_dma_req_128 
atl1e_dma_req_256 
atl1e_dma_req_512 
atl1e_dma_req_1024 
atl1e_dma_req_2048 
atl1e_dma_req_4096 

Definition at line 137 of file atl1e.h.

00137                          {
00138         atl1e_dma_req_128 = 0,
00139         atl1e_dma_req_256 = 1,
00140         atl1e_dma_req_512 = 2,
00141         atl1e_dma_req_1024 = 3,
00142         atl1e_dma_req_2048 = 4,
00143         atl1e_dma_req_4096 = 5
00144 };

Enumerator:
athr_l1e 
athr_l2e_revA 
athr_l2e_revB 

Definition at line 146 of file atl1e.h.

00146                     {
00147         athr_l1e = 0,
00148         athr_l2e_revA = 1,
00149         athr_l2e_revB = 2
00150 };


Function Documentation

int atl1e_up ( struct atl1e_adapter adapter  ) 

Definition at line 992 of file atl1e.c.

References AT_READ_REG, AT_WRITE_REG, atl1e_configure(), atl1e_init_hw(), atl1e_init_ring_ptrs(), atl1e_irq_disable(), EIO, ETH_ALEN, atl1e_adapter::hw, net_device::ll_addr, atl1e_hw::mac_addr, MASTER_CTRL_MANUAL_INT, memcpy, atl1e_adapter::netdev, netdev, REG_MASTER_CTRL, and u32.

Referenced by atl1e_open(), and atl1e_reset().

00993 {
00994         struct net_device *netdev = adapter->netdev;
00995         int err = 0;
00996         u32 val;
00997 
00998         /* hardware has been reset, we need to reload some things */
00999         err = atl1e_init_hw(&adapter->hw);
01000         if (err) {
01001                 return -EIO;
01002         }
01003         atl1e_init_ring_ptrs(adapter);
01004 
01005         memcpy(adapter->hw.mac_addr, netdev->ll_addr, ETH_ALEN);
01006 
01007         if (atl1e_configure(adapter) != 0) {
01008                 return -EIO;
01009         }
01010 
01011         atl1e_irq_disable(adapter);
01012 
01013         val = AT_READ_REG(&adapter->hw, REG_MASTER_CTRL);
01014         AT_WRITE_REG(&adapter->hw, REG_MASTER_CTRL,
01015                       val | MASTER_CTRL_MANUAL_INT);
01016 
01017         return err;
01018 }

void atl1e_down ( struct atl1e_adapter adapter  ) 

Definition at line 1030 of file atl1e.c.

References atl1e_clean_rx_ring(), atl1e_clean_tx_ring(), atl1e_reset_hw(), atl1e_adapter::hw, atl1e_adapter::link_duplex, atl1e_adapter::link_speed, mdelay(), atl1e_adapter::netdev, netdev, netdev_link_down(), and SPEED_0.

Referenced by atl1e_close(), and atl1e_reset().

01031 {
01032         struct net_device *netdev = adapter->netdev;
01033 
01034         /* reset MAC to disable all RX/TX */
01035         atl1e_reset_hw(&adapter->hw);
01036         mdelay(1);
01037 
01038         netdev_link_down(netdev);
01039         adapter->link_speed = SPEED_0;
01040         adapter->link_duplex = -1;
01041 
01042         atl1e_clean_tx_ring(adapter);
01043         atl1e_clean_rx_ring(adapter);
01044 }

s32 atl1e_reset_hw ( struct atl1e_hw hw  ) 

Definition at line 1623 of file atl1e.c.

References atl1e_hw::adapter, AT_ERR_TIMEOUT, AT_HW_MAX_IDLE_DELAY, AT_READ_REG, AT_WRITE_REG, DBG, MASTER_CTRL_LED_MODE, MASTER_CTRL_SOFT_RST, mdelay(), PCI_COMMAND, PCI_COMMAND_IO, PCI_COMMAND_MASTER, PCI_COMMAND_MEM, pci_read_config_word(), pci_write_config_word(), atl1e_adapter::pdev, REG_IDLE_STATUS, REG_MASTER_CTRL, timeout(), u16, u32, and wmb.

Referenced by atl1e_down(), atl1e_open(), and atl1e_probe().

01624 {
01625         struct atl1e_adapter *adapter = hw->adapter;
01626         struct pci_device *pdev = adapter->pdev;
01627         int timeout = 0;
01628         u32 idle_status_data = 0;
01629         u16 pci_cfg_cmd_word = 0;
01630 
01631         /* Workaround for PCI problem when BIOS sets MMRBC incorrectly. */
01632         pci_read_config_word(pdev, PCI_COMMAND, &pci_cfg_cmd_word);
01633         if ((pci_cfg_cmd_word & (PCI_COMMAND_IO | PCI_COMMAND_MEM |
01634                                  PCI_COMMAND_MASTER))
01635                         != (PCI_COMMAND_IO | PCI_COMMAND_MEM |
01636                             PCI_COMMAND_MASTER)) {
01637                 pci_cfg_cmd_word |= (PCI_COMMAND_IO | PCI_COMMAND_MEM |
01638                                      PCI_COMMAND_MASTER);
01639                 pci_write_config_word(pdev, PCI_COMMAND, pci_cfg_cmd_word);
01640         }
01641 
01642         /*
01643          * Issue Soft Reset to the MAC.  This will reset the chip's
01644          * transmit, receive, DMA.  It will not effect
01645          * the current PCI configuration.  The global reset bit is self-
01646          * clearing, and should clear within a microsecond.
01647          */
01648         AT_WRITE_REG(hw, REG_MASTER_CTRL,
01649                         MASTER_CTRL_LED_MODE | MASTER_CTRL_SOFT_RST);
01650         wmb();
01651         mdelay(1);
01652 
01653         /* Wait at least 10ms for All module to be Idle */
01654         for (timeout = 0; timeout < AT_HW_MAX_IDLE_DELAY; timeout++) {
01655                 idle_status_data = AT_READ_REG(hw, REG_IDLE_STATUS);
01656                 if (idle_status_data == 0)
01657                         break;
01658                 mdelay(1);
01659         }
01660 
01661         if (timeout >= AT_HW_MAX_IDLE_DELAY) {
01662                 DBG("atl1e: MAC reset timeout\n");
01663                 return AT_ERR_TIMEOUT;
01664         }
01665 
01666         return 0;
01667 }

s32 atl1e_read_mac_addr ( struct atl1e_hw hw  ) 

Definition at line 1344 of file atl1e.c.

References AT_ERR_EEPROM, atl1e_get_permanent_address(), atl1e_hw::mac_addr, memcpy, and atl1e_hw::perm_mac_addr.

Referenced by atl1e_probe().

01345 {
01346         int err = 0;
01347 
01348         err = atl1e_get_permanent_address(hw);
01349         if (err)
01350                 return AT_ERR_EEPROM;
01351         memcpy(hw->mac_addr, hw->perm_mac_addr, sizeof(hw->perm_mac_addr));
01352         return 0;
01353 }

s32 atl1e_init_hw ( struct atl1e_hw hw  ) 

Definition at line 1679 of file atl1e.c.

References AT_WRITE_REG, AT_WRITE_REG_ARRAY, atl1e_init_pcie(), atl1e_phy_init(), and REG_RX_HASH_TABLE.

Referenced by atl1e_up().

01680 {
01681         s32 ret_val = 0;
01682 
01683         atl1e_init_pcie(hw);
01684 
01685         /* Zero out the Multicast HASH table */
01686         /* clear the old settings from the multicast hash table */
01687         AT_WRITE_REG(hw, REG_RX_HASH_TABLE, 0);
01688         AT_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0);
01689 
01690         ret_val = atl1e_phy_init(hw);
01691 
01692         return ret_val;
01693 }

s32 atl1e_phy_commit ( struct atl1e_hw hw  ) 

Definition at line 1500 of file atl1e.c.

References AT_READ_REG, atl1e_write_phy_reg(), DBG, mdelay(), MDIO_BUSY, MDIO_START, MII_BMCR, MII_CR_AUTO_NEG_EN, MII_CR_RESET, MII_CR_RESTART_AUTO_NEG, REG_MDIO_CTRL, u16, and u32.

Referenced by atl1e_phy_init().

01501 {
01502         int ret_val;
01503         u16 phy_data;
01504 
01505         phy_data = MII_CR_RESET | MII_CR_AUTO_NEG_EN | MII_CR_RESTART_AUTO_NEG;
01506 
01507         ret_val = atl1e_write_phy_reg(hw, MII_BMCR, phy_data);
01508         if (ret_val) {
01509                 u32 val;
01510                 int i;
01511                 /**************************************
01512                  * pcie serdes link may be down !
01513                  **************************************/
01514                 for (i = 0; i < 25; i++) {
01515                         mdelay(1);
01516                         val = AT_READ_REG(hw, REG_MDIO_CTRL);
01517                         if (!(val & (MDIO_START | MDIO_BUSY)))
01518                                 break;
01519                 }
01520 
01521                 if (0 != (val & (MDIO_START | MDIO_BUSY))) {
01522                         DBG("atl1e: PCI-E link down for at least 25ms\n");
01523                         return ret_val;
01524                 }
01525 
01526                 DBG("atl1e: PCI-E link up after %d ms\n", i);
01527         }
01528         return 0;
01529 }

s32 atl1e_get_speed_and_duplex ( struct atl1e_hw hw,
u16 speed,
u16 duplex 
)

Definition at line 1702 of file atl1e.c.

References AT_ERR_PHY_RES, AT_ERR_PHY_SPEED, atl1e_read_phy_reg(), FULL_DUPLEX, HALF_DUPLEX, MII_AT001_PSSR, MII_AT001_PSSR_1000MBS, MII_AT001_PSSR_100MBS, MII_AT001_PSSR_10MBS, MII_AT001_PSSR_DPLX, MII_AT001_PSSR_SPD_DPLX_RESOLVED, MII_AT001_PSSR_SPEED, SPEED_10, SPEED_100, SPEED_1000, and u16.

Referenced by atl1e_check_link().

01703 {
01704         int err;
01705         u16 phy_data;
01706 
01707         /* Read   PHY Specific Status Register (17) */
01708         err = atl1e_read_phy_reg(hw, MII_AT001_PSSR, &phy_data);
01709         if (err)
01710                 return err;
01711 
01712         if (!(phy_data & MII_AT001_PSSR_SPD_DPLX_RESOLVED))
01713                 return AT_ERR_PHY_RES;
01714 
01715         switch (phy_data & MII_AT001_PSSR_SPEED) {
01716         case MII_AT001_PSSR_1000MBS:
01717                 *speed = SPEED_1000;
01718                 break;
01719         case MII_AT001_PSSR_100MBS:
01720                 *speed = SPEED_100;
01721                 break;
01722         case MII_AT001_PSSR_10MBS:
01723                 *speed = SPEED_10;
01724                 break;
01725         default:
01726                 return AT_ERR_PHY_SPEED;
01727                 break;
01728         }
01729 
01730         if (phy_data & MII_AT001_PSSR_DPLX)
01731                 *duplex = FULL_DUPLEX;
01732         else
01733                 *duplex = HALF_DUPLEX;
01734 
01735         return 0;
01736 }

u32 atl1e_auto_get_fc ( struct atl1e_adapter adapter,
u16  duplex 
)

s32 atl1e_read_phy_reg ( struct atl1e_hw hw,
u16  reg_addr,
u16 phy_data 
)

Definition at line 1360 of file atl1e.c.

References AT_ERR_PHY, AT_READ_REG, AT_WRITE_REG, MDIO_BUSY, MDIO_CLK_25_4, MDIO_CLK_SEL_SHIFT, MDIO_REG_ADDR_MASK, MDIO_REG_ADDR_SHIFT, MDIO_RW, MDIO_START, MDIO_SUP_PREAMBLE, MDIO_WAIT_TIMES, REG_MDIO_CTRL, u16, u32, udelay(), and wmb.

Referenced by atl1e_check_link(), atl1e_clear_phy_int(), atl1e_get_speed_and_duplex(), and atl1e_mdio_read().

01361 {
01362         u32 val;
01363         int i;
01364 
01365         val = ((u32)(reg_addr & MDIO_REG_ADDR_MASK)) << MDIO_REG_ADDR_SHIFT |
01366                 MDIO_START | MDIO_SUP_PREAMBLE | MDIO_RW |
01367                 MDIO_CLK_25_4 << MDIO_CLK_SEL_SHIFT;
01368 
01369         AT_WRITE_REG(hw, REG_MDIO_CTRL, val);
01370 
01371         wmb();
01372 
01373         for (i = 0; i < MDIO_WAIT_TIMES; i++) {
01374                 udelay(2);
01375                 val = AT_READ_REG(hw, REG_MDIO_CTRL);
01376                 if (!(val & (MDIO_START | MDIO_BUSY)))
01377                         break;
01378                 wmb();
01379         }
01380         if (!(val & (MDIO_START | MDIO_BUSY))) {
01381                 *phy_data = (u16)val;
01382                 return 0;
01383         }
01384 
01385         return AT_ERR_PHY;
01386 }

s32 atl1e_write_phy_reg ( struct atl1e_hw hw,
u32  reg_addr,
u16  phy_data 
)

Definition at line 1394 of file atl1e.c.

References AT_ERR_PHY, AT_READ_REG, AT_WRITE_REG, MDIO_BUSY, MDIO_CLK_25_4, MDIO_CLK_SEL_SHIFT, MDIO_DATA_MASK, MDIO_DATA_SHIFT, MDIO_REG_ADDR_MASK, MDIO_REG_ADDR_SHIFT, MDIO_START, MDIO_SUP_PREAMBLE, MDIO_WAIT_TIMES, REG_MDIO_CTRL, u32, udelay(), and wmb.

Referenced by atl1e_mdio_write(), atl1e_phy_commit(), atl1e_phy_init(), atl1e_phy_setup_autoneg_adv(), and atl1e_restart_autoneg().

01395 {
01396         int i;
01397         u32 val;
01398 
01399         val = ((u32)(phy_data & MDIO_DATA_MASK)) << MDIO_DATA_SHIFT |
01400                (reg_addr&MDIO_REG_ADDR_MASK) << MDIO_REG_ADDR_SHIFT |
01401                MDIO_SUP_PREAMBLE |
01402                MDIO_START |
01403                MDIO_CLK_25_4 << MDIO_CLK_SEL_SHIFT;
01404 
01405         AT_WRITE_REG(hw, REG_MDIO_CTRL, val);
01406         wmb();
01407 
01408         for (i = 0; i < MDIO_WAIT_TIMES; i++) {
01409                 udelay(2);
01410                 val = AT_READ_REG(hw, REG_MDIO_CTRL);
01411                 if (!(val & (MDIO_START | MDIO_BUSY)))
01412                         break;
01413                 wmb();
01414         }
01415 
01416         if (!(val & (MDIO_START | MDIO_BUSY)))
01417                 return 0;
01418 
01419         return AT_ERR_PHY;
01420 }

s32 atl1e_validate_mdi_setting ( struct atl1e_hw hw  ) 

void atl1e_hw_set_mac_addr ( struct atl1e_hw hw  ) 

Definition at line 1274 of file atl1e.c.

References AT_WRITE_REG_ARRAY, atl1e_hw::mac_addr, REG_MAC_STA_ADDR, and u32.

Referenced by atl1e_configure().

01275 {
01276         u32 value;
01277         /*
01278          * 00-0B-6A-F6-00-DC
01279          * 0:  6AF600DC 1: 000B
01280          * low dword
01281          */
01282         value = (((u32)hw->mac_addr[2]) << 24) |
01283                 (((u32)hw->mac_addr[3]) << 16) |
01284                 (((u32)hw->mac_addr[4]) << 8)  |
01285                 (((u32)hw->mac_addr[5])) ;
01286         AT_WRITE_REG_ARRAY(hw, REG_MAC_STA_ADDR, 0, value);
01287         /* hight dword */
01288         value = (((u32)hw->mac_addr[0]) << 8) |
01289                 (((u32)hw->mac_addr[1])) ;
01290         AT_WRITE_REG_ARRAY(hw, REG_MAC_STA_ADDR, 1, value);
01291 }

s32 atl1e_phy_enter_power_saving ( struct atl1e_hw hw  ) 

s32 atl1e_phy_leave_power_saving ( struct atl1e_hw hw  ) 

s32 atl1e_phy_init ( struct atl1e_hw hw  ) 

Definition at line 1531 of file atl1e.c.

References AT_WRITE_REGW, atl1e_phy_commit(), atl1e_phy_setup_autoneg_adv(), atl1e_restart_autoneg(), atl1e_write_phy_reg(), DBG, GPHY_CTRL_DEFAULT, GPHY_CTRL_EXT_RESET, mdelay(), MII_DBG_ADDR, MII_DBG_DATA, MII_INT_CTRL, atl1e_hw::phy_configured, atl1e_hw::re_autoneg, REG_GPHY_CTRL, and u16.

Referenced by atl1e_init_hw(), and atl1e_probe().

01532 {
01533         s32 ret_val;
01534         u16 phy_val;
01535 
01536         if (hw->phy_configured) {
01537                 if (hw->re_autoneg) {
01538                         hw->re_autoneg = 0;
01539                         return atl1e_restart_autoneg(hw);
01540                 }
01541                 return 0;
01542         }
01543 
01544         /* RESET GPHY Core */
01545         AT_WRITE_REGW(hw, REG_GPHY_CTRL, GPHY_CTRL_DEFAULT);
01546         mdelay(2);
01547         AT_WRITE_REGW(hw, REG_GPHY_CTRL, GPHY_CTRL_DEFAULT |
01548                       GPHY_CTRL_EXT_RESET);
01549         mdelay(2);
01550 
01551         /* patches */
01552         /* p1. eable hibernation mode */
01553         ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0xB);
01554         if (ret_val)
01555                 return ret_val;
01556         ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, 0xBC00);
01557         if (ret_val)
01558                 return ret_val;
01559         /* p2. set Class A/B for all modes */
01560         ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0);
01561         if (ret_val)
01562                 return ret_val;
01563         phy_val = 0x02ef;
01564         /* remove Class AB */
01565         /* phy_val = hw->emi_ca ? 0x02ef : 0x02df; */
01566         ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, phy_val);
01567         if (ret_val)
01568                 return ret_val;
01569         /* p3. 10B ??? */
01570         ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0x12);
01571         if (ret_val)
01572                 return ret_val;
01573         ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, 0x4C04);
01574         if (ret_val)
01575                 return ret_val;
01576         /* p4. 1000T power */
01577         ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0x4);
01578         if (ret_val)
01579                 return ret_val;
01580         ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, 0x8BBB);
01581         if (ret_val)
01582                 return ret_val;
01583 
01584         ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0x5);
01585         if (ret_val)
01586                 return ret_val;
01587         ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, 0x2C46);
01588         if (ret_val)
01589                 return ret_val;
01590 
01591         mdelay(1);
01592 
01593         /*Enable PHY LinkChange Interrupt */
01594         ret_val = atl1e_write_phy_reg(hw, MII_INT_CTRL, 0xC00);
01595         if (ret_val) {
01596                 DBG("atl1e: Error enable PHY linkChange Interrupt\n");
01597                 return ret_val;
01598         }
01599         /* setup AutoNeg parameters */
01600         ret_val = atl1e_phy_setup_autoneg_adv(hw);
01601         if (ret_val) {
01602                 DBG("atl1e: Error Setting up Auto-Negotiation\n");
01603                 return ret_val;
01604         }
01605         /* SW.Reset & En-Auto-Neg to restart Auto-Neg*/
01606         DBG("atl1e: Restarting Auto-Neg");
01607         ret_val = atl1e_phy_commit(hw);
01608         if (ret_val) {
01609                 DBG("atl1e: Error Resetting the phy");
01610                 return ret_val;
01611         }
01612 
01613         hw->phy_configured = 1;
01614 
01615         return 0;
01616 }

int atl1e_check_eeprom_exist ( struct atl1e_hw hw  ) 

Definition at line 1261 of file atl1e.c.

References AT_READ_REG, AT_READ_REGW, AT_WRITE_REG, REG_PCIE_CAP_LIST, REG_SPI_FLASH_CTRL, SPI_FLASH_CTRL_EN_VPD, and u32.

Referenced by atl1e_get_permanent_address().

01262 {
01263         u32 value;
01264 
01265         value = AT_READ_REG(hw, REG_SPI_FLASH_CTRL);
01266         if (value & SPI_FLASH_CTRL_EN_VPD) {
01267                 value &= ~SPI_FLASH_CTRL_EN_VPD;
01268                 AT_WRITE_REG(hw, REG_SPI_FLASH_CTRL, value);
01269         }
01270         value = AT_READ_REGW(hw, REG_PCIE_CAP_LIST);
01271         return ((value & 0xFF00) == 0x6C00) ? 0 : 1;
01272 }

void atl1e_force_ps ( struct atl1e_hw hw  ) 

Definition at line 1333 of file atl1e.c.

References AT_WRITE_REGW, GPHY_CTRL_EXT_RESET, GPHY_CTRL_PW_WOL_DIS, and REG_GPHY_CTRL.

Referenced by atl1e_remove().

s32 atl1e_restart_autoneg ( struct atl1e_hw hw  ) 

Definition at line 1738 of file atl1e.c.

References athr_l1e, athr_l2e_revA, atl1e_write_phy_reg(), atl1e_hw::mii_1000t_ctrl_reg, MII_ADVERTISE, MII_AT001_CR, atl1e_hw::mii_autoneg_adv_reg, MII_BMCR, MII_CR_AUTO_NEG_EN, MII_CR_RESET, MII_CR_RESTART_AUTO_NEG, and atl1e_hw::nic_type.

Referenced by atl1e_phy_init(), and atl1e_probe().

01739 {
01740         int err = 0;
01741 
01742         err = atl1e_write_phy_reg(hw, MII_ADVERTISE, hw->mii_autoneg_adv_reg);
01743         if (err)
01744                 return err;
01745 
01746         if (hw->nic_type == athr_l1e || hw->nic_type == athr_l2e_revA) {
01747                 err = atl1e_write_phy_reg(hw, MII_AT001_CR,
01748                                        hw->mii_1000t_ctrl_reg);
01749                 if (err)
01750                         return err;
01751         }
01752 
01753         err = atl1e_write_phy_reg(hw, MII_BMCR,
01754                         MII_CR_RESET | MII_CR_AUTO_NEG_EN |
01755                         MII_CR_RESTART_AUTO_NEG);
01756         return err;
01757 }


Generated on Tue Apr 6 20:01:21 2010 for gPXE by  doxygen 1.5.7.1