1155093Smarius/* $NetBSD: am79900reg.h,v 1.8 2005/12/11 12:21:25 christos Exp $ */ 2155093Smarius 3155093Smarius/*- 4155093Smarius * Copyright (c) 1998 The NetBSD Foundation, Inc. 5155093Smarius * All rights reserved. 6155093Smarius * 7155093Smarius * This code is derived from software contributed to The NetBSD Foundation 8155093Smarius * by Charles M. Hannum. 9155093Smarius * 10155093Smarius * Redistribution and use in source and binary forms, with or without 11155093Smarius * modification, are permitted provided that the following conditions 12155093Smarius * are met: 13155093Smarius * 1. Redistributions of source code must retain the above copyright 14155093Smarius * notice, this list of conditions and the following disclaimer. 15155093Smarius * 2. Redistributions in binary form must reproduce the above copyright 16155093Smarius * notice, this list of conditions and the following disclaimer in the 17155093Smarius * documentation and/or other materials provided with the distribution. 18155093Smarius * 19155093Smarius * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20155093Smarius * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21155093Smarius * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22155093Smarius * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23155093Smarius * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24155093Smarius * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25155093Smarius * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26155093Smarius * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27155093Smarius * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28155093Smarius * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29155093Smarius * POSSIBILITY OF SUCH DAMAGE. 30155093Smarius */ 31155093Smarius 32155093Smarius/*- 33155093Smarius * Copyright (c) 1992, 1993 34155093Smarius * The Regents of the University of California. All rights reserved. 35155093Smarius * 36155093Smarius * This code is derived from software contributed to Berkeley by 37155093Smarius * Ralph Campbell and Rick Macklem. 38155093Smarius * 39155093Smarius * Redistribution and use in source and binary forms, with or without 40155093Smarius * modification, are permitted provided that the following conditions 41155093Smarius * are met: 42155093Smarius * 1. Redistributions of source code must retain the above copyright 43155093Smarius * notice, this list of conditions and the following disclaimer. 44155093Smarius * 2. Redistributions in binary form must reproduce the above copyright 45155093Smarius * notice, this list of conditions and the following disclaimer in the 46155093Smarius * documentation and/or other materials provided with the distribution. 47155093Smarius * 3. Neither the name of the University nor the names of its contributors 48155093Smarius * may be used to endorse or promote products derived from this software 49155093Smarius * without specific prior written permission. 50155093Smarius * 51155093Smarius * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 52155093Smarius * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 53155093Smarius * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 54155093Smarius * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 55155093Smarius * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 56155093Smarius * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 57155093Smarius * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 58155093Smarius * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 59155093Smarius * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 60155093Smarius * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 61155093Smarius * SUCH DAMAGE. 62155093Smarius * 63155093Smarius * @(#)if_lereg.h 8.1 (Berkeley) 6/10/93 64155093Smarius */ 65155093Smarius 66155093Smarius/* $FreeBSD: releng/11.0/sys/dev/le/am79900reg.h 263289 2014-03-18 01:40:25Z emaste $ */ 67155093Smarius 68155093Smarius#ifndef _DEV_LE_AM79900REG_H_ 69155093Smarius#define _DEV_LE_AM79900REG_H_ 70155093Smarius 71155093Smarius/* 72155093Smarius * Receive message descriptor 73155093Smarius */ 74155093Smariusstruct lermd { 75155093Smarius uint32_t rmd0; 76155093Smarius uint32_t rmd1; 77155093Smarius uint32_t rmd2; 78155093Smarius int32_t rmd3; 79155093Smarius}; 80155093Smarius 81155093Smarius/* 82155093Smarius * Transmit message descriptor 83155093Smarius */ 84155093Smariusstruct letmd { 85155093Smarius uint32_t tmd0; 86155093Smarius uint32_t tmd1; 87155093Smarius uint32_t tmd2; 88155093Smarius int32_t tmd3; 89155093Smarius}; 90155093Smarius 91155093Smarius/* 92155093Smarius * Initialization block 93155093Smarius */ 94155093Smariusstruct leinit { 95155093Smarius uint32_t init_mode; /* +0x0000 */ 96155093Smarius uint32_t init_padr[2]; /* +0x0002 */ 97155093Smarius uint16_t init_ladrf[4]; /* +0x0008 */ 98155093Smarius uint32_t init_rdra; /* +0x0010 */ 99155093Smarius uint32_t init_tdra; /* +0x0014 */ 100155093Smarius int32_t pad; /* Pad to 8 ints. */ 101155093Smarius}; 102155093Smarius 103155093Smarius/* Receive message descriptor 1 (rmd1_bits) */ 104155093Smarius#define LE_R1_OWN (1U << 31) /* LANCE owns the packet */ 105155093Smarius#define LE_R1_ERR (1U << 30) /* error summary */ 106155093Smarius#define LE_R1_FRAM (1U << 29) /* framing error */ 107155093Smarius#define LE_R1_OFLO (1U << 28) /* overflow error */ 108155093Smarius#define LE_R1_CRC (1U << 27) /* CRC error */ 109155093Smarius#define LE_R1_BUFF (1U << 26) /* buffer error */ 110155093Smarius#define LE_R1_STP (1U << 25) /* start of packet */ 111155093Smarius#define LE_R1_ENP (1U << 24) /* end of packet */ 112155093Smarius#define LE_R1_ONES (0xfU << 12) /* must be ones */ 113155093Smarius#define LE_R1_BCNT_MASK (0xfff) /* byte count mask */ 114155093Smarius 115155093Smarius#define LE_R1_BITS \ 116155093Smarius "\20\40OWN\37ERR\36FRAM\35OFLO\34CRC\33BUFF\32STP\31ENP" 117155093Smarius 118155093Smarius/* Transmit message descriptor 1 (tmd1_bits) */ 119155093Smarius#define LE_T1_OWN (1U << 31) /* LANCE owns the packet */ 120155093Smarius#define LE_T1_ERR (1U << 30) /* error summary */ 121155093Smarius#define LE_T1_ADD_FCS (1U << 29) /* add FCS (PCnet-PCI) */ 122155093Smarius#define LE_T1_NO_FCS (1U << 29) /* no FCS (ILACC) */ 123155093Smarius#define LE_T1_MORE (1U << 28) /* multiple collisions */ 124155093Smarius#define LE_T1_LTINT (1U << 28) /* transmit interrupt (if LTINTEN) */ 125155093Smarius#define LE_T1_ONE (1U << 27) /* single collision */ 126155093Smarius#define LE_T1_DEF (1U << 26) /* deferred transmit */ 127155093Smarius#define LE_T1_STP (1U << 25) /* start of packet */ 128155093Smarius#define LE_T1_ENP (1U << 24) /* end of packet */ 129155093Smarius#define LE_T1_ONES (0xfU << 12) /* must be ones */ 130155093Smarius#define LE_T1_BCNT_MASK (0xfff) /* byte count mask */ 131155093Smarius 132155093Smarius#define LE_T1_BITS \ 133155093Smarius "\20\40OWN\37ERR\36RES\35MORE\34ONE\33DEF\32STP\31ENP" 134155093Smarius 135155093Smarius/* Transmit message descriptor 3 (tmd3) */ 136155093Smarius#define LE_T2_BUFF (1U << 31) /* buffer error */ 137155093Smarius#define LE_T2_UFLO (1U << 30) /* underflow error */ 138155093Smarius#define LE_T2_EXDEF (1U << 29) /* excessive defferral */ 139155093Smarius#define LE_T2_LCOL (1U << 28) /* late collision */ 140155093Smarius#define LE_T2_LCAR (1U << 27) /* loss of carrier */ 141155093Smarius#define LE_T2_RTRY (1U << 26) /* retry error */ 142155093Smarius#if 0 143155093Smarius#define LE_T3_TDR_MASK 0x03ff /* time domain reflectometry counter */ 144155093Smarius#endif 145155093Smarius 146155093Smarius#define LE_T3_BITS \ 147155093Smarius "\12\40BUFF\37UFLO\35LCOL\34LCAR\33RTRY" 148155093Smarius 149155093Smarius#endif /* !_DEV_LE_AM7990REG_H_ */ 150