Home | History | Annotate | Line # | Download | only in ep93xx
epereg.h revision 1.1.2.1
      1  1.1.2.1  kent /*	$NetBSD: epereg.h,v 1.1.2.1 2005/04/29 11:28:03 kent Exp $ */
      2      1.1  joff 
      3      1.1  joff /*
      4      1.1  joff  * Copyright (c) 2004 Jesse Off
      5      1.1  joff  * All rights reserved.
      6      1.1  joff  *
      7      1.1  joff  * Redistribution and use in source and binary forms, with or without
      8      1.1  joff  * modification, are permitted provided that the following conditions
      9      1.1  joff  * are met:
     10      1.1  joff  * 1. Redistributions of source code must retain the above copyright
     11      1.1  joff  *    notice, this list of conditions and the following disclaimer.
     12      1.1  joff  * 2. Redistributions in binary form must reproduce the above copyright
     13      1.1  joff  *    notice, this list of conditions and the following disclaimer in the
     14      1.1  joff  *    documentation and/or other materials provided with the distribution.
     15      1.1  joff  * 3. All advertising materials mentioning features or use of this software
     16      1.1  joff  *    must display the following acknowledgement:
     17      1.1  joff  *	This product includes software developed by Ichiro FUKUHARA.
     18      1.1  joff  * 4. Neither the name of the author nor the names of any co-contributors
     19      1.1  joff  *    may be used to endorse or promote products derived from this software
     20      1.1  joff  *    without specific prior written permission.
     21      1.1  joff  *
     22      1.1  joff  * THIS SOFTWARE IS PROVIDED BY ICHIRO FUKUHARA AND CONTRIBUTORS ``AS IS''
     23      1.1  joff  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     24      1.1  joff  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     25      1.1  joff  * ARE DISCLAIMED.  IN NO EVENT SHALL ICHIRO FUKUHARA OR THE VOICES IN HIS
     26      1.1  joff  * HEAD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
     27      1.1  joff  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     28      1.1  joff  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     29      1.1  joff  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     30      1.1  joff  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     31      1.1  joff  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     32      1.1  joff  * THE POSSIBILITY OF SUCH DAMAGE.
     33      1.1  joff  */
     34      1.1  joff 
     35      1.1  joff #ifndef _EPEREG_H_
     36      1.1  joff #define _EPEREG_H_
     37      1.1  joff 
     38  1.1.2.1  kent #define EP93XX_AHB_EPE	0x00010000UL
     39      1.1  joff #define EPE_SIZE	0x000000f0UL
     40      1.1  joff #define EPE_RXCtl	0x00000000UL	/* Receiver Control */
     41      1.1  joff #define  RXCtl_IA0	0x00000001UL
     42      1.1  joff #define  RXCtl_IA1	0x00000002UL
     43      1.1  joff #define  RXCtl_IA2	0x00000004UL
     44      1.1  joff #define  RXCtl_IA3	0x00000008UL
     45      1.1  joff #define  RXCtl_IAHA	0x00000100UL
     46      1.1  joff #define  RXCtl_MA	0x00000200UL
     47      1.1  joff #define  RXCtl_BA	0x00000400UL
     48      1.1  joff #define  RXCtl_PA	0x00000800UL
     49      1.1  joff #define  RXCtl_RA	0x00001000UL
     50      1.1  joff #define  RXCtl_RCRCA	0x00002000UL
     51      1.1  joff #define  RXCtl_SRxON	0x00010000UL
     52      1.1  joff #define  RXCtl_BCRC	0x00020000UL
     53      1.1  joff #define  RXCtl_RxFCE0	0x00040000UL
     54      1.1  joff #define  RXCtl_RxFCE1	0x00080000UL
     55      1.1  joff #define  RXCtl_PauseA	0x00100000UL
     56      1.1  joff #define EPE_TXCtl	0x00000004UL	/* Transmitter Control */
     57      1.1  joff #define  TXCtl_STxON	0x00000001UL
     58      1.1  joff #define EPE_TestCtl	0x00000008UL	/* Test Control */
     59      1.1  joff #define  TestCtl_MFDX	0x00000040UL
     60      1.1  joff #define EPE_MIICmd	0x00000010UL	/* MII Command */
     61      1.1  joff #define  MIICmd_READ	0x00008000UL
     62      1.1  joff #define  MIICmd_WRITE	0x00004000UL
     63      1.1  joff #define EPE_MIIData	0x00000014UL	/* MII Data */
     64      1.1  joff #define EPE_MIISts	0x00000018UL	/* MII Status */
     65      1.1  joff #define MIISts_BUSY	0x00000001UL
     66      1.1  joff #define EPE_SelfCtl	0x00000020UL	/* Self Control */
     67      1.1  joff #define  SelfCtl_RESET	0x00000001UL
     68      1.1  joff #define  SelfCtl_PSPRS	0x00000100UL
     69      1.1  joff #define  SelfCtl_MDCDIV(x)	(((x) - 1) << 9)
     70      1.1  joff #define EPE_IntEn	0x00000024UL	/* Interrupt Enable */
     71      1.1  joff #define  IntEn_TSQIE	0x00000008UL
     72      1.1  joff #define  IntEn_REOFIE	0x00000004UL
     73  1.1.2.1  kent #define  IntEn_ECIE	0x02000000UL
     74      1.1  joff #define EPE_IntStsP	0x00000028UL	/* Interrupt Status Preserve */
     75      1.1  joff #define EPE_IntStsC	0x0000002cUL	/* Interrupt Status Clear */
     76      1.1  joff #define  IntSts_RxSQ	0x00000004UL
     77      1.1  joff #define  IntSts_TxSQ	0x00000008UL
     78      1.1  joff #define  IntSts_ECI	0x02000000UL
     79      1.1  joff #define  IntSts_MIII	0x00001000UL
     80      1.1  joff #define EPE_DiagAd	0x00000038UL	/* Diagnostic Address */
     81      1.1  joff #define EPE_DiagDa	0x0000003cUL	/* Diagnostic Data */
     82      1.1  joff #define EPE_GT		0x00000040UL	/* General Timer */
     83      1.1  joff #define EPE_FCT		0x00000044UL	/* Flow Control Timer */
     84      1.1  joff #define EPE_FCF		0x00000048UL	/* Flow Control Format */
     85      1.1  joff #define EPE_AFP		0x0000004cUL	/* Address Filter Pointer */
     86      1.1  joff #define EPE_IndAd	0x00000050UL	/* Individual Address */
     87      1.1  joff #define EPE_IndAd_SIZE	0x6
     88      1.1  joff #define EPE_HashTbl	0x00000050UL	/* Hash Table */
     89      1.1  joff #define EPE_HashTbl_SIZE	0x8
     90      1.1  joff #define EPE_GIIntSts	0x00000060UL	/* Global Interrupt Status */
     91      1.1  joff #define EPE_GIIntMsk	0x00000064UL	/* Global Interrupt Mask */
     92      1.1  joff #define  GIIntMsk_INT	0x00008000UL
     93      1.1  joff #define EPE_GIIntROSts	0x00000068UL	/* Global Interrupt Read-Only Status */
     94      1.1  joff #define EPE_GIIntFrc	0x0000006cUL	/* Global Interrupt Force */
     95      1.1  joff #define EPE_TXCollCnt	0x00000070UL	/* Transmit Collision Count */
     96      1.1  joff #define EPE_RXMissCnt	0x00000074UL	/* Receive Miss Count */
     97      1.1  joff #define EPE_RXRuntCnt	0x00000078UL	/* Receive Runt Count */
     98      1.1  joff #define EPE_BMCtl	0x00000080UL	/* Bus Master Control */
     99      1.1  joff #define  BMCtl_RxEn	0x00000001UL
    100      1.1  joff #define  BMCtl_TxEn	0x00000100UL
    101      1.1  joff #define EPE_BMSts	0x00000084UL	/* Bus Master Status */
    102      1.1  joff #define  BMSts_RxAct	0x00000080UL
    103      1.1  joff #define EPE_RXBCA	0x00000088UL	/* Receive Buffer Current Address */
    104      1.1  joff #define EPE_RXDQBAdd	0x00000090UL	/* Receive Descriptor Queue Base Addr */
    105      1.1  joff #define EPE_RXDQBLen	0x00000094UL	/* Receive Descriptor Queue Base Len */
    106      1.1  joff #define EPE_RXDQCurLen	0x00000096UL	/* Recv Descriptor Queue Current Len */
    107      1.1  joff #define EPE_RXDCurAdd	0x00000098UL	/* Recv Descriptor Current Address */
    108      1.1  joff #define EPE_RXDEnq	0x0000009cUL	/* Receive Descriptor Enqueue */
    109      1.1  joff #define EPE_RXStsQBAdd	0x000000a0UL	/* Receive Status Queue Base Address */
    110      1.1  joff #define EPE_RXStsQBLen	0x000000a4UL	/* Receive Status Queue Base Length */
    111      1.1  joff #define EPE_RXStsQCurLen	0x000000a6UL	/* Recv Sts Q Current Length */
    112      1.1  joff #define EPE_RXStsQCurAdd	0x000000a8UL	/* Recv Sts Q Current Address */
    113      1.1  joff #define EPE_RXStsEnq	0x000000acUL	/* Receive Status Enqueue */
    114      1.1  joff #define EPE_TXDQBAdd	0x000000b0UL	/* Transmit Descriptor Q Base Addr */
    115      1.1  joff #define EPE_TXDQBLen	0x000000b4UL	/* Transmit Descriptor Q Base Length */
    116      1.1  joff #define EPE_TXDQCurLen	0x000000b6UL	/* Transmit Descriptor Q Current Len */
    117      1.1  joff #define EPE_TXDQCurAdd	0x000000b8UL	/* Transmit Descriptor Q Current Addr */
    118      1.1  joff #define EPE_TXDEnq	0x000000bcUL	/* Transmit Descriptor Enqueue */
    119      1.1  joff #define EPE_TXStsQBAdd	0x000000c0UL	/* Transmit Status Queue Base Address */
    120      1.1  joff #define EPE_TXStsQBLen	0x000000c4UL	/* Transmit Status Queue Base Length */
    121      1.1  joff #define EPE_TXStsQCurLen	0x000000c6UL	/* Transmit Sts Q Current Len */
    122      1.1  joff #define EPE_TXStsQCurAdd	0x000000c8UL	/* Transmit Sts Q Current Adr */
    123      1.1  joff #define EPE_RXBufThrshld	0x000000d0UL	/* Receive Buffer Threshold */
    124      1.1  joff #define EPE_TXBufThrshld	0x000000d4UL	/* Transmit Buffer Threshold */
    125      1.1  joff #define EPE_RXStsThrshld	0x000000d8UL	/* Receive Status Threshold */
    126      1.1  joff #define EPE_TXStsThrshld	0x000000dcUL	/* Transmit Status Threshold */
    127      1.1  joff #define EPE_RXDThrshld	0x000000e0UL	/* Receive Descriptor Threshold */
    128      1.1  joff #define EPE_TXDThrshld	0x000000e4UL	/* Transmit Descriptor Threshold */
    129      1.1  joff #define EPE_MaxFrmLen	0x000000e8UL	/* Maximum Frame Length */
    130      1.1  joff #define EPE_RXHdrLen	0x000000ecUL	/* Receive Header Length */
    131      1.1  joff #define EPE_MACFIFO	0x00004000UL	/* FIFO RAM */
    132      1.1  joff #define EPE_MACFIFO_SIZE	0xc000UL
    133      1.1  joff 
    134      1.1  joff /* Receive Status Queue, First Word */
    135      1.1  joff #define RXStsQ_RFP	0x80000000UL
    136      1.1  joff #define RXStsQ_RWE	0x40000000UL
    137      1.1  joff #define RXStsQ_EOF	0x20000000UL
    138      1.1  joff #define RXStsQ_EOB	0x10000000UL
    139      1.1  joff #define RXStsQ_RX_Err	0x00200000UL
    140      1.1  joff #define RXStsQ_OE	0x00100000UL
    141      1.1  joff #define RXStsQ_FE	0x00080000UL
    142      1.1  joff #define RXStsQ_Runt	0x00040000UL
    143      1.1  joff #define RXStsQ_EData	0x00020000UL
    144      1.1  joff #define RXStsQ_CRCE	0x00010000UL
    145      1.1  joff #define RXStsQ_CRCI	0x00008000UL
    146      1.1  joff 
    147      1.1  joff /* Transmit Status Queue */
    148      1.1  joff #define TXStsQ_TxFP	0x80000000UL
    149      1.1  joff #define TXStsQ_TxWE	0x40000000UL
    150      1.1  joff #define TXStsQ_FA	0x20000000UL
    151      1.1  joff #define TXStsQ_LCRS	0x10000000UL
    152      1.1  joff #define TXStsQ_OW	0x04000000UL
    153      1.1  joff #define TXStsQ_TxU	0x02000000UL
    154      1.1  joff #define TXStsQ_EColl	0x01000000UL
    155      1.1  joff 
    156      1.1  joff #endif /* _EPEREG_H_ */
    157