Home | History | Annotate | Line # | Download | only in ic
am79900reg.h revision 1.6.8.1
      1  1.6.8.1      kent /*	$NetBSD: am79900reg.h,v 1.6.8.1 2005/04/29 11:28:48 kent Exp $	*/
      2      1.2   mycroft 
      3      1.2   mycroft /*-
      4      1.2   mycroft  * Copyright (c) 1998 The NetBSD Foundation, Inc.
      5      1.2   mycroft  * All rights reserved.
      6      1.2   mycroft  *
      7      1.2   mycroft  * This code is derived from software contributed to The NetBSD Foundation
      8      1.2   mycroft  * by Charles M. Hannum.
      9      1.2   mycroft  *
     10      1.2   mycroft  * Redistribution and use in source and binary forms, with or without
     11      1.2   mycroft  * modification, are permitted provided that the following conditions
     12      1.2   mycroft  * are met:
     13      1.2   mycroft  * 1. Redistributions of source code must retain the above copyright
     14      1.2   mycroft  *    notice, this list of conditions and the following disclaimer.
     15      1.2   mycroft  * 2. Redistributions in binary form must reproduce the above copyright
     16      1.2   mycroft  *    notice, this list of conditions and the following disclaimer in the
     17      1.2   mycroft  *    documentation and/or other materials provided with the distribution.
     18      1.2   mycroft  * 3. All advertising materials mentioning features or use of this software
     19      1.2   mycroft  *    must display the following acknowledgement:
     20      1.2   mycroft  *        This product includes software developed by the NetBSD
     21      1.2   mycroft  *        Foundation, Inc. and its contributors.
     22      1.2   mycroft  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23      1.2   mycroft  *    contributors may be used to endorse or promote products derived
     24      1.2   mycroft  *    from this software without specific prior written permission.
     25      1.2   mycroft  *
     26      1.2   mycroft  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27      1.2   mycroft  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28      1.2   mycroft  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29      1.2   mycroft  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30      1.2   mycroft  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31      1.2   mycroft  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32      1.2   mycroft  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33      1.2   mycroft  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34      1.2   mycroft  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35      1.2   mycroft  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36      1.2   mycroft  * POSSIBILITY OF SUCH DAMAGE.
     37      1.2   mycroft  */
     38      1.1  drochner 
     39      1.1  drochner /*-
     40      1.1  drochner  * Copyright (c) 1992, 1993
     41      1.1  drochner  *	The Regents of the University of California.  All rights reserved.
     42      1.1  drochner  *
     43      1.1  drochner  * This code is derived from software contributed to Berkeley by
     44      1.1  drochner  * Ralph Campbell and Rick Macklem.
     45      1.1  drochner  *
     46      1.1  drochner  * Redistribution and use in source and binary forms, with or without
     47      1.1  drochner  * modification, are permitted provided that the following conditions
     48      1.1  drochner  * are met:
     49      1.1  drochner  * 1. Redistributions of source code must retain the above copyright
     50      1.1  drochner  *    notice, this list of conditions and the following disclaimer.
     51      1.1  drochner  * 2. Redistributions in binary form must reproduce the above copyright
     52      1.1  drochner  *    notice, this list of conditions and the following disclaimer in the
     53      1.1  drochner  *    documentation and/or other materials provided with the distribution.
     54      1.5       agc  * 3. Neither the name of the University nor the names of its contributors
     55      1.1  drochner  *    may be used to endorse or promote products derived from this software
     56      1.1  drochner  *    without specific prior written permission.
     57      1.1  drochner  *
     58      1.1  drochner  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     59      1.1  drochner  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     60      1.1  drochner  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     61      1.1  drochner  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     62      1.1  drochner  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     63      1.1  drochner  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     64      1.1  drochner  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     65      1.1  drochner  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     66      1.1  drochner  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     67      1.1  drochner  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     68      1.1  drochner  * SUCH DAMAGE.
     69      1.1  drochner  *
     70      1.1  drochner  *	@(#)if_lereg.h	8.1 (Berkeley) 6/10/93
     71      1.1  drochner  */
     72      1.1  drochner 
     73      1.1  drochner /*
     74      1.1  drochner  * Receive message descriptor
     75      1.1  drochner  */
     76      1.1  drochner struct lermd {
     77      1.1  drochner 	u_int32_t rmd0;
     78      1.1  drochner 	u_int32_t rmd1;
     79      1.1  drochner 	u_int32_t rmd2;
     80      1.1  drochner 	int32_t rmd3;
     81      1.1  drochner };
     82      1.1  drochner 
     83      1.1  drochner /*
     84      1.1  drochner  * Transmit message descriptor
     85      1.1  drochner  */
     86      1.1  drochner struct letmd {
     87      1.1  drochner 	u_int32_t tmd0;
     88      1.1  drochner 	u_int32_t tmd1;
     89      1.1  drochner 	u_int32_t tmd2;
     90      1.1  drochner 	int32_t tmd3;
     91      1.1  drochner };
     92      1.1  drochner 
     93      1.1  drochner /*
     94      1.1  drochner  * Initialization block
     95      1.1  drochner  */
     96      1.1  drochner struct leinit {
     97      1.1  drochner 	u_int32_t init_mode;		/* +0x0000 */
     98      1.1  drochner 	u_int32_t init_padr[2];		/* +0x0002 */
     99      1.1  drochner 	u_int16_t init_ladrf[4];	/* +0x0008 */
    100      1.1  drochner 	u_int32_t init_rdra;		/* +0x0010 */
    101      1.1  drochner 	u_int32_t init_tdra;		/* +0x0014 */
    102      1.1  drochner 	int32_t	  pad;		/* Pad to 16 shorts */
    103      1.1  drochner };
    104      1.1  drochner 
    105  1.6.8.1      kent /* Receive message descriptor 1 (rmd1_bits) */
    106      1.1  drochner #define	LE_R1_OWN	(1<<31)		/* LANCE owns the packet */
    107      1.1  drochner #define	LE_R1_ERR	(1<<30)		/* error summary */
    108      1.1  drochner #define	LE_R1_FRAM	(1<<29)		/* framing error */
    109      1.1  drochner #define	LE_R1_OFLO	(1<<28)		/* overflow error */
    110      1.1  drochner #define	LE_R1_CRC	(1<<27)		/* CRC error */
    111      1.1  drochner #define	LE_R1_BUFF	(1<<26)		/* buffer error */
    112      1.1  drochner #define	LE_R1_STP	(1<<25)		/* start of packet */
    113      1.1  drochner #define	LE_R1_ENP	(1<<24)		/* end of packet */
    114      1.3   thorpej #define	LE_R1_ONES	(0xf<<12)	/* must be ones */
    115      1.4   thorpej #define	LE_R1_BCNT_MASK	(0xfff)		/* byte count mask */
    116      1.1  drochner 
    117      1.1  drochner #define	LE_R1_BITS \
    118      1.1  drochner     "\20\40OWN\37ERR\36FRAM\35OFLO\34CRC\33BUFF\32STP\31ENP"
    119      1.1  drochner 
    120  1.6.8.1      kent /* Transmit message descriptor 1 (tmd1_bits) */
    121      1.1  drochner #define	LE_T1_OWN	(1<<31)		/* LANCE owns the packet */
    122      1.1  drochner #define	LE_T1_ERR	(1<<30)		/* error summary */
    123      1.3   thorpej #define	LE_T1_ADD_FCS	(1<<29)		/* add FCS (PCnet-PCI) */
    124      1.3   thorpej #define	LE_T1_NO_FCS	(1<<29)		/* no FCS (ILACC) */
    125      1.1  drochner #define	LE_T1_MORE	(1<<28)		/* multiple collisions */
    126      1.3   thorpej #define	LE_T1_LTINT	(1<<28)		/* transmit interrupt (if LTINTEN) */
    127      1.1  drochner #define	LE_T1_ONE	(1<<27)		/* single collision */
    128      1.6       wiz #define	LE_T1_DEF	(1<<26)		/* deferred transmit */
    129      1.1  drochner #define	LE_T1_STP	(1<<25)		/* start of packet */
    130      1.1  drochner #define	LE_T1_ENP	(1<<24)		/* end of packet */
    131      1.3   thorpej #define	LE_T1_ONES	(0xf<<12)	/* must be ones */
    132      1.4   thorpej #define	LE_T1_BCNT_MASK	(0xfff)		/* byte count mask */
    133      1.1  drochner 
    134      1.1  drochner #define	LE_T1_BITS \
    135      1.1  drochner     "\20\40OWN\37ERR\36RES\35MORE\34ONE\33DEF\32STP\31ENP"
    136      1.1  drochner 
    137  1.6.8.1      kent /* Transmit message descriptor 3 (tmd3) */
    138      1.1  drochner #define	LE_T2_BUFF	(1<<31)		/* buffer error */
    139      1.1  drochner #define	LE_T2_UFLO	(1<<30)		/* underflow error */
    140      1.3   thorpej #define	LE_T2_EXDEF	(1<<29)		/* excessive defferral */
    141      1.1  drochner #define	LE_T2_LCOL	(1<<28)		/* late collision */
    142      1.1  drochner #define	LE_T2_LCAR	(1<<27)		/* loss of carrier */
    143      1.1  drochner #define	LE_T2_RTRY	(1<<26)		/* retry error */
    144      1.1  drochner #if 0
    145      1.1  drochner #define	LE_T3_TDR_MASK	0x03ff		/* time domain reflectometry counter */
    146      1.1  drochner #endif
    147      1.1  drochner 
    148      1.1  drochner #define	LE_T3_BITS \
    149      1.1  drochner     "\12\40BUFF\37UFLO\35LCOL\34LCAR\33RTRY"
    150