Print this page
212 Atheros AR8132 / L1c Gigabit Ethernet Adapter

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/atge/atge_cmn_reg.h
          +++ new/usr/src/uts/common/io/atge/atge_cmn_reg.h
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
       22 + * Copyright (c) 2012 Gary Mills
       23 + *
  22   24   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   25   * Use is subject to license terms.
  24   26   */
       27 +/*
       28 + * Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
       29 + * All rights reserved.
       30 + *
       31 + * Redistribution and use in source and binary forms, with or without
       32 + * modification, are permitted provided that the following conditions
       33 + * are met:
       34 + * 1. Redistributions of source code must retain the above copyright
       35 + *    notice unmodified, this list of conditions, and the following
       36 + *    disclaimer.
       37 + * 2. Redistributions in binary form must reproduce the above copyright
       38 + *    notice, this list of conditions and the following disclaimer in the
       39 + *    documentation and/or other materials provided with the distribution.
       40 + *
       41 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
       42 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
       43 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
       44 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
       45 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
       46 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
       47 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
       48 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
       49 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
       50 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
       51 + * SUCH DAMAGE.
       52 + */
  25   53  
  26   54  #ifndef _ATGE_CMN_REG_H
  27   55  #define _ATGE_CMN_REG_H
  28   56  
  29   57  #ifdef __cplusplus
  30   58          extern "C" {
  31   59  #endif
  32   60  
  33   61  #define ATGE_SPI_CTRL   0x200
  34   62  #define SPI_VPD_ENB     0x00002000
↓ open down ↓ 1 lines elided ↑ open up ↑
  36   64  #define PCIE_DEVCTRL    0x0060  /* L1 */
  37   65  
  38   66  /*
  39   67   * Station Address
  40   68   */
  41   69  #define ATGE_PAR0               0x1488
  42   70  #define ATGE_PAR1               0x148C
  43   71  
  44   72  #define ATGE_MASTER_CFG         0x1400
  45   73  #define MASTER_RESET            0x00000001
  46      -#define MASTER_MTIMER_ENB       0x00000002
  47   74  #define MASTER_ITIMER_ENB       0x00000004      /* L1 */
  48      -#define MASTER_IM_TX_TIMER_ENB  0x00000004      /* L1E */
  49   75  #define MASTER_MANUAL_INT_ENB   0x00000008
  50      -#define MASTER_IM_RX_TIMER_ENB  0x00000020
  51   76  #define MASTER_INT_RDCLR        0x00000040
       77 +#define MASTER_SA_TIMER_ENB     0x00000080
       78 +#define MASTER_MTIMER_ENB       0x00000100
  52   79  #define MASTER_LED_MODE         0x00000200
       80 +#define MASTER_MANUAL_INTR_ENB  0x00000200
       81 +#define MASTER_IM_TX_TIMER_ENB  0x00000400
       82 +#define MASTER_IM_RX_TIMER_ENB  0x00000800
       83 +#define MASTER_CLK_SEL_DIS      0x00001000
       84 +#define MASTER_CLK_SWH_MODE     0x00002000
       85 +#define MASTER_INTR_RD_CLR      0x00004000
  53   86  #define MASTER_CHIP_REV_MASK    0x00FF0000
  54   87  #define MASTER_CHIP_ID_MASK     0xFF000000
       88 +#define MASTER_CHIP_ID_MASKXXX  0x7F000000 /* XXX */
       89 +#define MASTER_OTP_SEL          0x80000000
       90 +#define MASTER_TEST_MODE_SHIFT  2
  55   91  #define MASTER_CHIP_REV_SHIFT   16
  56   92  #define MASTER_CHIP_ID_SHIFT    24
  57   93  
  58   94  #define ATGE_RESET_TIMEOUT      100
  59   95  
  60   96  #define ATGE_IDLE_STATUS        0x1410
  61   97  #define IDLE_STATUS_RXMAC       0x00000001
  62   98  #define IDLE_STATUS_TXMAC       0x00000002
  63   99  #define IDLE_STATUS_RXQ         0x00000004
  64  100  #define IDLE_STATUS_TXQ         0x00000008
  65  101  #define IDLE_STATUS_DMARD       0x00000010
  66  102  #define IDLE_STATUS_DMAWR       0x00000020
  67  103  #define IDLE_STATUS_SMB         0x00000040
  68  104  #define IDLE_STATUS_CMB         0x00000080
  69  105  
      106 +#define ATGE_SERDES_LOCK                0x1424
      107 +#define SERDES_LOCK_DET                 0x00000001
      108 +#define SERDES_LOCK_DET_ENB             0x00000002
      109 +#define SERDES_MAC_CLK_SLOWDOWN         0x00020000
      110 +#define SERDES_PHY_CLK_SLOWDOWN         0x00040000
      111 +
  70  112  #define ATGE_MAC_CFG                    0x1480
  71  113  #define ATGE_CFG_TX_ENB                 0x00000001
  72  114  #define ATGE_CFG_RX_ENB                 0x00000002
  73  115  #define ATGE_CFG_TX_FC                  0x00000004
  74  116  #define ATGE_CFG_RX_FC                  0x00000008
  75  117  #define ATGE_CFG_LOOP                   0x00000010
  76  118  #define ATGE_CFG_FULL_DUPLEX            0x00000020
  77  119  #define ATGE_CFG_TX_CRC_ENB             0x00000040
  78  120  #define ATGE_CFG_TX_AUTO_PAD            0x00000080
  79  121  #define ATGE_CFG_TX_LENCHK              0x00000100
↓ open down ↓ 6 lines elided ↑ open up ↑
  86  128  #define ATGE_CFG_SYNC_RST_TX            0x00040000
  87  129  #define ATGE_CFG_SPEED_MASK             0x00300000
  88  130  #define ATGE_CFG_SPEED_10_100           0x00100000
  89  131  #define ATGE_CFG_SPEED_1000             0x00200000
  90  132  #define ATGE_CFG_DBG_TX_BACKOFF         0x00400000
  91  133  #define ATGE_CFG_TX_JUMBO_ENB           0x00800000
  92  134  #define ATGE_CFG_RXCSUM_ENB             0x01000000
  93  135  #define ATGE_CFG_ALLMULTI               0x02000000
  94  136  #define ATGE_CFG_BCAST                  0x04000000
  95  137  #define ATGE_CFG_DBG                    0x08000000
      138 +#define ATGE_CFG_SINGLE_PAUSE_ENB       0x10000000
      139 +#define ATGE_CFG_HASH_ALG_CRC32         0x20000000
      140 +#define ATGE_CFG_SPEED_MODE_SW          0x40000000
  96  141  #define ATGE_CFG_PREAMBLE_SHIFT         10
  97  142  #define ATGE_CFG_PREAMBLE_DEFAULT       7
  98  143  
  99  144  /*
 100  145   * Interrupt related registers.
 101  146   */
 102  147  #define ATGE_INTR_MASK                  0x1604
 103  148  #define ATGE_INTR_STATUS                0x1600
 104  149  #define INTR_SMB                        0x00000001
 105  150  #define INTR_MOD_TIMER                  0x00000002
↓ open down ↓ 3 lines elided ↑ open up ↑
 109  154  #define INTR_RRD_OFLOW                  0x00000020
 110  155  #define INTR_TX_FIFO_UNDERRUN           0x00000040
 111  156  #define INTR_LINK_CHG                   0x00000080
 112  157  #define INTR_HOST_RD_UNDERRUN           0x00000100
 113  158  #define INTR_HOST_RRD_OFLOW             0x00000200
 114  159  #define INTR_DMA_RD_TO_RST              0x00000400
 115  160  #define INTR_DMA_WR_TO_RST              0x00000800
 116  161  #define INTR_GPHY                       0x00001000
 117  162  #define INTR_RX_PKT                     0x00010000
 118  163  #define INTR_TX_PKT                     0x00020000
 119      -#define INTR_TX_DMA                     0x00040000
      164 +#define INTR_TX_DMA                     0x00040000      /* L1 intr status */
 120  165  #define INTR_MAC_RX                     0x00400000
 121  166  #define INTR_MAC_TX                     0x00800000
 122  167  #define INTR_UNDERRUN                   0x01000000
 123  168  #define INTR_FRAME_ERROR                0x02000000
 124  169  #define INTR_FRAME_OK                   0x04000000
 125  170  #define INTR_CSUM_ERROR                 0x08000000
 126  171  #define INTR_PHY_LINK_DOWN              0x10000000
 127  172  #define INTR_DIS_SM                     0x20000000
 128  173  #define INTR_DIS_DMA                    0x40000000
 129  174  #define INTR_DIS_INT                    0x80000000
 130  175  
 131  176  /* L1E intr status */
 132  177  #define INTR_RX_PKT1                    0x00080000
 133  178  #define INTR_RX_PKT2                    0x00100000
 134  179  #define INTR_RX_PKT3                    0x00200000
 135  180  
 136      -/* L1 intr status */
 137      -#define INTR_TX_DMA                     0x00040000
 138      -
 139  181  /*
 140  182   * L1E specific errors. We keep it here since some errors are common for
 141  183   * both L1 and L1E chip.
 142  184   *
 143  185   */
 144  186  #define L1E_INTR_ERRORS         \
 145  187          (INTR_DMA_RD_TO_RST | INTR_DMA_WR_TO_RST)
 146  188  
 147  189  /*
 148  190   * TXQ CFG registers.
↓ open down ↓ 2 lines elided ↑ open up ↑
 151  193  #define TXQ_CFG_TPD_BURST_MASK          0x0000000F
 152  194  #define TXQ_CFG_ENB                     0x00000020
 153  195  #define TXQ_CFG_ENHANCED_MODE           0x00000040
 154  196  #define TXQ_CFG_TX_FIFO_BURST_MASK      0xFFFF0000
 155  197  #define TXQ_CFG_TPD_BURST_SHIFT         0
 156  198  #define TXQ_CFG_TPD_BURST_DEFAULT       4
 157  199  #define TXQ_CFG_TX_FIFO_BURST_SHIFT     16
 158  200  #define TXQ_CFG_TX_FIFO_BURST_DEFAULT   256
 159  201  
 160  202  /*
 161      - * RXQ CFG register.
 162      - */
 163      -#define ATGE_RXQ_CFG                    0x15A0
 164      -
 165      -/*
 166  203   * Common registers for DMA CFG.
 167  204   */
 168  205  #define ATGE_DMA_CFG                    0x15C0
 169  206  #define DMA_CFG_IN_ORDER                0x00000001
 170  207  #define DMA_CFG_ENH_ORDER               0x00000002
 171  208  #define DMA_CFG_OUT_ORDER               0x00000004
 172  209  #define DMA_CFG_RCB_64                  0x00000000
 173  210  #define DMA_CFG_RCB_128                 0x00000008
 174  211  #define DMA_CFG_RD_BURST_128            0x00000000
 175  212  #define DMA_CFG_RD_BURST_256            0x00000010
↓ open down ↓ 54 lines elided ↑ open up ↑
 230  267  #define ATGE_PHY_STATUS                 0x1418
 231  268  #define PHY_TIMEOUT                     1000
 232  269  
 233  270  #define ATGE_DESC_TPD_CNT               0x155C
 234  271  #define DESC_TPD_CNT_MASK               0x00003FF
 235  272  #define DESC_TPD_CNT_SHIFT              0
 236  273  
 237  274  #define ATGE_DMA_BLOCK                  0x1534
 238  275  #define DMA_BLOCK_LOAD                  0x00000001
 239  276  
      277 +/* From Freebsd if_alcreg.h */
      278 +/* 0x0000 - 0x02FF : PCIe configuration space */
      279 +
      280 +#define ATGE_PEX_UNC_ERR_SEV            0x10C
      281 +#define PEX_UNC_ERR_SEV_TRN             0x00000001
      282 +#define PEX_UNC_ERR_SEV_DLP             0x00000010
      283 +#define PEX_UNC_ERR_SEV_PSN_TLP         0x00001000
      284 +#define PEX_UNC_ERR_SEV_FCP             0x00002000
      285 +#define PEX_UNC_ERR_SEV_CPL_TO          0x00004000
      286 +#define PEX_UNC_ERR_SEV_CA              0x00008000
      287 +#define PEX_UNC_ERR_SEV_UC              0x00010000
      288 +#define PEX_UNC_ERR_SEV_ROV             0x00020000
      289 +#define PEX_UNC_ERR_SEV_MLFP            0x00040000
      290 +#define PEX_UNC_ERR_SEV_ECRC            0x00080000
      291 +#define PEX_UNC_ERR_SEV_UR              0x00100000
      292 +
      293 +#define ATGE_PCIE_PHYMISC               0x1000
      294 +#define PCIE_PHYMISC_FORCE_RCV_DET      0x00000004
      295 +
      296 +#define ATGE_PCIE_PHYMISC2              0x1004
      297 +#define PCIE_PHYMISC2_SERDES_CDR_MASK   0x00030000
      298 +#define PCIE_PHYMISC2_SERDES_TH_MASK    0x000C0000
      299 +#define PCIE_PHYMISC2_SERDES_CDR_SHIFT  16
      300 +#define PCIE_PHYMISC2_SERDES_TH_SHIFT   18
      301 +
      302 +#define ATGE_LTSSM_ID_CFG               0x12FC
      303 +#define LTSSM_ID_WRO_ENB                0x00001000
      304 +
      305 +#define ATGE_SMB_STAT_TIMER             0x15C4
      306 +#define SMB_STAT_TIMER_MASK             0x00FFFFFF
      307 +#define SMB_STAT_TIMER_SHIFT            0
      308 +
      309 +#define ATGE_CMB_TD_THRESH              0x15C8
      310 +#define CMB_TD_THRESH_MASK              0x0000FFFF
      311 +#define CMB_TD_THRESH_SHIFT             0
      312 +
      313 +#define ATGE_CMB_TX_TIMER               0x15CC
      314 +#define CMB_TX_TIMER_MASK               0x0000FFFF
      315 +#define CMB_TX_TIMER_SHIFT              0
      316 +
      317 +#define ATGE_MBOX_RD0_PROD_IDX          0x15E0
      318 +
      319 +#define ATGE_MBOX_RD1_PROD_IDX          0x15E4
      320 +
      321 +#define ATGE_MBOX_RD2_PROD_IDX          0x15E8
      322 +
      323 +#define ATGE_MBOX_RD3_PROD_IDX          0x15EC
      324 +
      325 +#define ATGE_MBOX_RD_PROD_MASK          0x0000FFFF
      326 +#define MBOX_RD_PROD_SHIFT              0
      327 +
      328 +#define ATGE_MBOX_TD_PROD_IDX           0x15F0
      329 +#define MBOX_TD_PROD_HI_IDX_MASK        0x0000FFFF
      330 +#define MBOX_TD_PROD_LO_IDX_MASK        0xFFFF0000
      331 +#define MBOX_TD_PROD_HI_IDX_SHIFT       0
      332 +#define MBOX_TD_PROD_LO_IDX_SHIFT       16
      333 +
      334 +#define ATGE_MBOX_TD_CONS_IDX           0x15F4
      335 +#define MBOX_TD_CONS_HI_IDX_MASK        0x0000FFFF
      336 +#define MBOX_TD_CONS_LO_IDX_MASK        0xFFFF0000
      337 +#define MBOX_TD_CONS_HI_IDX_SHIFT       0
      338 +#define MBOX_TD_CONS_LO_IDX_SHIFT       16
      339 +
      340 +#define ATGE_MBOX_RD01_CONS_IDX         0x15F8
      341 +#define MBOX_RD0_CONS_IDX_MASK          0x0000FFFF
      342 +#define MBOX_RD1_CONS_IDX_MASK          0xFFFF0000
      343 +#define MBOX_RD0_CONS_IDX_SHIFT         0
      344 +#define MBOX_RD1_CONS_IDX_SHIFT         16
      345 +
      346 +#define ATGE_MBOX_RD23_CONS_IDX         0x15FC
      347 +#define MBOX_RD2_CONS_IDX_MASK          0x0000FFFF
      348 +#define MBOX_RD3_CONS_IDX_MASK          0xFFFF0000
      349 +#define MBOX_RD2_CONS_IDX_SHIFT         0
      350 +#define MBOX_RD3_CONS_IDX_SHIFT         16
      351 +
      352 +#define ATGE_INTR_RETRIG_TIMER          0x1608
      353 +#define INTR_RETRIG_TIMER_MASK          0x0000FFFF
      354 +#define INTR_RETRIG_TIMER_SHIFT         0
      355 +
      356 +#define ATGE_HDS_CFG                    0x160C
      357 +#define HDS_CFG_ENB                     0x00000001
      358 +#define HDS_CFG_BACKFILLSIZE_MASK       0x000FFF00
      359 +#define HDS_CFG_MAX_HDRSIZE_MASK        0xFFF00000
      360 +#define HDS_CFG_BACKFILLSIZE_SHIFT      8
      361 +#define HDS_CFG_MAX_HDRSIZE_SHIFT       20
      362 +
      363 +/* AR813x/AR815x registers for MAC statistics */
      364 +#define ATGE_RX_MIB_BASE                0x1700
      365 +
      366 +#define ATGE_TX_MIB_BASE                0x1760
      367 +
      368 +#define ATGE_CLK_GATING_CFG             0x1814
      369 +#define CLK_GATING_DMAW_ENB             0x0001
      370 +#define CLK_GATING_DMAR_ENB             0x0002
      371 +#define CLK_GATING_TXQ_ENB              0x0004
      372 +#define CLK_GATING_RXQ_ENB              0x0008
      373 +#define CLK_GATING_TXMAC_ENB            0x0010
      374 +#define CLK_GATING_RXMAC_ENB            0x0020
      375 +
      376 +#define ATGE_DEBUG_DATA0                0x1900
      377 +
      378 +#define ATGE_DEBUG_DATA1                0x1904
      379 +
      380 +#define ATGE_MII_DBG_ADDR               0x1D
      381 +#define ATGE_MII_DBG_DATA               0x1E
      382 +/* End Freebsd if_alcreg.h */
      383 +
 240  384  #define ATGE_MBOX                       0x15F0
 241  385  #define MBOX_RD_PROD_IDX_MASK           0x000007FF
 242  386  #define MBOX_RRD_CONS_IDX_MASK          0x003FF800
 243  387  #define MBOX_TD_PROD_IDX_MASK           0xFFC00000
 244  388  #define MBOX_RD_PROD_IDX_SHIFT          0
 245  389  #define MBOX_RRD_CONS_IDX_SHIFT         11
 246  390  #define MBOX_TD_PROD_IDX_SHIFT          22
 247  391  
 248  392  
 249  393  #define ATGE_IPG_IFG_CFG                0x1484
↓ open down ↓ 92 lines elided ↑ open up ↑
 342  486  #define RXQ_JUMBO_CFG_LKAH_MASK         0x00007800
 343  487  #define RXQ_JUMBO_CFG_RRD_TIMER_SHIFT   16
 344  488  #define RXQ_JUMBO_CFG_RRD_TIMER_MASK    0xFFFF0000
 345  489  
 346  490  #define ATGE_RXQ_FIFO_PAUSE_THRESH      0x15A8
 347  491  #define RXQ_FIFO_PAUSE_THRESH_LO_MASK   0x00000FFF
 348  492  #define RXQ_FIFO_PAUSE_THRESH_HI_MASK   0x0FFF000
 349  493  #define RXQ_FIFO_PAUSE_THRESH_LO_SHIFT  0
 350  494  #define RXQ_FIFO_PAUSE_THRESH_HI_SHIFT  16
 351  495  
      496 +/*
      497 + * RXQ CFG register.
      498 + */
 352  499  #define ATGE_RXQ_CFG                    0x15A0
 353      -#define ATGE_TXQ_CFG                    0x1580
 354  500  #define RXQ_CFG_ALIGN_32                0x00000000
 355  501  #define RXQ_CFG_ALIGN_64                0x00000001
 356  502  #define RXQ_CFG_ALIGN_128               0x00000002
 357  503  #define RXQ_CFG_ALIGN_256               0x00000003
 358  504  #define RXQ_CFG_QUEUE1_ENB              0x00000010
 359  505  #define RXQ_CFG_QUEUE2_ENB              0x00000020
 360  506  #define RXQ_CFG_QUEUE3_ENB              0x00000040
 361  507  #define RXQ_CFG_IPV6_CSUM_VERIFY        0x00000080
 362  508  #define RXQ_CFG_RSS_HASH_TBL_LEN_MASK   0x0000FF00
 363  509  #define RXQ_CFG_RSS_HASH_IPV4           0x00010000
↓ open down ↓ 10 lines elided ↑ open up ↑
 374  520  #define RXQ_CFG_ENB                     0x80000000
 375  521  #define RXQ_CFG_RSS_HASH_TBL_LEN_SHIFT  8
 376  522  
 377  523  /* 64bit multicast hash register. */
 378  524  #define ATGE_MAR0                       0x1490
 379  525  #define ATGE_MAR1                       0x1494
 380  526  
 381  527  #define ATPHY_DBG_ADDR                  0x1D
 382  528  #define ATPHY_DBG_DATA                  0x1E
 383  529  
      530 +/* From Freebsd if_alcreg.h */
      531 +#define MII_ANA_CFG0                    0x00
      532 +#define ANA_RESTART_CAL                 0x0001
      533 +#define ANA_MANUL_SWICH_ON_MASK         0x001E
      534 +#define ANA_MAN_ENABLE                  0x0020
      535 +#define ANA_SEL_HSP                     0x0040
      536 +#define ANA_EN_HB                       0x0080
      537 +#define ANA_EN_HBIAS                    0x0100
      538 +#define ANA_OEN_125M                    0x0200
      539 +#define ANA_EN_LCKDT                    0x0400
      540 +#define ANA_LCKDT_PHY                   0x0800
      541 +#define ANA_AFE_MODE                    0x1000
      542 +#define ANA_VCO_SLOW                    0x2000
      543 +#define ANA_VCO_FAST                    0x4000
      544 +#define ANA_SEL_CLK125M_DSP             0x8000
      545 +#define ANA_MANUL_SWICH_ON_SHIFT        1
      546 +
      547 +#define MII_ANA_CFG4                    0x04
      548 +#define ANA_IECHO_ADJ_MASK              0x0F
      549 +#define ANA_IECHO_ADJ_3_MASK            0x000F
      550 +#define ANA_IECHO_ADJ_2_MASK            0x00F0
      551 +#define ANA_IECHO_ADJ_1_MASK            0x0F00
      552 +#define ANA_IECHO_ADJ_0_MASK            0xF000
      553 +#define ANA_IECHO_ADJ_3_SHIFT           0
      554 +#define ANA_IECHO_ADJ_2_SHIFT           4
      555 +#define ANA_IECHO_ADJ_1_SHIFT           8
      556 +#define ANA_IECHO_ADJ_0_SHIFT           12
      557 +
      558 +#define MII_ANA_CFG5                    0x05
      559 +#define ANA_SERDES_CDR_BW_MASK          0x0003
      560 +#define ANA_MS_PAD_DBG                  0x0004
      561 +#define ANA_SPEEDUP_DBG                 0x0008
      562 +#define ANA_SERDES_TH_LOS_MASK          0x0030
      563 +#define ANA_SERDES_EN_DEEM              0x0040
      564 +#define ANA_SERDES_TXELECIDLE           0x0080
      565 +#define ANA_SERDES_BEACON               0x0100
      566 +#define ANA_SERDES_HALFTXDR             0x0200
      567 +#define ANA_SERDES_SEL_HSP              0x0400
      568 +#define ANA_SERDES_EN_PLL               0x0800
      569 +#define ANA_SERDES_EN                   0x1000
      570 +#define ANA_SERDES_EN_LCKDT             0x2000
      571 +#define ANA_SERDES_CDR_BW_SHIFT         0
      572 +#define ANA_SERDES_TH_LOS_SHIFT         4
      573 +
      574 +#define MII_ANA_CFG11                   0x0B
      575 +#define ANA_PS_HIB_EN                   0x8000
      576 +
      577 +#define MII_ANA_CFG18                   0x12
      578 +#define ANA_TEST_MODE_10BT_01MASK       0x0003
      579 +#define ANA_LOOP_SEL_10BT               0x0004
      580 +#define ANA_RGMII_MODE_SW               0x0008
      581 +#define ANA_EN_LONGECABLE               0x0010
      582 +#define ANA_TEST_MODE_10BT_2            0x0020
      583 +#define ANA_EN_10BT_IDLE                0x0400
      584 +#define ANA_EN_MASK_TB                  0x0800
      585 +#define ANA_TRIGGER_SEL_TIMER_MASK      0x3000
      586 +#define ANA_INTERVAL_SEL_TIMER_MASK     0xC000
      587 +#define ANA_TEST_MODE_10BT_01SHIFT      0
      588 +#define ANA_TRIGGER_SEL_TIMER_SHIFT     12
      589 +#define ANA_INTERVAL_SEL_TIMER_SHIFT    14
      590 +
      591 +#define MII_ANA_CFG41                   0x29
      592 +#define ANA_TOP_PS_EN                   0x8000
      593 +
      594 +#define MII_ANA_CFG54                   0x36
      595 +#define ANA_LONG_CABLE_TH_100_MASK      0x003F
      596 +#define ANA_DESERVED                    0x0040
      597 +#define ANA_EN_LIT_CH                   0x0080
      598 +#define ANA_SHORT_CABLE_TH_100_MASK     0x3F00
      599 +#define ANA_BP_BAD_LINK_ACCUM           0x4000
      600 +#define ANA_BP_SMALL_BW                 0x8000
      601 +#define ANA_LONG_CABLE_TH_100_SHIFT     0
      602 +#define ANA_SHORT_CABLE_TH_100_SHIFT    8
      603 +/* End Freebsd if_alcreg.h */
      604 +
 384  605  #define ATGE_TD_EOP                     0x00000001
 385  606  #define ATGE_TD_BUFLEN_MASK             0x00003FFF
 386  607  #define ATGE_TD_BUFLEN_SHIFT            0
 387  608  #define ATGE_TX_BYTES(x)        \
 388  609          (((x) << ATGE_TD_BUFLEN_SHIFT) & ATGE_TD_BUFLEN_MASK)
 389  610  
 390  611  #define ATGE_ISR_ACK_GPHY               19
 391  612  
 392  613  #ifdef __cplusplus
 393  614  }
 394  615  #endif
 395  616  
 396  617  #endif  /* _ATGE_CMN_REG_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX