1*5748Sduboff /* 2*5748Sduboff * sfereg.h: SiS900/DP83815 register definition 3*5748Sduboff * 4*5748Sduboff * Copyright (c) 2002-2007 Masayuki Murayama. All rights reserved. 5*5748Sduboff * 6*5748Sduboff * Redistribution and use in source and binary forms, with or without 7*5748Sduboff * modification, are permitted provided that the following conditions are met: 8*5748Sduboff * 9*5748Sduboff * 1. Redistributions of source code must retain the above copyright notice, 10*5748Sduboff * this list of conditions and the following disclaimer. 11*5748Sduboff * 12*5748Sduboff * 2. Redistributions in binary form must reproduce the above copyright notice, 13*5748Sduboff * this list of conditions and the following disclaimer in the documentation 14*5748Sduboff * and/or other materials provided with the distribution. 15*5748Sduboff * 16*5748Sduboff * 3. Neither the name of the author nor the names of its contributors may be 17*5748Sduboff * used to endorse or promote products derived from this software without 18*5748Sduboff * specific prior written permission. 19*5748Sduboff * 20*5748Sduboff * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21*5748Sduboff * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22*5748Sduboff * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*5748Sduboff * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24*5748Sduboff * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25*5748Sduboff * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26*5748Sduboff * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27*5748Sduboff * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28*5748Sduboff * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29*5748Sduboff * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 30*5748Sduboff * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 31*5748Sduboff * DAMAGE. 32*5748Sduboff */ 33*5748Sduboff #pragma ident "%Z%%M% %I% %E% SMI" /* sfe device driver */ 34*5748Sduboff 35*5748Sduboff #ifndef _SFEREG_H_ 36*5748Sduboff #define _SFEREG_H_ 37*5748Sduboff /* 38*5748Sduboff * Tx/Rx descriptor 39*5748Sduboff */ 40*5748Sduboff struct sfe_desc { 41*5748Sduboff volatile uint32_t d_link; /* link to the next */ 42*5748Sduboff volatile uint32_t d_cmdsts; /* command/status field */ 43*5748Sduboff volatile uint32_t d_bufptr; /* ptr to the first fragment */ 44*5748Sduboff }; 45*5748Sduboff 46*5748Sduboff /* CMDSTS common Bit Definition */ 47*5748Sduboff #define CMDSTS_OWN 0x80000000U /* 1: data consumer owns */ 48*5748Sduboff #define CMDSTS_MORE 0x40000000U /* Not the last descriptor */ 49*5748Sduboff #define CMDSTS_INTR 0x20000000U 50*5748Sduboff #define CMDSTS_SUPCRC 0x10000000U 51*5748Sduboff #define CMDSTS_INCCRC CMDSTS_SUPCRC 52*5748Sduboff #define CMDSTS_OK 0x08000000U /* Packet is OK */ 53*5748Sduboff #define CMDSTS_SIZE 0x00000fffU /* Descriptor byte count */ 54*5748Sduboff 55*5748Sduboff /* Transmit Status Bit Definition */ 56*5748Sduboff #define CMDSTS_TXA 0x04000000U /* Transmit abort */ 57*5748Sduboff #define CMDSTS_TFU 0x02000000U /* Transmit FIFO Underrun */ 58*5748Sduboff #define CMDSTS_CRS 0x01000000U /* Carrier sense lost */ 59*5748Sduboff #define CMDSTS_TD 0x00800000U /* Transmit deferred */ 60*5748Sduboff #define CMDSTS_ED 0x00400000U /* Exessive deferrral */ 61*5748Sduboff #define CMDSTS_OWC 0x00200000U /* Out of window collision */ 62*5748Sduboff #define CMDSTS_EC 0x00100000U /* Excessive collision */ 63*5748Sduboff #define CMDSTS_CCNT 0x000f0000U /* Collision count */ 64*5748Sduboff #define CMDSTS_CCNT_SHIFT (16) 65*5748Sduboff #define CCNT_MASK 0xfU /* Collision count mask */ 66*5748Sduboff 67*5748Sduboff #define TXSTAT_BITS \ 68*5748Sduboff "\020" \ 69*5748Sduboff "\040Own" \ 70*5748Sduboff "\037More" \ 71*5748Sduboff "\036Intr" \ 72*5748Sduboff "\035SupCrc" \ 73*5748Sduboff "\034Ok" \ 74*5748Sduboff "\033Abort" \ 75*5748Sduboff "\032UnderRun" \ 76*5748Sduboff "\031NoCarrier" \ 77*5748Sduboff "\030Deferd" \ 78*5748Sduboff "\027ExcDefer" \ 79*5748Sduboff "\026OWColl" \ 80*5748Sduboff "\025ExcColl" 81*5748Sduboff 82*5748Sduboff #define RXSTAT_BITS \ 83*5748Sduboff "\020" \ 84*5748Sduboff "\040Own" \ 85*5748Sduboff "\037More" \ 86*5748Sduboff "\036Intr" \ 87*5748Sduboff "\035IncCrc" \ 88*5748Sduboff "\034Ok" \ 89*5748Sduboff "\032OverRun" \ 90*5748Sduboff "\031MCast" \ 91*5748Sduboff "\030UniMatch" \ 92*5748Sduboff "\027TooLong" \ 93*5748Sduboff "\026Runt" \ 94*5748Sduboff "\025RxISErr" \ 95*5748Sduboff "\024CrcErr" \ 96*5748Sduboff "\023FaErr" \ 97*5748Sduboff "\022LoopBk" \ 98*5748Sduboff "\021RxCol" 99*5748Sduboff 100*5748Sduboff 101*5748Sduboff /* Receive Status Bit Definitions */ 102*5748Sduboff #define CMDSTS_RXA 0x04000000U /* Receive abort */ 103*5748Sduboff #define CMDSTS_RXO 0x02000000U /* Receive overrun */ 104*5748Sduboff #define CMDSTS_DEST 0x01800000U /* Destination class */ 105*5748Sduboff #define CMDSTS_DEST_SHIFT 23 /* Destination class */ 106*5748Sduboff #define DEST_REJECT 0U 107*5748Sduboff #define DEST_NODE 1U 108*5748Sduboff #define DEST_MULTI 2U 109*5748Sduboff #define DEST_BROAD 3U 110*5748Sduboff #define CMDSTS_LONG 0x00400000U /* Too long packet received */ 111*5748Sduboff #define CMDSTS_RUNT 0x00200000U /* Runt packet received */ 112*5748Sduboff #define CMDSTS_ISE 0x00100000U /* Invalid symbol error */ 113*5748Sduboff #define CMDSTS_CRCE 0x00080000U /* CRC error */ 114*5748Sduboff #define CMDSTS_FAE 0x00040000U /* Frame alignment */ 115*5748Sduboff #define CMDSTS_LBP 0x00020000U /* Loopback packet */ 116*5748Sduboff #define CMDSTS_COL 0x00010000U /* Collision activety */ 117*5748Sduboff 118*5748Sduboff /* 119*5748Sduboff * Offsets of MAC Operational Registers 120*5748Sduboff */ 121*5748Sduboff #define CR 0x00 /* Command register */ 122*5748Sduboff #define CFG 0x04 /* Configuration register */ 123*5748Sduboff #define EROMAR 0x08 /* EEPROM access register */ 124*5748Sduboff #define MEAR 0x08 /* alias for MII access register (sis900) */ 125*5748Sduboff #define PTSCR 0x0c /* PCI test control register */ 126*5748Sduboff #define ISR 0x10 /* Interrupt status register */ 127*5748Sduboff #define IMR 0x14 /* Interrupt mask register */ 128*5748Sduboff #define IER 0x18 /* Interrupt enable register */ 129*5748Sduboff #define ENPHY 0x1c /* Enhanced PHY access register */ 130*5748Sduboff #define TXDP 0x20 /* Transmit descriptor pointer reg */ 131*5748Sduboff #define TXCFG 0x24 /* Transmit configuration register */ 132*5748Sduboff #define RXDP 0x30 /* Receive descriptor pointer reg */ 133*5748Sduboff #define RXCFG 0x34 /* Receive configration register */ 134*5748Sduboff #define FLOWCTL 0x38 /* Flow control register (sis900) */ 135*5748Sduboff #define CCSR 0x3c /* Clock run status register (dp83815) */ 136*5748Sduboff #define PCR 0x44 /* Pause control register (dp83815) */ 137*5748Sduboff #define RFCR 0x48 /* Receive filter control register */ 138*5748Sduboff #define RFDR 0x4c /* Receive filter data register */ 139*5748Sduboff #define SRR 0x58 /* silicon revision register */ 140*5748Sduboff #define MII_REGS_BASE 0x80 /* DP83815 only */ 141*5748Sduboff #define PMCTL 0xb0 /* Power management control register */ 142*5748Sduboff #define PMEVT 0xb4 /* Power management wake-up event reg */ 143*5748Sduboff #define WAKECRC 0xbc /* Wake-up sample frame CRC register */ 144*5748Sduboff #define WAKEMASK 0xc0 /* Wake-up sample frame mask register */ 145*5748Sduboff 146*5748Sduboff 147*5748Sduboff /* Command register */ 148*5748Sduboff #define CR_RELOAD 0x0400U /* reload mac address */ 149*5748Sduboff #define CR_ACCESSMODE 0x0200U /* mii access mode */ 150*5748Sduboff #define CR_RST 0x0100U /* Reset */ 151*5748Sduboff #define CR_SWI 0x0080U /* Software interrupt */ 152*5748Sduboff #define CR_RXR 0x0020U /* Receiver reset */ 153*5748Sduboff #define CR_TXR 0x0010U /* Transmit reset */ 154*5748Sduboff #define CR_RXD 0x0008U /* Receiver disable */ 155*5748Sduboff #define CR_RXE 0x0004U /* Receiver enable */ 156*5748Sduboff #define CR_TXD 0x0002U /* Transmit disable */ 157*5748Sduboff #define CR_TXE 0x0001U /* Transmit enable */ 158*5748Sduboff 159*5748Sduboff #define CR_BITS \ 160*5748Sduboff "\020" \ 161*5748Sduboff "\011Reset" \ 162*5748Sduboff "\010SWI" \ 163*5748Sduboff "\006RxReset" \ 164*5748Sduboff "\005TxReset" \ 165*5748Sduboff "\004RxDisable" \ 166*5748Sduboff "\003RxEnable" \ 167*5748Sduboff "\002TxDisable" \ 168*5748Sduboff "\001TxEnable" 169*5748Sduboff 170*5748Sduboff /* Configration register */ 171*5748Sduboff #define CFG_LNKSTS 0x80000000U /* Link up (83815) */ 172*5748Sduboff #define CFG_SPEED100 0x40000000U /* 100Mbps (83815) */ 173*5748Sduboff #define CFG_FDUP 0x20000000U /* full duplex (83815) */ 174*5748Sduboff #define CFG_POL 0x10000000U /* 10Mbps polarity indication (83815) */ 175*5748Sduboff #define CFG_ANEG_DN 0x08000000U /* auto negotiation done (83815) */ 176*5748Sduboff #define CFG_PINT_ACEN 0x00020000U /* PHY interrupt auto clear (83815) */ 177*5748Sduboff #define CFG_PAUSE_ADV 0x00010000U /* Advertise pause (83815) */ 178*5748Sduboff #define CFG_ANEG_SEL 0x0000e000U /* Auto-nego default (83815) */ 179*5748Sduboff #define CFG_EDB_MASTER 0x00002000U /* sis635, sis900B, sis96x */ 180*5748Sduboff #define CFG_EXT_PHY 0x00001000U /* External PHY support (83815) */ 181*5748Sduboff #define CFG_PHY_RST 0x00000400U /* Internal PHY reset (83815) */ 182*5748Sduboff #define CFG_RND_CNT 0x00000400U /* sis635 & 900B */ 183*5748Sduboff #define CFG_PHY_DIS 0x00000200U /* Internal PHY disable (83815) */ 184*5748Sduboff #define CFG_FAIR_BCKOFF 0x00000200U /* sis635 & 900B */ 185*5748Sduboff #define CFG_EUPHCOMP 0x00000100U /* DP83810 compatibility (83815) */ 186*5748Sduboff #define CFG_DESCRFMT 0x00000100U /* sis7016 */ 187*5748Sduboff #define CFG_REQALG 0x00000080U /* PCI Bus request algorithm */ 188*5748Sduboff #define CFG_SB 0x00000040U /* Single backoff */ 189*5748Sduboff #define CFG_POW 0x00000020U /* Program out of window timer */ 190*5748Sduboff #define CFG_EXD 0x00000010U /* Excessive deferral timer disable */ 191*5748Sduboff #define CFG_PESEL 0x00000008U /* Parity error detection action */ 192*5748Sduboff #define CFG_BROM_DIS 0x00000004U /* BootRom disable (83815) */ 193*5748Sduboff #define CFG_BEM 0x00000001U /* Big endian mode */ 194*5748Sduboff 195*5748Sduboff #define CFG_BITS_DP83815 \ 196*5748Sduboff "\020" \ 197*5748Sduboff "\040CFG_LNKSTS" \ 198*5748Sduboff "\037SPEED100" \ 199*5748Sduboff "\036FDUP" \ 200*5748Sduboff "\035POL" \ 201*5748Sduboff "\034ANEG_DN" \ 202*5748Sduboff "\022PINT_ACEN" \ 203*5748Sduboff "\021PAUSE_ADV" \ 204*5748Sduboff "\015EXT_PHY" \ 205*5748Sduboff "\013PHY_RST" \ 206*5748Sduboff "\012PHY_DIS" \ 207*5748Sduboff "\011EUPHCOMP" \ 208*5748Sduboff "\010REQALG" \ 209*5748Sduboff "\007SB" \ 210*5748Sduboff "\006POW" \ 211*5748Sduboff "\005EXD" \ 212*5748Sduboff "\004PESEL" \ 213*5748Sduboff "\003BROM_DIS" \ 214*5748Sduboff "\001BEM" 215*5748Sduboff 216*5748Sduboff #define CFG_BITS_SIS900 \ 217*5748Sduboff "\020" \ 218*5748Sduboff "\016EDB_EN" \ 219*5748Sduboff "\013RND_CNT" \ 220*5748Sduboff "\010REQALG" \ 221*5748Sduboff "\007SB" \ 222*5748Sduboff "\006POW" \ 223*5748Sduboff "\005EXD" \ 224*5748Sduboff "\004PESEL" \ 225*5748Sduboff "\001BEM" 226*5748Sduboff 227*5748Sduboff /* Serial EEPROM access register */ 228*5748Sduboff #define EROMAR_EECS 0x00000008U /* EEPROM chip select */ 229*5748Sduboff #define EROMAR_EESK 0x00000004U /* EEPROM serial clock */ 230*5748Sduboff #define EROMAR_EEDO 0x00000002U /* EEPROM data out */ 231*5748Sduboff #define EROMAR_EEDO_SHIFT 1 232*5748Sduboff #define EROMAR_EEDI 0x00000001U /* EEPROM data in + */ 233*5748Sduboff #define EROMAR_EEDI_SHIFT 0 234*5748Sduboff #define EROMAR_EEREQ 0x00000400U /* for sis963 eeprom mamagement */ 235*5748Sduboff #define EROMAR_EEDONE 0x00000200U /* for sis963 eeprom mamagement */ 236*5748Sduboff #define EROMAR_EEGNT 0x00000100U /* for sis963 eeprom mamagement */ 237*5748Sduboff 238*5748Sduboff #define MEAR_MDC 0x00000040U 239*5748Sduboff #define MEAR_MDDIR 0x00000020U 240*5748Sduboff #define MEAR_MDIO 0x00000010U 241*5748Sduboff #define MEAR_MDIO_SHIFT 4 242*5748Sduboff 243*5748Sduboff /* PCI Test Control register */ 244*5748Sduboff #define DISCARD_TEST 0x40000000U /* Discard timer test mode */ 245*5748Sduboff 246*5748Sduboff /* Interrupt status register */ 247*5748Sduboff #define ISR_WAKEEVT 0x10000000U /* sis900 */ 248*5748Sduboff #define ISR_PAUSE_END 0x08000000U /* sis900 */ 249*5748Sduboff #define ISR_PAUSE_ST 0x04000000U /* sis900 */ 250*5748Sduboff #define ISR_TXRCMP 0x02000000U 251*5748Sduboff #define ISR_RXRCMP 0x01000000U 252*5748Sduboff #define ISR_DPERR 0x00800000U /* Detected parity error */ 253*5748Sduboff #define ISR_SSERR 0x00400000U /* Signaled system error */ 254*5748Sduboff #define ISR_RMABT 0x00200000U /* Received master abort */ 255*5748Sduboff #define ISR_RTABT 0x00100000U /* Received target abort */ 256*5748Sduboff #define ISR_RXSOVR 0x00010000U /* Received status FIFO overrun */ 257*5748Sduboff #define ISR_HIBERR 0x00008000U 258*5748Sduboff #define ISR_SWI 0x00001000U 259*5748Sduboff #define ISR_TXURN 0x00000400U 260*5748Sduboff #define ISR_TXIDLE 0x00000200U 261*5748Sduboff #define ISR_TXERR 0x00000100U 262*5748Sduboff #define ISR_TXDESC 0x00000080U 263*5748Sduboff #define ISR_TXOK 0x00000040U 264*5748Sduboff #define ISR_RXORN 0x00000020U 265*5748Sduboff #define ISR_RXIDLE 0x00000010U 266*5748Sduboff #define ISR_RXEARLY 0x00000008U 267*5748Sduboff #define ISR_RXERR 0x00000004U 268*5748Sduboff #define ISR_RXDESC 0x00000002U 269*5748Sduboff #define ISR_RXOK 0x00000001U 270*5748Sduboff 271*5748Sduboff #define INTR_BITS \ 272*5748Sduboff "\020" \ 273*5748Sduboff "\035WakeEvt" \ 274*5748Sduboff "\034PauseEnd" \ 275*5748Sduboff "\033PauseST" \ 276*5748Sduboff "\032TXRCMP" \ 277*5748Sduboff "\031RXRCMP" \ 278*5748Sduboff "\030DPErr" \ 279*5748Sduboff "\027SSErr" \ 280*5748Sduboff "\026RMAbt" \ 281*5748Sduboff "\025RTAbt" \ 282*5748Sduboff "\021RxSOVR" \ 283*5748Sduboff "\020HIBErr" \ 284*5748Sduboff "\015SWI" \ 285*5748Sduboff "\013TxUrn" \ 286*5748Sduboff "\012TxIdle" \ 287*5748Sduboff "\011TxErr" \ 288*5748Sduboff "\010TxDesc" \ 289*5748Sduboff "\007TxOk" \ 290*5748Sduboff "\006RxORN" \ 291*5748Sduboff "\005RxIdle" \ 292*5748Sduboff "\004RxEarly" \ 293*5748Sduboff "\003RxErr" \ 294*5748Sduboff "\002RxDesc" \ 295*5748Sduboff "\001RxOk" 296*5748Sduboff 297*5748Sduboff 298*5748Sduboff /* Interrupt enable reigster */ 299*5748Sduboff #define IER_IE 0x00000001 /* Interrupt enable */ 300*5748Sduboff 301*5748Sduboff /* Enhanced PHY acces register */ 302*5748Sduboff #define ENPHY_DATA 0xffff0000U /* data */ 303*5748Sduboff #define ENPHY_DATA_SHIFT 16 304*5748Sduboff #define ENPHY_ADDR 0x0000f800U /* phy address */ 305*5748Sduboff #define ENPHY_ADDR_SHIFT 11 306*5748Sduboff #define ENPHY_OFFSET 0x000007c0U /* offset */ 307*5748Sduboff #define ENPHY_OFFSET_SHIFT 6 308*5748Sduboff #define ENPHY_RDCMD 0x00000020U /* read */ 309*5748Sduboff #define ENPHY_ACCESS 0x00000010U /* busy */ 310*5748Sduboff 311*5748Sduboff 312*5748Sduboff /* Transmit configuration register */ 313*5748Sduboff #define TXCFG_CSI 0x80000000U /* carrier sense ignore */ 314*5748Sduboff #define TXCFG_HBI 0x40000000U /* heart beat ignore */ 315*5748Sduboff #define TXCFG_MLB 0x20000000U /* MAC loop back */ 316*5748Sduboff #define TXCFG_ATP 0x10000000U /* Automatic transmit padding */ 317*5748Sduboff #define TXCFG_MXDMA 0x00700000U /* max dma burst size */ 318*5748Sduboff #define TXCFG_MXDMA_SHIFT 20 319*5748Sduboff #define TXCFG_MXDMA_512 (0U << TXCFG_MXDMA_SHIFT) 320*5748Sduboff #define TXCFG_MXDMA_4 (1U << TXCFG_MXDMA_SHIFT) 321*5748Sduboff #define TXCFG_MXDMA_8 (2U << TXCFG_MXDMA_SHIFT) 322*5748Sduboff #define TXCFG_MXDMA_16 (3U << TXCFG_MXDMA_SHIFT) 323*5748Sduboff #define TXCFG_MXDMA_32 (4U << TXCFG_MXDMA_SHIFT) 324*5748Sduboff #define TXCFG_MXDMA_64 (5U << TXCFG_MXDMA_SHIFT) 325*5748Sduboff #define TXCFG_MXDMA_128 (6U << TXCFG_MXDMA_SHIFT) 326*5748Sduboff #define TXCFG_MXDMA_256 (7U << TXCFG_MXDMA_SHIFT) 327*5748Sduboff #define TXCFG_FLTH 0x00003f00U /* Tx fill threshold */ 328*5748Sduboff #define TXCFG_FLTH_SHIFT 8 329*5748Sduboff #define TXCFG_DRTH 0x0000003fU /* Tx drain threshold */ 330*5748Sduboff 331*5748Sduboff #define TXFIFOSIZE 2048U 332*5748Sduboff #define TXCFG_FIFO_UNIT 32U 333*5748Sduboff 334*5748Sduboff #define TXCFG_BITS "\020\040CSI\037HBI\036MLB\035ATP" 335*5748Sduboff 336*5748Sduboff /* RXCFG:43 Reveive configuration register */ 337*5748Sduboff #define RXCFG_AEP 0x80000000U /* accept error packets */ 338*5748Sduboff #define RXCFG_ARP 0x40000000U /* accept runt packets */ 339*5748Sduboff #define RXCFG_ATX 0x10000000U /* accept transmit packets */ 340*5748Sduboff #define RXCFG_AJAB 0x08000000U /* accept jabber packets */ 341*5748Sduboff #define RXCFG_ALP_DP83815 0x08000000U /* accept long pakets */ 342*5748Sduboff #define RXCFG_MXDMA 0x00700000U /* max dma burst size */ 343*5748Sduboff #define RXCFG_MXDMA_SHIFT (20) 344*5748Sduboff #define RXCFG_MXDMA_512 (0U << RXCFG_MXDMA_SHIFT) 345*5748Sduboff #define RXCFG_MXDMA_4 (1U << RXCFG_MXDMA_SHIFT) 346*5748Sduboff #define RXCFG_MXDMA_8 (2U << RXCFG_MXDMA_SHIFT) 347*5748Sduboff #define RXCFG_MXDMA_16 (3U << RXCFG_MXDMA_SHIFT) 348*5748Sduboff #define RXCFG_MXDMA_32 (4U << RXCFG_MXDMA_SHIFT) 349*5748Sduboff #define RXCFG_MXDMA_64 (5U << RXCFG_MXDMA_SHIFT) 350*5748Sduboff #define RXCFG_MXDMA_128 (6U << RXCFG_MXDMA_SHIFT) 351*5748Sduboff #define RXCFG_MXDMA_256 (7U << RXCFG_MXDMA_SHIFT) 352*5748Sduboff #define RXCFG_DRTH 0x0000003eU /* Rx drain threshold */ 353*5748Sduboff #define RXCFG_DRTH_SHIFT 1 354*5748Sduboff 355*5748Sduboff #define RXFIFOSIZE 2048U 356*5748Sduboff #define RXCFG_FIFO_UNIT 8U 357*5748Sduboff 358*5748Sduboff #define RXCFG_BITS "\020\040AEP\037ARP\035ATX\034AJAB" 359*5748Sduboff 360*5748Sduboff 361*5748Sduboff /* FLWCRL:0x38 Flow Control register */ 362*5748Sduboff #define FLOWCTL_PAUSE 0x00000002U /* PAUSE flag */ 363*5748Sduboff #define FLOWCTL_FLOWEN 0x00000001U /* flow control enable */ 364*5748Sduboff 365*5748Sduboff #define FLOWCTL_BITS "\020\002PAUSE\001FLOWEN" 366*5748Sduboff 367*5748Sduboff /* CCSR:0x3c Clock run Control status register */ 368*5748Sduboff #define CCSR_PMESTS 0x00008000U 369*5748Sduboff #define CCSR_PMEEN 0x00000100U 370*5748Sduboff #define CCSR_CLKRUN_EN 0x00000001U 371*5748Sduboff 372*5748Sduboff /* PCR:0x44 Pause control/status register (DP83815) */ 373*5748Sduboff #define PCR_PSEN 0x80000000U /* Pause Enable */ 374*5748Sduboff #define PCR_PS_MCAST 0x40000000U /* Pause on multicast */ 375*5748Sduboff #define PCR_PS_DA 0x20000000U /* Pause on DA */ 376*5748Sduboff #define PCR_PS_ACT 0x00800000U /* Pause active */ 377*5748Sduboff #define PCR_PS_RCVD 0x00400000U /* Pause frame receved */ 378*5748Sduboff #define PCR_PSNEG 0x00200000U /* Pause negotiated */ 379*5748Sduboff #define PCR_MLD_EN 0x00010000U /* Manual load enable */ 380*5748Sduboff #define PCR_PAUSE_CNT 0x0000ffffU /* Pause counter value */ 381*5748Sduboff 382*5748Sduboff #define PCR_BITS \ 383*5748Sduboff "\020" \ 384*5748Sduboff "\040PCR_PSEN" \ 385*5748Sduboff "\037PCR_PS_MCAST" \ 386*5748Sduboff "\036PCR_PS_DA" \ 387*5748Sduboff "\030PCR_PS_ACT" \ 388*5748Sduboff "\027PCR_PS_RCVD" \ 389*5748Sduboff "\026PCR_PSNEG" \ 390*5748Sduboff "\021PCR_MLD_EN" 391*5748Sduboff 392*5748Sduboff /* RFCR:0x48 Receive filter control register */ 393*5748Sduboff #define RFCR_RFEN 0x80000000U /* receive filter enable */ 394*5748Sduboff #define RFCR_AAB 0x40000000U /* accept all broadcast */ 395*5748Sduboff #define RFCR_AAM 0x20000000U /* accept all multicast */ 396*5748Sduboff #define RFCR_AAP 0x10000000U /* accept all physical */ 397*5748Sduboff #define RFCR_APM_DP83815 0x08000000U /* accept perfect match */ 398*5748Sduboff #define RFCR_APAT_DP83815 0x07800000U /* accept on pattern match */ 399*5748Sduboff #define RFCR_APAT_SHIFT 23 /* pattern match base */ 400*5748Sduboff #define RFCR_AARP_DP83815 0x00400000U /* accept arp packets */ 401*5748Sduboff #define RFCR_MHEN_DP83815 0x00200000U /* multicast hash enable */ 402*5748Sduboff #define RFCR_UHEN_DP83815 0x00100000U /* unicast hash enable */ 403*5748Sduboff #define RFCR_ULM_DP83815 0x00080000U /* U/L bit mask */ 404*5748Sduboff #define RFCR_RFADDR_SIS900 0x000f0000U /* receive filter address */ 405*5748Sduboff #define RFCR_RFADDR_SHIFT_SIS900 16 406*5748Sduboff #define RFCR_RFADDR_DP83815 0x000003ffU 407*5748Sduboff #define RFCR_RFADDR_SHIFT_DP83815 0 408*5748Sduboff 409*5748Sduboff /* Receive filter offset */ 410*5748Sduboff #define RFADDR_MAC_SIS900 0U 411*5748Sduboff #define RFADDR_MULTICAST_SIS900 4U 412*5748Sduboff 413*5748Sduboff #define RFADDR_MAC_DP83815 0x000U 414*5748Sduboff #define RFADDR_PCOUNT01_DP83815 0x006U 415*5748Sduboff #define RFADDR_PCOUNT23_DP83815 0x008U 416*5748Sduboff #define RFADDR_MULTICAST_DP83815 0x200U 417*5748Sduboff #define RFADDR_PMATCH0_DP83815 0x280U 418*5748Sduboff #define RFADDR_PMATCH1_DP83815 0x282U 419*5748Sduboff #define RFADDR_PMATCH2_DP83815 0x300U 420*5748Sduboff #define RFADDR_PMATCH3_DP83815 0x302U 421*5748Sduboff 422*5748Sduboff /* Receive filter data register */ 423*5748Sduboff 424*5748Sduboff /* dp83815 Silicon revision register */ 425*5748Sduboff #define SRR_REV 0x0000ffffU 426*5748Sduboff #define SRR_REV_CVNG 0x0302U 427*5748Sduboff #define SRR_REV_DVNG_UJG 0x0403U 428*5748Sduboff 429*5748Sduboff /* sis900 revisions */ 430*5748Sduboff #define SIS630A_900_REV 0x80 431*5748Sduboff #define SIS630E_900_REV 0x81 432*5748Sduboff #define SIS630S_900_REV 0x82 433*5748Sduboff #define SIS630EA1_900_REV 0x83 434*5748Sduboff #define SIS630ET_900_REV 0x84 435*5748Sduboff #define SIS635A_900_REV 0x90 436*5748Sduboff #define SIS962_900_REV 0X91 437*5748Sduboff #define SIS900B_900_REV 0x03 438*5748Sduboff 439*5748Sduboff #define SIS630A0 0x00 440*5748Sduboff #define SIS630A1 0x01 441*5748Sduboff #define SIS630B0 0x10 442*5748Sduboff #define SIS630B1 0x11 443*5748Sduboff 444*5748Sduboff 445*5748Sduboff #endif /* _SFEREG_H_ */ 446