1 /* $NetBSD: if_gmreg.h,v 1.3 2000/06/15 19:09:15 tsubai Exp $ */ 2 3 /*- 4 * Copyright (c) 2000 Tsubai Masanari. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 struct gmac_dma { 30 u_int32_t cmd; 31 u_int32_t cmd_hi; 32 u_int32_t address; 33 u_int32_t address_hi; 34 }; 35 36 #define GMAC_OWN 0x80000000 37 #define GMAC_SOP 0x40000000 /* start of packet? */ 38 #define GMAC_LEN_MASK 0x00003fff 39 40 #define GMAC_INT_TXEMPTY 0x02 /* TX ring empty */ 41 #define GMAC_INT_TXDONE 0x04 42 #define GMAC_INT_RXDONE 0x10 43 44 #define GMAC_RXMAC_PR 0x08 /* enable promiscuous mode */ 45 #define GMAC_RXMAC_HEN 0x10 /* enable the hash filter */ 46 47 /* 48 * register offset 49 */ 50 #define GMAC_STATUS 0x000c 51 #define GMAC_INTMASK 0x0010 52 #define GMAC_SOFTWARERESET 0x1010 53 54 #define GMAC_TXDMAKICK 0x2000 55 #define GMAC_TXDMACONFIG 0x2004 56 #define GMAC_TXDMADESCBASELO 0x2008 57 #define GMAC_TXDMADESCBASEHI 0x200c 58 #define GMAC_TXDMACOMPLETE 0x2100 59 60 #define GMAC_RXDMACONFIG 0x4000 61 #define GMAC_RXDMADESCBASELO 0x4004 62 #define GMAC_RXDMADESCBASEHI 0x4008 63 #define GMAC_RXDMAKICK 0x4100 64 65 #define GMAC_MACPAUSE 0x6008 66 #define GMAC_MACPAUSE 0x6008 67 #define GMAC_TXMACSTATUS 0x6010 68 #define GMAC_TXMACCONFIG 0x6030 69 #define GMAC_RXMACCONFIG 0x6034 70 #define GMAC_MACCTRLCONFIG 0x6038 71 #define GMAC_XIFCONFIG 0x603c 72 #define GMAC_INTERPACKETGAP0 0x6040 73 #define GMAC_INTERPACKETGAP1 0x6044 74 #define GMAC_INTERPACKETGAP2 0x6048 75 #define GMAC_SLOTTIME 0x604c 76 #define GMAC_MINFRAMESIZE 0x6050 77 #define GMAC_MAXFRAMESIZE 0x6054 78 #define GMAC_PASIZE 0x6058 79 #define GMAC_JAMSIZE 0x605c 80 #define GMAC_ATTEMPTLIMIT 0x6060 /* atemptlimit */ 81 #define GMAC_MACCNTLTYPE 0x6064 82 #define GMAC_MACADDRESS0 0x6080 83 #define GMAC_MACADDRESS1 0x6084 84 #define GMAC_MACADDRESS2 0x6088 85 #define GMAC_MACADDRESS3 0x608c 86 #define GMAC_MACADDRESS4 0x6090 87 #define GMAC_MACADDRESS5 0x6094 88 #define GMAC_MACADDRESS6 0x6098 89 #define GMAC_MACADDRESS7 0x609c 90 #define GMAC_MACADDRESS8 0x60a0 91 #define GMAC_MACADDRFILT0 0x60a4 92 #define GMAC_MACADDRFILT1 0x60a8 93 #define GMAC_MACADDRFILT2 0x60ac 94 #define GMAC_MACADDRFILT2_1MASK 0x60b0 /* macaddressfilter2&1mask */ 95 #define GMAC_MACADDRFILT0MASK 0x60b4 /* macaddressfilter0mask */ 96 #define GMAC_HASHTABLE0 0x60c0 97 98 #define GMAC_RANDOMSEED 0x6130 99 #define GMAC_MIFFRAMEOUTPUT 0x620c 100 #define GMAC_DATAPATHMODE 0x9050 101