Home | History | Annotate | Line # | Download | only in isa
      1  1.1  chopps /*	$NetBSD: if_ntwoc_isareg.h,v 1.1 2000/01/04 06:29:21 chopps Exp $ */
      2  1.1  chopps 
      3  1.1  chopps /*
      4  1.1  chopps  * Copyright (c) 1995 John Hay.
      5  1.1  chopps  * Copyright (c) 1996 SDL Communications, Inc.
      6  1.1  chopps  * All rights reserved.
      7  1.1  chopps  *
      8  1.1  chopps  * Redistribution and use in source and binary forms, with or without
      9  1.1  chopps  * modification, are permitted provided that the following conditions
     10  1.1  chopps  * are met:
     11  1.1  chopps  * 1. Redistributions of source code must retain the above copyright
     12  1.1  chopps  *    notice, this list of conditions and the following disclaimer.
     13  1.1  chopps  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.1  chopps  *    notice, this list of conditions and the following disclaimer in the
     15  1.1  chopps  *    documentation and/or other materials provided with the distribution.
     16  1.1  chopps  * 3. Neither the name of the author nor the names of any co-contributors
     17  1.1  chopps  *    may be used to endorse or promote products derived from this software
     18  1.1  chopps  *    without specific prior written permission.
     19  1.1  chopps  *
     20  1.1  chopps  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     21  1.1  chopps  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     22  1.1  chopps  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     23  1.1  chopps  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     24  1.1  chopps  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     25  1.1  chopps  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     26  1.1  chopps  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     27  1.1  chopps  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     28  1.1  chopps  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     29  1.1  chopps  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     30  1.1  chopps  * SUCH DAMAGE.
     31  1.1  chopps  *
     32  1.1  chopps  * $Id: if_ntwoc_isareg.h,v 1.1 2000/01/04 06:29:21 chopps Exp $
     33  1.1  chopps  */
     34  1.1  chopps #ifndef _IF_NTWOC_ISAREG_H_
     35  1.1  chopps #define _IF_NTWOC_ISAREG_H_
     36  1.1  chopps 
     37  1.1  chopps #define NTWOC_ISA_NCHAN		2    /* A HD64570 chip have 2 channels */
     38  1.1  chopps 
     39  1.1  chopps #define NTWOC_BUF_SIZ		512
     40  1.1  chopps #define NTWOC_TX_BLOCKS		2    /* Sepperate sets of tx buffers */
     41  1.1  chopps 
     42  1.1  chopps #define NTWOC_CRD_N2		1
     43  1.1  chopps 
     44  1.1  chopps /*
     45  1.1  chopps  * RISCom/N2 ISA card.
     46  1.1  chopps  */
     47  1.1  chopps #define NTWOC_SRC_IOPORT_SIZE	0x08	/* also uses 0x8400 -> 0xAxxx */
     48  1.1  chopps 
     49  1.1  chopps /* config flags are as follows */
     50  1.1  chopps /*
     51  1.1  chopps  * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
     52  1.1  chopps  * +-------------+ +-----+ +-----+ + +---+ +-+     + +---+ +-+   +
     53  1.1  chopps  *       tmc         tdiv    rdiv  e1 rxs1 ts1    e0 rxs0  txs0  nports - 1
     54  1.1  chopps  */
     55  1.1  chopps #define	NTWOC_FLAGS_NPORT_MASK	0x00000001	/* nports - 1 */
     56  1.1  chopps #define	NTWOC_FLAGS_CLK0_MASK	0x000000fc	/* port 0 clock info mask */
     57  1.1  chopps #define	NTWOC_FLAGS_CLK1_MASK	0x0000fc00	/* port 1 clock info mask */
     58  1.1  chopps #define	NTWOC_FLAGS_RXDIV_MASK	0x000F0000	/* rx div mask */
     59  1.1  chopps #define	NTWOC_FLAGS_TXDIV_MASK	0x00F00000	/* tx div mask */
     60  1.1  chopps #define	NTWOC_FLAGS_TMC_MASK	0xFF000000	/* tmc port 0 mask */
     61  1.1  chopps 
     62  1.1  chopps #define	NTWOC_FLAGS_CLK1_SHIFT	8
     63  1.1  chopps 
     64  1.1  chopps /* these are used after you shift down to the clock byte for the resp. port */
     65  1.1  chopps #define	NTWOC_FLAGS_TXS_SHIFT		2
     66  1.1  chopps #define	NTWOC_FLAGS_TXS_MASK	0x0000000c	/* port 0 tx clk source mask */
     67  1.1  chopps #define	NTWOC_FLAGS_TXS_LINE		0	/* use the line clock */
     68  1.1  chopps #define	NTWOC_FLAGS_TXS_INTERNAL	1	/* use the internal clock */
     69  1.1  chopps #define	NTWOC_FLAGS_TXS_RXCLOCK		2	/* use the receive clock */
     70  1.1  chopps 
     71  1.1  chopps #define	NTWOC_FLAGS_RXS_SHIFT		4
     72  1.1  chopps #define	NTWOC_FLAGS_RXS_MASK	0x00000070	/* port 0 rx clk source mask */
     73  1.1  chopps #define	NTWOC_FLAGS_RXS_LINE		0	/* use the line clock */
     74  1.1  chopps #define NTWOC_FLAGS_RXS_LINE_SN		1	/* use line with noise supp. */
     75  1.1  chopps #define NTWOC_FLAGS_RXS_INTERNAL	2	/* use internal clock */
     76  1.1  chopps #define NTWOC_FLAGS_RXS_ADPLL_OUT	3	/* use brg out for adpll clk */
     77  1.1  chopps #define NTWOC_FLAGS_RXS_ADPLL_IN	4	/* use line in for adpll clk */
     78  1.1  chopps 
     79  1.1  chopps #define	NTWOC_FLAGS_ECLOCK_SHIFT	7	/* generate external clock */
     80  1.1  chopps #define	NTWOC_FLAGS_ECLOCK_MASK	0x00000080	/* port 0 ext clk gen mask */
     81  1.1  chopps 
     82  1.1  chopps /* these are used on the flags directly */
     83  1.1  chopps #define	NTWOC_FLAGS_RXDIV_SHIFT	16
     84  1.1  chopps #define	NTWOC_FLAGS_TXDIV_SHIFT	20
     85  1.1  chopps #define	NTWOC_FLAGS_TMC_SHIFT	24
     86  1.1  chopps 
     87  1.1  chopps 
     88  1.1  chopps #define NTWOC_PCR		0x00 /* RW, PC Control Register */
     89  1.1  chopps #define NTWOC_BAR		0x02 /* RW, Base Address Register */
     90  1.1  chopps #define NTWOC_PSR		0x04 /* RW, Page Scan Register */
     91  1.1  chopps #define NTWOC_MCR		0x06 /* RW, Modem Control Register */
     92  1.1  chopps 
     93  1.1  chopps #define NTWOC_PCR_SCARUN	0x01 /* !Reset */
     94  1.1  chopps #define NTWOC_PCR_EN_VPM	0x02 /* Running above 1M */
     95  1.1  chopps #define NTWOC_PCR_MEM_WIN	0x04 /* Open memory window */
     96  1.1  chopps #define NTWOC_PCR_ISA16		0x08 /* 16 bit ISA mode */
     97  1.1  chopps #define NTWOC_PCR_16M_SEL	0xF0 /* A20-A23 Addresses */
     98  1.1  chopps 
     99  1.1  chopps #define NTWOC_PSR_PG_SEL	0x1F /* Page 0 - 31 select */
    100  1.1  chopps #define NTWOC_PG_MSK		0x1F
    101  1.1  chopps #define NTWOC_PSR_WIN_SIZ	0x60 /* Window size select */
    102  1.1  chopps #define NTWOC_PSR_WIN_16K	0x00
    103  1.1  chopps #define NTWOC_PSR_WIN_32K	0x20
    104  1.1  chopps #define NTWOC_PSR_WIN_64K	0x40
    105  1.1  chopps #define NTWOC_PSR_WIN_128K	0x60
    106  1.1  chopps #define NTWOC_PSR_EN_SCA_DMA	0x80 /* Enable the SCA DMA */
    107  1.1  chopps 
    108  1.1  chopps #define NTWOC_MCR_DTR0		0x01 /* Deactivate DTR0 */
    109  1.1  chopps #define NTWOC_MCR_DTR1		0x02 /* Deactivate DTR1 */
    110  1.1  chopps #define NTWOC_MCR_DSR0		0x04 /* DSR0 Status */
    111  1.1  chopps #define NTWOC_MCR_DSR1		0x08 /* DSR1 Status */
    112  1.1  chopps #define NTWOC_MCR_TE0		0x10 /* Enable RS422 TXD */
    113  1.1  chopps #define NTWOC_MCR_TE1		0x20 /* Enable RS422 TXD */
    114  1.1  chopps #define NTWOC_MCR_ETC0		0x40 /* Enable Ext Clock out */
    115  1.1  chopps #define NTWOC_MCR_ETC1		0x80 /* Enable Ext Clock out */
    116  1.1  chopps 
    117  1.1  chopps #endif /* _IF_NTWOC_ISAREG_H_ */
    118