15748Sduboff /* 25748Sduboff * sfereg.h: SiS900/DP83815 register definition 35748Sduboff * 45748Sduboff * Copyright (c) 2002-2007 Masayuki Murayama. All rights reserved. 55748Sduboff * 65748Sduboff * Redistribution and use in source and binary forms, with or without 75748Sduboff * modification, are permitted provided that the following conditions are met: 85748Sduboff * 95748Sduboff * 1. Redistributions of source code must retain the above copyright notice, 105748Sduboff * this list of conditions and the following disclaimer. 115748Sduboff * 125748Sduboff * 2. Redistributions in binary form must reproduce the above copyright notice, 135748Sduboff * this list of conditions and the following disclaimer in the documentation 145748Sduboff * and/or other materials provided with the distribution. 155748Sduboff * 165748Sduboff * 3. Neither the name of the author nor the names of its contributors may be 175748Sduboff * used to endorse or promote products derived from this software without 185748Sduboff * specific prior written permission. 195748Sduboff * 205748Sduboff * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 215748Sduboff * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 225748Sduboff * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 235748Sduboff * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 245748Sduboff * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 255748Sduboff * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 265748Sduboff * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 275748Sduboff * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 285748Sduboff * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 295748Sduboff * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 305748Sduboff * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 315748Sduboff * DAMAGE. 325748Sduboff */ 33*7116Sduboff 345748Sduboff #ifndef _SFEREG_H_ 355748Sduboff #define _SFEREG_H_ 365748Sduboff /* 375748Sduboff * Tx/Rx descriptor 385748Sduboff */ 395748Sduboff struct sfe_desc { 405748Sduboff volatile uint32_t d_link; /* link to the next */ 415748Sduboff volatile uint32_t d_cmdsts; /* command/status field */ 425748Sduboff volatile uint32_t d_bufptr; /* ptr to the first fragment */ 435748Sduboff }; 445748Sduboff 455748Sduboff /* CMDSTS common Bit Definition */ 465748Sduboff #define CMDSTS_OWN 0x80000000U /* 1: data consumer owns */ 475748Sduboff #define CMDSTS_MORE 0x40000000U /* Not the last descriptor */ 485748Sduboff #define CMDSTS_INTR 0x20000000U 495748Sduboff #define CMDSTS_SUPCRC 0x10000000U 505748Sduboff #define CMDSTS_INCCRC CMDSTS_SUPCRC 515748Sduboff #define CMDSTS_OK 0x08000000U /* Packet is OK */ 525748Sduboff #define CMDSTS_SIZE 0x00000fffU /* Descriptor byte count */ 535748Sduboff 545748Sduboff /* Transmit Status Bit Definition */ 555748Sduboff #define CMDSTS_TXA 0x04000000U /* Transmit abort */ 565748Sduboff #define CMDSTS_TFU 0x02000000U /* Transmit FIFO Underrun */ 575748Sduboff #define CMDSTS_CRS 0x01000000U /* Carrier sense lost */ 585748Sduboff #define CMDSTS_TD 0x00800000U /* Transmit deferred */ 595748Sduboff #define CMDSTS_ED 0x00400000U /* Exessive deferrral */ 605748Sduboff #define CMDSTS_OWC 0x00200000U /* Out of window collision */ 615748Sduboff #define CMDSTS_EC 0x00100000U /* Excessive collision */ 625748Sduboff #define CMDSTS_CCNT 0x000f0000U /* Collision count */ 635748Sduboff #define CMDSTS_CCNT_SHIFT (16) 645748Sduboff #define CCNT_MASK 0xfU /* Collision count mask */ 655748Sduboff 665748Sduboff #define TXSTAT_BITS \ 675748Sduboff "\020" \ 685748Sduboff "\040Own" \ 695748Sduboff "\037More" \ 705748Sduboff "\036Intr" \ 715748Sduboff "\035SupCrc" \ 725748Sduboff "\034Ok" \ 735748Sduboff "\033Abort" \ 745748Sduboff "\032UnderRun" \ 755748Sduboff "\031NoCarrier" \ 765748Sduboff "\030Deferd" \ 775748Sduboff "\027ExcDefer" \ 785748Sduboff "\026OWColl" \ 795748Sduboff "\025ExcColl" 805748Sduboff 815748Sduboff #define RXSTAT_BITS \ 825748Sduboff "\020" \ 835748Sduboff "\040Own" \ 845748Sduboff "\037More" \ 855748Sduboff "\036Intr" \ 865748Sduboff "\035IncCrc" \ 875748Sduboff "\034Ok" \ 885748Sduboff "\032OverRun" \ 895748Sduboff "\031MCast" \ 905748Sduboff "\030UniMatch" \ 915748Sduboff "\027TooLong" \ 925748Sduboff "\026Runt" \ 935748Sduboff "\025RxISErr" \ 945748Sduboff "\024CrcErr" \ 955748Sduboff "\023FaErr" \ 965748Sduboff "\022LoopBk" \ 975748Sduboff "\021RxCol" 985748Sduboff 995748Sduboff 1005748Sduboff /* Receive Status Bit Definitions */ 1015748Sduboff #define CMDSTS_RXA 0x04000000U /* Receive abort */ 1025748Sduboff #define CMDSTS_RXO 0x02000000U /* Receive overrun */ 1035748Sduboff #define CMDSTS_DEST 0x01800000U /* Destination class */ 1045748Sduboff #define CMDSTS_DEST_SHIFT 23 /* Destination class */ 1055748Sduboff #define DEST_REJECT 0U 1065748Sduboff #define DEST_NODE 1U 1075748Sduboff #define DEST_MULTI 2U 1085748Sduboff #define DEST_BROAD 3U 1095748Sduboff #define CMDSTS_LONG 0x00400000U /* Too long packet received */ 1105748Sduboff #define CMDSTS_RUNT 0x00200000U /* Runt packet received */ 1115748Sduboff #define CMDSTS_ISE 0x00100000U /* Invalid symbol error */ 1125748Sduboff #define CMDSTS_CRCE 0x00080000U /* CRC error */ 1135748Sduboff #define CMDSTS_FAE 0x00040000U /* Frame alignment */ 1145748Sduboff #define CMDSTS_LBP 0x00020000U /* Loopback packet */ 1155748Sduboff #define CMDSTS_COL 0x00010000U /* Collision activety */ 1165748Sduboff 1175748Sduboff /* 1185748Sduboff * Offsets of MAC Operational Registers 1195748Sduboff */ 1205748Sduboff #define CR 0x00 /* Command register */ 1215748Sduboff #define CFG 0x04 /* Configuration register */ 1225748Sduboff #define EROMAR 0x08 /* EEPROM access register */ 1235748Sduboff #define MEAR 0x08 /* alias for MII access register (sis900) */ 1245748Sduboff #define PTSCR 0x0c /* PCI test control register */ 1255748Sduboff #define ISR 0x10 /* Interrupt status register */ 1265748Sduboff #define IMR 0x14 /* Interrupt mask register */ 1275748Sduboff #define IER 0x18 /* Interrupt enable register */ 1285748Sduboff #define ENPHY 0x1c /* Enhanced PHY access register */ 1295748Sduboff #define TXDP 0x20 /* Transmit descriptor pointer reg */ 1305748Sduboff #define TXCFG 0x24 /* Transmit configuration register */ 1315748Sduboff #define RXDP 0x30 /* Receive descriptor pointer reg */ 1325748Sduboff #define RXCFG 0x34 /* Receive configration register */ 1335748Sduboff #define FLOWCTL 0x38 /* Flow control register (sis900) */ 1345748Sduboff #define CCSR 0x3c /* Clock run status register (dp83815) */ 1355748Sduboff #define PCR 0x44 /* Pause control register (dp83815) */ 1365748Sduboff #define RFCR 0x48 /* Receive filter control register */ 1375748Sduboff #define RFDR 0x4c /* Receive filter data register */ 1385748Sduboff #define SRR 0x58 /* silicon revision register */ 1395748Sduboff #define MII_REGS_BASE 0x80 /* DP83815 only */ 1405748Sduboff #define PMCTL 0xb0 /* Power management control register */ 1415748Sduboff #define PMEVT 0xb4 /* Power management wake-up event reg */ 1425748Sduboff #define WAKECRC 0xbc /* Wake-up sample frame CRC register */ 1435748Sduboff #define WAKEMASK 0xc0 /* Wake-up sample frame mask register */ 1445748Sduboff 1455748Sduboff 1465748Sduboff /* Command register */ 1475748Sduboff #define CR_RELOAD 0x0400U /* reload mac address */ 1485748Sduboff #define CR_ACCESSMODE 0x0200U /* mii access mode */ 1495748Sduboff #define CR_RST 0x0100U /* Reset */ 1505748Sduboff #define CR_SWI 0x0080U /* Software interrupt */ 1515748Sduboff #define CR_RXR 0x0020U /* Receiver reset */ 1525748Sduboff #define CR_TXR 0x0010U /* Transmit reset */ 1535748Sduboff #define CR_RXD 0x0008U /* Receiver disable */ 1545748Sduboff #define CR_RXE 0x0004U /* Receiver enable */ 1555748Sduboff #define CR_TXD 0x0002U /* Transmit disable */ 1565748Sduboff #define CR_TXE 0x0001U /* Transmit enable */ 1575748Sduboff 1585748Sduboff #define CR_BITS \ 1595748Sduboff "\020" \ 1605748Sduboff "\011Reset" \ 1615748Sduboff "\010SWI" \ 1625748Sduboff "\006RxReset" \ 1635748Sduboff "\005TxReset" \ 1645748Sduboff "\004RxDisable" \ 1655748Sduboff "\003RxEnable" \ 1665748Sduboff "\002TxDisable" \ 1675748Sduboff "\001TxEnable" 1685748Sduboff 1695748Sduboff /* Configration register */ 1705748Sduboff #define CFG_LNKSTS 0x80000000U /* Link up (83815) */ 1715748Sduboff #define CFG_SPEED100 0x40000000U /* 100Mbps (83815) */ 1725748Sduboff #define CFG_FDUP 0x20000000U /* full duplex (83815) */ 1735748Sduboff #define CFG_POL 0x10000000U /* 10Mbps polarity indication (83815) */ 1745748Sduboff #define CFG_ANEG_DN 0x08000000U /* auto negotiation done (83815) */ 175*7116Sduboff #define CFG_PHY_CFG 0x00fc0000U /* internal PHY configuration (83815) */ 1765748Sduboff #define CFG_PINT_ACEN 0x00020000U /* PHY interrupt auto clear (83815) */ 1775748Sduboff #define CFG_PAUSE_ADV 0x00010000U /* Advertise pause (83815) */ 1785748Sduboff #define CFG_ANEG_SEL 0x0000e000U /* Auto-nego default (83815) */ 1795748Sduboff #define CFG_EDB_MASTER 0x00002000U /* sis635, sis900B, sis96x */ 1805748Sduboff #define CFG_EXT_PHY 0x00001000U /* External PHY support (83815) */ 1815748Sduboff #define CFG_PHY_RST 0x00000400U /* Internal PHY reset (83815) */ 1825748Sduboff #define CFG_RND_CNT 0x00000400U /* sis635 & 900B */ 1835748Sduboff #define CFG_PHY_DIS 0x00000200U /* Internal PHY disable (83815) */ 1845748Sduboff #define CFG_FAIR_BCKOFF 0x00000200U /* sis635 & 900B */ 1855748Sduboff #define CFG_EUPHCOMP 0x00000100U /* DP83810 compatibility (83815) */ 1865748Sduboff #define CFG_DESCRFMT 0x00000100U /* sis7016 */ 1875748Sduboff #define CFG_REQALG 0x00000080U /* PCI Bus request algorithm */ 1885748Sduboff #define CFG_SB 0x00000040U /* Single backoff */ 1895748Sduboff #define CFG_POW 0x00000020U /* Program out of window timer */ 1905748Sduboff #define CFG_EXD 0x00000010U /* Excessive deferral timer disable */ 1915748Sduboff #define CFG_PESEL 0x00000008U /* Parity error detection action */ 1925748Sduboff #define CFG_BROM_DIS 0x00000004U /* BootRom disable (83815) */ 1935748Sduboff #define CFG_BEM 0x00000001U /* Big endian mode */ 1945748Sduboff 1955748Sduboff #define CFG_BITS_DP83815 \ 1965748Sduboff "\020" \ 1975748Sduboff "\040CFG_LNKSTS" \ 1985748Sduboff "\037SPEED100" \ 1995748Sduboff "\036FDUP" \ 2005748Sduboff "\035POL" \ 2015748Sduboff "\034ANEG_DN" \ 2025748Sduboff "\022PINT_ACEN" \ 2035748Sduboff "\021PAUSE_ADV" \ 2045748Sduboff "\015EXT_PHY" \ 2055748Sduboff "\013PHY_RST" \ 2065748Sduboff "\012PHY_DIS" \ 2075748Sduboff "\011EUPHCOMP" \ 2085748Sduboff "\010REQALG" \ 2095748Sduboff "\007SB" \ 2105748Sduboff "\006POW" \ 2115748Sduboff "\005EXD" \ 2125748Sduboff "\004PESEL" \ 2135748Sduboff "\003BROM_DIS" \ 2145748Sduboff "\001BEM" 2155748Sduboff 2165748Sduboff #define CFG_BITS_SIS900 \ 2175748Sduboff "\020" \ 2185748Sduboff "\016EDB_EN" \ 2195748Sduboff "\013RND_CNT" \ 2205748Sduboff "\010REQALG" \ 2215748Sduboff "\007SB" \ 2225748Sduboff "\006POW" \ 2235748Sduboff "\005EXD" \ 2245748Sduboff "\004PESEL" \ 2255748Sduboff "\001BEM" 2265748Sduboff 2275748Sduboff /* Serial EEPROM access register */ 2285748Sduboff #define EROMAR_EECS 0x00000008U /* EEPROM chip select */ 2295748Sduboff #define EROMAR_EESK 0x00000004U /* EEPROM serial clock */ 2305748Sduboff #define EROMAR_EEDO 0x00000002U /* EEPROM data out */ 2315748Sduboff #define EROMAR_EEDO_SHIFT 1 2325748Sduboff #define EROMAR_EEDI 0x00000001U /* EEPROM data in + */ 2335748Sduboff #define EROMAR_EEDI_SHIFT 0 2345748Sduboff #define EROMAR_EEREQ 0x00000400U /* for sis963 eeprom mamagement */ 2355748Sduboff #define EROMAR_EEDONE 0x00000200U /* for sis963 eeprom mamagement */ 2365748Sduboff #define EROMAR_EEGNT 0x00000100U /* for sis963 eeprom mamagement */ 2375748Sduboff 2385748Sduboff #define MEAR_MDC 0x00000040U 2395748Sduboff #define MEAR_MDDIR 0x00000020U 2405748Sduboff #define MEAR_MDIO 0x00000010U 2415748Sduboff #define MEAR_MDIO_SHIFT 4 2425748Sduboff 2435748Sduboff /* PCI Test Control register */ 2445748Sduboff #define DISCARD_TEST 0x40000000U /* Discard timer test mode */ 2455748Sduboff 2465748Sduboff /* Interrupt status register */ 2475748Sduboff #define ISR_WAKEEVT 0x10000000U /* sis900 */ 2485748Sduboff #define ISR_PAUSE_END 0x08000000U /* sis900 */ 2495748Sduboff #define ISR_PAUSE_ST 0x04000000U /* sis900 */ 2505748Sduboff #define ISR_TXRCMP 0x02000000U 2515748Sduboff #define ISR_RXRCMP 0x01000000U 2525748Sduboff #define ISR_DPERR 0x00800000U /* Detected parity error */ 2535748Sduboff #define ISR_SSERR 0x00400000U /* Signaled system error */ 2545748Sduboff #define ISR_RMABT 0x00200000U /* Received master abort */ 2555748Sduboff #define ISR_RTABT 0x00100000U /* Received target abort */ 2565748Sduboff #define ISR_RXSOVR 0x00010000U /* Received status FIFO overrun */ 2575748Sduboff #define ISR_HIBERR 0x00008000U 2585748Sduboff #define ISR_SWI 0x00001000U 2595748Sduboff #define ISR_TXURN 0x00000400U 2605748Sduboff #define ISR_TXIDLE 0x00000200U 2615748Sduboff #define ISR_TXERR 0x00000100U 2625748Sduboff #define ISR_TXDESC 0x00000080U 2635748Sduboff #define ISR_TXOK 0x00000040U 2645748Sduboff #define ISR_RXORN 0x00000020U 2655748Sduboff #define ISR_RXIDLE 0x00000010U 2665748Sduboff #define ISR_RXEARLY 0x00000008U 2675748Sduboff #define ISR_RXERR 0x00000004U 2685748Sduboff #define ISR_RXDESC 0x00000002U 2695748Sduboff #define ISR_RXOK 0x00000001U 2705748Sduboff 2715748Sduboff #define INTR_BITS \ 2725748Sduboff "\020" \ 2735748Sduboff "\035WakeEvt" \ 2745748Sduboff "\034PauseEnd" \ 2755748Sduboff "\033PauseST" \ 2765748Sduboff "\032TXRCMP" \ 2775748Sduboff "\031RXRCMP" \ 2785748Sduboff "\030DPErr" \ 2795748Sduboff "\027SSErr" \ 2805748Sduboff "\026RMAbt" \ 2815748Sduboff "\025RTAbt" \ 2825748Sduboff "\021RxSOVR" \ 2835748Sduboff "\020HIBErr" \ 2845748Sduboff "\015SWI" \ 2855748Sduboff "\013TxUrn" \ 2865748Sduboff "\012TxIdle" \ 2875748Sduboff "\011TxErr" \ 2885748Sduboff "\010TxDesc" \ 2895748Sduboff "\007TxOk" \ 2905748Sduboff "\006RxORN" \ 2915748Sduboff "\005RxIdle" \ 2925748Sduboff "\004RxEarly" \ 2935748Sduboff "\003RxErr" \ 2945748Sduboff "\002RxDesc" \ 2955748Sduboff "\001RxOk" 2965748Sduboff 2975748Sduboff 2985748Sduboff /* Interrupt enable reigster */ 2995748Sduboff #define IER_IE 0x00000001 /* Interrupt enable */ 3005748Sduboff 3015748Sduboff /* Enhanced PHY acces register */ 3025748Sduboff #define ENPHY_DATA 0xffff0000U /* data */ 3035748Sduboff #define ENPHY_DATA_SHIFT 16 3045748Sduboff #define ENPHY_ADDR 0x0000f800U /* phy address */ 3055748Sduboff #define ENPHY_ADDR_SHIFT 11 3065748Sduboff #define ENPHY_OFFSET 0x000007c0U /* offset */ 3075748Sduboff #define ENPHY_OFFSET_SHIFT 6 3085748Sduboff #define ENPHY_RDCMD 0x00000020U /* read */ 3095748Sduboff #define ENPHY_ACCESS 0x00000010U /* busy */ 3105748Sduboff 3115748Sduboff 3125748Sduboff /* Transmit configuration register */ 3135748Sduboff #define TXCFG_CSI 0x80000000U /* carrier sense ignore */ 3145748Sduboff #define TXCFG_HBI 0x40000000U /* heart beat ignore */ 3155748Sduboff #define TXCFG_MLB 0x20000000U /* MAC loop back */ 3165748Sduboff #define TXCFG_ATP 0x10000000U /* Automatic transmit padding */ 3175748Sduboff #define TXCFG_MXDMA 0x00700000U /* max dma burst size */ 3185748Sduboff #define TXCFG_MXDMA_SHIFT 20 3195748Sduboff #define TXCFG_MXDMA_512 (0U << TXCFG_MXDMA_SHIFT) 3205748Sduboff #define TXCFG_MXDMA_4 (1U << TXCFG_MXDMA_SHIFT) 3215748Sduboff #define TXCFG_MXDMA_8 (2U << TXCFG_MXDMA_SHIFT) 3225748Sduboff #define TXCFG_MXDMA_16 (3U << TXCFG_MXDMA_SHIFT) 3235748Sduboff #define TXCFG_MXDMA_32 (4U << TXCFG_MXDMA_SHIFT) 3245748Sduboff #define TXCFG_MXDMA_64 (5U << TXCFG_MXDMA_SHIFT) 3255748Sduboff #define TXCFG_MXDMA_128 (6U << TXCFG_MXDMA_SHIFT) 3265748Sduboff #define TXCFG_MXDMA_256 (7U << TXCFG_MXDMA_SHIFT) 3275748Sduboff #define TXCFG_FLTH 0x00003f00U /* Tx fill threshold */ 3285748Sduboff #define TXCFG_FLTH_SHIFT 8 3295748Sduboff #define TXCFG_DRTH 0x0000003fU /* Tx drain threshold */ 3305748Sduboff 3315748Sduboff #define TXFIFOSIZE 2048U 3325748Sduboff #define TXCFG_FIFO_UNIT 32U 3335748Sduboff 3345748Sduboff #define TXCFG_BITS "\020\040CSI\037HBI\036MLB\035ATP" 3355748Sduboff 3365748Sduboff /* RXCFG:43 Reveive configuration register */ 3375748Sduboff #define RXCFG_AEP 0x80000000U /* accept error packets */ 3385748Sduboff #define RXCFG_ARP 0x40000000U /* accept runt packets */ 3395748Sduboff #define RXCFG_ATX 0x10000000U /* accept transmit packets */ 3405748Sduboff #define RXCFG_AJAB 0x08000000U /* accept jabber packets */ 3415748Sduboff #define RXCFG_ALP_DP83815 0x08000000U /* accept long pakets */ 3425748Sduboff #define RXCFG_MXDMA 0x00700000U /* max dma burst size */ 3435748Sduboff #define RXCFG_MXDMA_SHIFT (20) 3445748Sduboff #define RXCFG_MXDMA_512 (0U << RXCFG_MXDMA_SHIFT) 3455748Sduboff #define RXCFG_MXDMA_4 (1U << RXCFG_MXDMA_SHIFT) 3465748Sduboff #define RXCFG_MXDMA_8 (2U << RXCFG_MXDMA_SHIFT) 3475748Sduboff #define RXCFG_MXDMA_16 (3U << RXCFG_MXDMA_SHIFT) 3485748Sduboff #define RXCFG_MXDMA_32 (4U << RXCFG_MXDMA_SHIFT) 3495748Sduboff #define RXCFG_MXDMA_64 (5U << RXCFG_MXDMA_SHIFT) 3505748Sduboff #define RXCFG_MXDMA_128 (6U << RXCFG_MXDMA_SHIFT) 3515748Sduboff #define RXCFG_MXDMA_256 (7U << RXCFG_MXDMA_SHIFT) 3525748Sduboff #define RXCFG_DRTH 0x0000003eU /* Rx drain threshold */ 3535748Sduboff #define RXCFG_DRTH_SHIFT 1 3545748Sduboff 3555748Sduboff #define RXFIFOSIZE 2048U 3565748Sduboff #define RXCFG_FIFO_UNIT 8U 3575748Sduboff 3585748Sduboff #define RXCFG_BITS "\020\040AEP\037ARP\035ATX\034AJAB" 3595748Sduboff 3605748Sduboff 3615748Sduboff /* FLWCRL:0x38 Flow Control register */ 3625748Sduboff #define FLOWCTL_PAUSE 0x00000002U /* PAUSE flag */ 3635748Sduboff #define FLOWCTL_FLOWEN 0x00000001U /* flow control enable */ 3645748Sduboff 3655748Sduboff #define FLOWCTL_BITS "\020\002PAUSE\001FLOWEN" 3665748Sduboff 3675748Sduboff /* CCSR:0x3c Clock run Control status register */ 3685748Sduboff #define CCSR_PMESTS 0x00008000U 3695748Sduboff #define CCSR_PMEEN 0x00000100U 3705748Sduboff #define CCSR_CLKRUN_EN 0x00000001U 3715748Sduboff 3725748Sduboff /* PCR:0x44 Pause control/status register (DP83815) */ 3735748Sduboff #define PCR_PSEN 0x80000000U /* Pause Enable */ 3745748Sduboff #define PCR_PS_MCAST 0x40000000U /* Pause on multicast */ 3755748Sduboff #define PCR_PS_DA 0x20000000U /* Pause on DA */ 3765748Sduboff #define PCR_PS_ACT 0x00800000U /* Pause active */ 3775748Sduboff #define PCR_PS_RCVD 0x00400000U /* Pause frame receved */ 3785748Sduboff #define PCR_PSNEG 0x00200000U /* Pause negotiated */ 3795748Sduboff #define PCR_MLD_EN 0x00010000U /* Manual load enable */ 3805748Sduboff #define PCR_PAUSE_CNT 0x0000ffffU /* Pause counter value */ 3815748Sduboff 3825748Sduboff #define PCR_BITS \ 3835748Sduboff "\020" \ 3845748Sduboff "\040PCR_PSEN" \ 3855748Sduboff "\037PCR_PS_MCAST" \ 3865748Sduboff "\036PCR_PS_DA" \ 3875748Sduboff "\030PCR_PS_ACT" \ 3885748Sduboff "\027PCR_PS_RCVD" \ 3895748Sduboff "\026PCR_PSNEG" \ 3905748Sduboff "\021PCR_MLD_EN" 3915748Sduboff 3925748Sduboff /* RFCR:0x48 Receive filter control register */ 3935748Sduboff #define RFCR_RFEN 0x80000000U /* receive filter enable */ 3945748Sduboff #define RFCR_AAB 0x40000000U /* accept all broadcast */ 3955748Sduboff #define RFCR_AAM 0x20000000U /* accept all multicast */ 3965748Sduboff #define RFCR_AAP 0x10000000U /* accept all physical */ 3975748Sduboff #define RFCR_APM_DP83815 0x08000000U /* accept perfect match */ 3985748Sduboff #define RFCR_APAT_DP83815 0x07800000U /* accept on pattern match */ 3995748Sduboff #define RFCR_APAT_SHIFT 23 /* pattern match base */ 4005748Sduboff #define RFCR_AARP_DP83815 0x00400000U /* accept arp packets */ 4015748Sduboff #define RFCR_MHEN_DP83815 0x00200000U /* multicast hash enable */ 4025748Sduboff #define RFCR_UHEN_DP83815 0x00100000U /* unicast hash enable */ 4035748Sduboff #define RFCR_ULM_DP83815 0x00080000U /* U/L bit mask */ 4045748Sduboff #define RFCR_RFADDR_SIS900 0x000f0000U /* receive filter address */ 4055748Sduboff #define RFCR_RFADDR_SHIFT_SIS900 16 4065748Sduboff #define RFCR_RFADDR_DP83815 0x000003ffU 4075748Sduboff #define RFCR_RFADDR_SHIFT_DP83815 0 4085748Sduboff 4095748Sduboff /* Receive filter offset */ 4105748Sduboff #define RFADDR_MAC_SIS900 0U 4115748Sduboff #define RFADDR_MULTICAST_SIS900 4U 4125748Sduboff 4135748Sduboff #define RFADDR_MAC_DP83815 0x000U 4145748Sduboff #define RFADDR_PCOUNT01_DP83815 0x006U 4155748Sduboff #define RFADDR_PCOUNT23_DP83815 0x008U 4165748Sduboff #define RFADDR_MULTICAST_DP83815 0x200U 4175748Sduboff #define RFADDR_PMATCH0_DP83815 0x280U 4185748Sduboff #define RFADDR_PMATCH1_DP83815 0x282U 4195748Sduboff #define RFADDR_PMATCH2_DP83815 0x300U 4205748Sduboff #define RFADDR_PMATCH3_DP83815 0x302U 4215748Sduboff 4225748Sduboff /* Receive filter data register */ 4235748Sduboff 4245748Sduboff /* dp83815 Silicon revision register */ 4255748Sduboff #define SRR_REV 0x0000ffffU 426*7116Sduboff #define SRR_REV_DP83815CVNG 0x0302U 427*7116Sduboff #define SRR_REV_DP83815DVNG 0x0403U 428*7116Sduboff #define SRR_REV_DP83816AVNG 0x0505U 4295748Sduboff 4305748Sduboff /* sis900 revisions */ 4315748Sduboff #define SIS630A_900_REV 0x80 4325748Sduboff #define SIS630E_900_REV 0x81 4335748Sduboff #define SIS630S_900_REV 0x82 4345748Sduboff #define SIS630EA1_900_REV 0x83 4355748Sduboff #define SIS630ET_900_REV 0x84 4365748Sduboff #define SIS635A_900_REV 0x90 4375748Sduboff #define SIS962_900_REV 0X91 4385748Sduboff #define SIS900B_900_REV 0x03 4395748Sduboff 4405748Sduboff #define SIS630A0 0x00 4415748Sduboff #define SIS630A1 0x01 4425748Sduboff #define SIS630B0 0x10 4435748Sduboff #define SIS630B1 0x11 4445748Sduboff 4455748Sduboff 4465748Sduboff #endif /* _SFEREG_H_ */ 447