438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Copyright 2011 Jason King.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Copyright (c) 2000 Berkeley Software Design, Inc.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Copyright (c) 1997, 1998, 1999, 2000
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Redistribution and use in source and binary forms, with or without
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * modification, are permitted provided that the following conditions
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 1. Redistributions of source code must retain the above copyright
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * notice, this list of conditions and the following disclaimer.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 2. Redistributions in binary form must reproduce the above copyright
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * notice, this list of conditions and the following disclaimer in the
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * documentation and/or other materials provided with the distribution.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 3. All advertising materials mentioning features or use of this software
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * must display the following acknowledgement:
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * This product includes software developed by Bill Paul.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 4. Neither the name of the author nor the names of any co-contributors
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * may be used to endorse or promote products derived from this software
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * without specific prior written permission.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * THE POSSIBILITY OF SUCH DAMAGE.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 16-bit I/O map
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * To switch to 32-bit mode, write to RDP.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 32-bit I/O map
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * CSR registers
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\001INIT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\002START" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\003STOP" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\005TXON" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\006RXON" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\007INTEN" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\010INTR" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\011IDONE" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\012TINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\013RINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\014MERR" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\015MISS" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\016CERR" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Interrupt masks and deferral control (CSR3)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_IMR_ENMBA 0x0008 /* enable modified backoff alg */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_IMR_LAPPEN 0x0020 /* lookahead packet processing enb */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_IMR_DXSUFLO 0x0040 /* disable TX stop on underflow */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\003BSWAP" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\004ENMBA" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\005DXMT2PD" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\006LAPPEN" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\007DXSUFLO" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\010IDONE" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\011TINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\012RINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\013MERR" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Test and features control (CSR4)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_TFEAT_RXCCOFLOWM 0x0010 /* Rx collision counter oflow */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Extended control and interrupt 1 (CSR5)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_MPMODE 0x0002 /* magic packet mode */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_MPENB 0x0004 /* magic packet enable */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_MPINTEN 0x0008 /* magic packet interrupt enable */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_MPINT 0x0010 /* magic packet interrupt */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_MPPLBA 0x0020 /* magic packet phys. logical bcast */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_EXDEFEN 0x0040 /* excessive deferral interrupt enb. */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_EXDEF 0x0080 /* excessive deferral interrupt */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_SINTEN 0x0400 /* system interrupt enable */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_SINT 0x0800 /* system interrupt */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_LTINTEN 0x4000 /* last TX interrupt enb */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_EXTCTL1_TXOKINTD 0x8000 /* TX OK interrupt disable */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\001SPND" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\002MPMODE" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\003MPENB" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\004MPINTEN" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\005MPINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\006MPPLB" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\007EXDEFEN" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\010EXDEF" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\013SINTEN" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\014SINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\017LTINTEN" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\020TXOKINTD"
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * RX/TX descriptor len (CSR6)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Extended control and interrupt 2 (CSR7)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\001MIIPDTINTE" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\002MIIPDTINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\003MCCIINTTE" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\004MCCIINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\005MCCINTE" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\006MCCINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\007MAPINTE" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\010MAPINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\011MRTINTE" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\012MREINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\013STINTE" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\014STINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\015RXDPOLL" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\016RDMD" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\017RXFRTG" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\020FASTSPNDE"
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Mode (CSR15)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MODE_LOOP 0x0004 /* loopback enable */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\003LOOP" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\004TXCRCD" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\005FORCECOLL" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\006RETRYD" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\007INTLOOP" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\016RXVPAD" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\017RXNOBROAD" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\020PROMISC"
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King/* Settings for PCN_MODE_PORTSEL when ASEL (BCR2[1]) is 0 */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Chip ID values.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King/* CSR88-89: Chip ID masks */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Advanced feature control (CSR122)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * BCR (bus control) registers
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_BCR_MMRA 0x00 /* Master Mode Read Active */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_BCR_MMW 0x01 /* Master Mode Write Active */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Miscellaneous Configuration (BCR2)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MISC_TMAULOOP 1<<14 /* T-MAU Loopback packet enable. */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MISC_LEDPE 1<<12 /* LED Program Enable */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MISC_APROMWE 1<<8 /* Address PROM Write Enable */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MISC_INTLEVEL 1<<7 /* Interrupt level */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MISC_AWAKE 1<<2 /* Power saving mode select */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Full duplex control (BCR9)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_DUPLEX_FDEN 0x0001 /* Full-duplex enable */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_DUPLEX_AUI 0x0002 /* AUI full-duplex */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_DUPLEX_FDRPAD 0x0004 /* Full-duplex runt pkt accept dis. */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Burst and bus control register (BCR18)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * EEPROM control (BCR19)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Software style (BCR20)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_SSTYLE_APERREN 0x0400 /* advanced parity error checking */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * MII control and status (BCR32)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_MIILP 0x0002 /* MII internal loopback */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_XPHYSP 0x0008 /* external PHY speed */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_XPHYFD 0x0010 /* external PHY full duplex */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_XPHYANE 0x0020 /* external phy auto-neg enable */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_XPHYRST 0x0040 /* external PHY reset */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_DANAS 0x0080 /* disable auto-neg auto-setup */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_APDW 0x0700 /* auto-poll dwell time */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_APEP 0x0100 /* auto-poll external PHY */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_FMDC 0x3000 /* data clock speed */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_MIICTL_ANTST 0x8000 /* Manufacturing test */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * MII address register (BCR33)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King/* addresses of internal PHYs */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * MII data register (BCR34)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * PHY selection (BCR49) (HomePNA NIC only)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#endif /* _PCN_H */