/* $NetBSD: mb8795reg.h,v 1.5 2023/06/10 17:14:57 dbj Exp $ */
/*
* Copyright (c) 1998 Darrin B. Jewell
* All rights reserved.
*
* 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.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
*/
/*
* Fujitsu Ethernet Data Link Controller (MB8795)
* and the Fujitsu Manchester Encoder/Decoder (MB502).
*/
#define MB8795_TXMASK_READYIE 0x80 /* tx int on packet ready */
#define MB8795_TXMASK_TXRXIE 0x20 /* tx int on transmit rec'd */
#define MB8795_TXMASK_UNDERFLOWIE 0x08 /* tx int on underflow */
#define MB8795_TXMASK_COLLIE 0x04 /* tx int on collision */
#define MB8795_TXMASK_COLL16IE 0x02 /* tx int on 16th collision */
#define MB8795_TXMASK_PARERRIE 0x01 /* tx int on parity error */
#define MB8795_RXMASK_OKIE 0x80 /* rx int on packet ok */
#define MB8795_RXMASK_RESETIE 0x10 /* rx int on reset packet */
#define MB8795_RXMASK_SHORTIE 0x08 /* rx int on short packet */
#define MB8795_RXMASK_ALIGNERRIE 0x04 /* rx int on align error */
#define MB8795_RXMASK_CRCERRIE 0x02 /* rx int on CRC error */
#define MB8795_RXMASK_OVERFLOWIE 0x01 /* rx int on overflow error */
#define MB8795_RXMODE_TEST 0x80 /* Must be zero for normal op */
#define MB8795_RXMODE_ADDRSIZE 0x10 /* reduces NODE match to 5 chars */
#define MB8795_RXMODE_SHORTENABLE 0x08 /* rx packets >= 10 bytes */
#define MB8795_RXMODE_RESETENABLE 0x04 /* must be zero */
#define MB8795_RXMODE_PROMISCUOUS 0x03 /* accept all packets */
#define MB8795_RXMODE_MULTICAST 0x02 /* accept broad/multicasts */
#define MB8795_RXMODE_NORMAL 0x01 /* accept broad/limited multicasts */
#define MB8795_RXMODE_OFF 0x00 /* accept no packets */
/* this define is less useful for the promiscuous bits, bit I leave it here */
#define MB8795_RXMODE_BITS \
"\20\10TEST\05ADDRSIZE\04SHORTENABLE\03RESETENABLE\02MULTICAST\01NORMAL"