/*
* Copyright 2001 Wasabi Systems, Inc.
* All rights reserved.
*
* Written by Simon Burge and Eduardo Horvath for Wasabi Systems, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for the NetBSD Project by
* Wasabi Systems, Inc.
* 4. The name of Wasabi Systems, Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#define EMAC_TMR0 0x08 /* Transmit Mode Register 0 */
#define TMR0_GNP0 0x80000000 /* Get New Packet for Channel 0 */
#define TMR0_GNP1 0x40000000 /* Get New Packet for Channel 1 */
#define TMR0_GNPD 0x20000000 /* Get New Packet for Dependent mode */
#define TMR0_FC_MASK 0x10000000 /* First Channel */
#define TMR0_FC_CHAN0 0x00000000 /* Channel 0 */
#define TMR0_FC_CHAN1 0x10000000 /* Channel 1 */
#define TMR0_TFAE_MASK 0x00000007 /* TX FIFO Almost Empty */
#define TMR0_TFAE_2 0x00000001 /* Number of used entries <= 2(32B) */
#define TMR0_TFAE_4 0x00000002 /* Number of used entries <= 4(64B) */
#define TMR0_TFAE_8 0x00000003 /* Number of used entries <= 8(128B) */
#define TMR0_TFAE_16 0x00000004 /* Number of used entries <= 16(256B) */
#define TMR0_TFAE_32 0x00000005 /* Number of used entries <= 32(512B) */
#define TMR0_TFAE_64 0x00000006 /* Number of used entries <= 64(1024B) */
#define TMR0_TFAE_128 0x00000007 /* Number of used entries <= 128(2048B) */
#define EMAC_RWMR 0x64 /* Receive Low/High Water Mark Register */
#define RWMR_RLWM_MASK 0xff800000 /* Receive Low Water Mark */
#define RWMR_RLWM_SHIFT 23
#define RWMR_RHWM_MASK 0x0000ff80 /* Receive High Water Mark */
#define RWMR_RHWM_SHIFT 7
#define EMAC_OCTX 0x68 /* Number of Octets Transmitted */
#define EMAC_OCRX 0x6c /* Number of Octets Received */
#define EMAC_IPCR 0x70 /* Internal PCS Configuration Register */
#define IPCR_OUI_MASK 0xfffffc00 /* OUI Value */
#define IPCR_OUI_SHIFT 10
#define IPCR_MMN_MASK 0x000003f0 /* Manufacture Model Number */
#define IPCR_MMN_SHIFT 4
#define IPCR_REVID_MASK 0x0000000f /* Revision Number */
#define IPCR_REVID_SHIFT 0