Home | History | Annotate | Line # | Download | only in ep93xx
epevar.h revision 1.2.10.1
      1  1.2.10.1  yamt /*      $NetBSD: epevar.h,v 1.2.10.1 2007/09/03 14:23:17 yamt Exp $        */
      2       1.1  joff /*-
      3       1.1  joff  * Copyright (c) 2004 Jesse Off
      4       1.1  joff  * All rights reserved
      5       1.1  joff  *
      6       1.1  joff  * Redistribution and use in source and binary forms, with or without
      7       1.1  joff  * modification, are permitted provided that the following conditions
      8       1.1  joff  * are met:
      9       1.1  joff  * 1. Redistributions of source code must retain the above copyright
     10       1.1  joff  *    notice, this list of conditions and the following disclaimer.
     11       1.1  joff  * 2. Redistributions in binary form must reproduce the above copyright
     12       1.1  joff  *    notice, this list of conditions and the following disclaimer in the
     13       1.1  joff  *    documentation and/or other materials provided with the distribution.
     14       1.1  joff  * 3. All advertising materials mentioning features or use of this software
     15       1.1  joff  *    must display the following acknowledgement:
     16       1.1  joff  *      This product includes software developed by the NetBSD
     17       1.1  joff  *      Foundation, Inc. and its contributors.
     18       1.1  joff  * 4. Neither the name of The NetBSD Foundation nor the names of its
     19       1.1  joff  *    contributors may be used to endorse or promote products derived
     20       1.1  joff  *    from this software without specific prior written permission.
     21       1.1  joff  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22       1.1  joff  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23       1.1  joff  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24       1.1  joff  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25       1.1  joff  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26       1.1  joff  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27       1.1  joff  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28       1.1  joff  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29       1.1  joff  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30       1.1  joff  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31       1.1  joff  * SUCH DAMAGE.
     32       1.1  joff  *
     33       1.1  joff  */
     34       1.1  joff 
     35       1.1  joff #ifndef _EPEVAR_H_
     36       1.1  joff #define _EPEVAR_H_
     37       1.1  joff 
     38       1.1  joff #define TX_QLEN	16
     39       1.1  joff #define RX_QLEN 64
     40       1.1  joff 
     41       1.1  joff struct epe_qmeta {
     42       1.1  joff 	struct mbuf 	*m;
     43       1.1  joff 	bus_dmamap_t	m_dmamap;
     44       1.1  joff };
     45       1.1  joff 
     46       1.1  joff struct epe_softc {
     47       1.1  joff 	struct device		sc_dev;
     48       1.1  joff 	bus_space_tag_t		sc_iot;
     49       1.1  joff 	bus_space_handle_t	sc_ioh;
     50       1.1  joff 	bus_dma_tag_t		sc_dmat;
     51       1.1  joff 	int			sc_intr;
     52       1.1  joff 	u_int8_t		sc_enaddr[ETHER_ADDR_LEN];
     53       1.1  joff 	struct ethercom		sc_ec;
     54       1.1  joff 	mii_data_t		sc_mii;
     55  1.2.10.1  yamt 	void *			ctrlpage;
     56       1.2  joff 	bus_addr_t		ctrlpage_dsaddr;
     57       1.1  joff 	bus_dmamap_t		ctrlpage_dmamap;
     58       1.1  joff 	u_int32_t		*TXDQ;
     59       1.1  joff 	u_int32_t		TXDQ_avail;
     60       1.1  joff 	u_int32_t		*TXDQ_cur;
     61       1.1  joff 	u_int32_t		*TXStsQ;
     62       1.1  joff 	u_int32_t		*TXStsQ_cur;
     63       1.1  joff 	u_int32_t		*RXDQ;
     64       1.1  joff 	u_int32_t		*RXStsQ;
     65       1.1  joff 	u_int32_t		*RXStsQ_cur;
     66       1.1  joff 	struct epe_qmeta	rxq[RX_QLEN];
     67       1.1  joff 	struct epe_qmeta	txq[TX_QLEN];
     68       1.1  joff 	struct callout		epe_tick_ch;
     69       1.1  joff };
     70       1.1  joff 
     71       1.1  joff #endif /* _EPEVAR_H_ */
     72