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