Home | History | Annotate | Line # | Download | only in marvell
gtmpscreg.h revision 1.2
      1  1.2  perry /*	$NetBSD: gtmpscreg.h,v 1.2 2005/02/27 00:27:21 perry Exp $	*/
      2  1.1   matt 
      3  1.1   matt /*
      4  1.1   matt  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
      5  1.1   matt  * All rights reserved.
      6  1.1   matt  *
      7  1.1   matt  * Redistribution and use in source and binary forms, with or without
      8  1.1   matt  * modification, are permitted provided that the following conditions
      9  1.1   matt  * are met:
     10  1.1   matt  * 1. Redistributions of source code must retain the above copyright
     11  1.1   matt  *    notice, this list of conditions and the following disclaimer.
     12  1.1   matt  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1   matt  *    notice, this list of conditions and the following disclaimer in the
     14  1.1   matt  *    documentation and/or other materials provided with the distribution.
     15  1.1   matt  * 3. All advertising materials mentioning features or use of this software
     16  1.1   matt  *    must display the following acknowledgement:
     17  1.1   matt  *      This product includes software developed for the NetBSD Project by
     18  1.1   matt  *      Allegro Networks, Inc., and Wasabi Systems, Inc.
     19  1.1   matt  * 4. The name of Allegro Networks, Inc. may not be used to endorse
     20  1.1   matt  *    or promote products derived from this software without specific prior
     21  1.1   matt  *    written permission.
     22  1.1   matt  * 5. The name of Wasabi Systems, Inc. may not be used to endorse
     23  1.1   matt  *    or promote products derived from this software without specific prior
     24  1.1   matt  *    written permission.
     25  1.1   matt  *
     26  1.1   matt  * THIS SOFTWARE IS PROVIDED BY ALLEGRO NETWORKS, INC. AND
     27  1.1   matt  * WASABI SYSTEMS, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
     28  1.1   matt  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
     29  1.1   matt  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     30  1.1   matt  * IN NO EVENT SHALL EITHER ALLEGRO NETWORKS, INC. OR WASABI SYSTEMS, INC.
     31  1.1   matt  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     32  1.1   matt  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     33  1.1   matt  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     34  1.1   matt  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     35  1.1   matt  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     36  1.1   matt  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     37  1.1   matt  * POSSIBILITY OF SUCH DAMAGE.
     38  1.1   matt  */
     39  1.1   matt 
     40  1.1   matt /*
     41  1.1   matt  * gtmpscreg.h - register defines for GT-64260 MPSC
     42  1.1   matt  *
     43  1.1   matt  * creation	Sun Apr  8 11:49:57 PDT 2001	cliff
     44  1.1   matt  */
     45  1.1   matt 
     46  1.1   matt #ifndef _GTMPSCREG_H
     47  1.1   matt #define _GTMPSCREG_H
     48  1.1   matt 
     49  1.1   matt #ifndef BIT
     50  1.1   matt #define BIT(bitno)          (1U << (bitno))
     51  1.1   matt #endif
     52  1.1   matt #ifndef BITS
     53  1.1   matt #define BITS(hi, lo)        ((~((~0) << ((hi) + 1))) & ((~0) << (lo)))
     54  1.1   matt #endif
     55  1.1   matt 
     56  1.1   matt #define GTMPSC_NCHAN      2               /* Number of MPSC channels */
     57  1.1   matt 
     58  1.1   matt /*******************************************************************************
     59  1.1   matt  *
     60  1.1   matt  * MPSC register address offsets relative to the base mapping
     61  1.1   matt  */
     62  1.1   matt #define GTMPSC_MRR	0xb400		/* MPSC Routing Register */
     63  1.1   matt #define GTMPSC_RCRR	0xb404		/* MPSC RX Clock Routing Register */
     64  1.1   matt #define GTMPSC_TCRR	0xb408		/* MPSC TX Clock Routing Register */
     65  1.1   matt #define GTMPSC_MMCR0_LO	0x8000		/* MPSC0 Main Config Register Lo */
     66  1.1   matt #define GTMPSC_MMCR0_HI	0x8004		/* MPSC0 Main Config Register Hi */
     67  1.1   matt #define GTMPSC_MPCR0	0x8008		/* MPSC0 Protocol Config Register */
     68  1.1   matt #define GTMPSC_CH0_BASE	0x8008		/* MPSC0 Channel Register base */
     69  1.1   matt #define GTMPSC_CHR0(n)	(MPSC_CH0_BASE + ((n) << 2))
     70  1.1   matt #define GTMPSC_MMCR1_LO	0x9000		/* MPSC1 Main Config Register Lo */
     71  1.1   matt #define GTMPSC_MMCR1_HI	0x9004		/* MPSC1 Main Config Register Hi */
     72  1.1   matt #define GTMPSC_MPCR1	0x9008		/* MPSC1 Protocol Config Register */
     73  1.1   matt #define GTMPSC_CH1R_BASE 0x9008		/* MPSC1 Channel Register base */
     74  1.1   matt #define GTMPSC_CHR1(n)	(GTMPSC_CH1_BASE + ((n) << 2))
     75  1.1   matt 
     76  1.1   matt #define GTMPSC_U_MMCR_LO(u)	(GTMPSC_MMCR0_LO + (((u) & 1) << 12))
     77  1.1   matt #define GTMPSC_U_MMCR_HI(u)	(GTMPSC_MMCR0_HI + (((u) & 1) << 12))
     78  1.1   matt #define GTMPSC_U_MPCR(u)	(GTMPSC_MPCR0 + (((u) & 1) << 12))
     79  1.1   matt #define GTMPSC_U_CHRN(u, n)	(GTMPSC_CH0_BASE + (((u) & 1) << 12) + ((n) << 2))
     80  1.1   matt 
     81  1.1   matt /*******************************************************************************
     82  1.1   matt  *
     83  1.1   matt  * MPSC register values & bit defines
     84  1.1   matt  *
     85  1.1   matt  *	values are provided for UART mode only
     86  1.1   matt  */
     87  1.1   matt /*
     88  1.1   matt  * MPSC Routing Register bits
     89  1.1   matt  */
     90  1.1   matt #define GTMPSC_MRR_PORT0	0		/* serial port #0 */
     91  1.1   matt #define GTMPSC_MRR_NONE		7		/* unconnected */
     92  1.1   matt 						/* all other "routes" resvd. */
     93  1.1   matt #define GTMPSC_MRR_MR0_MASK	BITS(2,0)	/* routing mask for MPSC0 */
     94  1.1   matt #define GTMPSC_MRR_RESa		BITS(5,3)
     95  1.1   matt #define GTMPSC_MRR_MR1_MASK	BITS(8,6)	/* routing mask for MPSC1 */
     96  1.1   matt #define GTMPSC_MRR_RESb		BITS(30,9)
     97  1.1   matt #define GTMPSC_MRRE_DSC		BIT(31)		/* "Don't Stop Clock" */
     98  1.1   matt #define GTMPSC_MRR_RES (GTMPSC_MRR_RESa|GTMPSC_MRR_RESb)
     99  1.1   matt /*
    100  1.1   matt  * MPSC Clock Routing Register bits
    101  1.1   matt  * the bitfields and route definitions are common for RCRR and TCRR
    102  1.1   matt  * except for MPSC_TCRR_TSCLK0
    103  1.1   matt  */
    104  1.1   matt #define GTMPSC_CRR_BRG0		0x0		/* Baud Rate Generator #0 */
    105  1.1   matt #define GTMPSC_CRR_BRG1		0x1		/* Baud Rate Generator #1 */
    106  1.1   matt #define GTMPSC_CRR_BRG2		0x2		/* Baud Rate Generator #2 */
    107  1.1   matt #define GTMPSC_CRR_SCLK0	0x8		/* SCLK0 */
    108  1.1   matt #define GTMPSC_TCRR_TSCLK0	0x9		/* TSCLK0 (for TCRR only) */
    109  1.1   matt 						/* all other values resvd. */
    110  1.1   matt #define GTMPSC_CRR0_SHIFT	0
    111  1.1   matt #define GTMPSC_CRR0_MASK	BITS(3,0)	/* MPSC0 Clock Routing */
    112  1.1   matt #define GTMPSC_CRR_RESa		BITS(7,4)
    113  1.1   matt #define GTMPSC_CRR1_SHIFT	8
    114  1.1   matt #define GTMPSC_CRR1_MASK	BITS(11,8)	/* MPSC1 Clock Routing */
    115  1.1   matt #define GTMPSC_CRR_RESb		BITS(31,12)
    116  1.1   matt #define GTMPSC_CRR_RES (GTMPSC_CRR_RESa|GTMPSC_CRR_RESb)
    117  1.1   matt /*
    118  1.1   matt  * MPSC Main Configuration Register LO bits
    119  1.1   matt  */
    120  1.1   matt #define GTMPSC_MMCR_LO_MODE_MASK BITS(2,0)
    121  1.1   matt #define GTMPSC_MMCR_LO_MODE_UART (0x4 << 0)	/* UART mode */
    122  1.1   matt #define GTMPSC_MMCR_LO_TTX	 BIT(3)		/* Transparent TX */
    123  1.1   matt #define GTMPSC_MMCR_LO_TRX	 BIT(4)		/* Transparent RX */
    124  1.1   matt #define GTMPSC_MMCR_LO_RESa	 BIT(5)
    125  1.1   matt #define GTMPSC_MMCR_LO_ET	 BIT(6)		/* Enable TX */
    126  1.1   matt #define GTMPSC_MMCR_LO_ER	 BIT(7)		/* Enable RX */
    127  1.1   matt #define GTMPSC_MMCR_LO_LPBK_MASK BITS(9,8)	/* Loop Back */
    128  1.1   matt #define GTMPSC_MMCR_LO_LPBK_NONE (0 << 8)	/* Normal (non-loop) */
    129  1.1   matt #define GTMPSC_MMCR_LO_LPBK_LOOP (1 << 8)	/* Loop Back */
    130  1.1   matt #define GTMPSC_MMCR_LO_LPBK_ECHO (2 << 8)	/* Echo */
    131  1.1   matt #define GTMPSC_MMCR_LO_LPBK_LBE	(3 << 8)	/* Loop Back and Echo */
    132  1.1   matt #define GTMPSC_MMCR_LO_NLM	BIT(10)		/* Null Modem */
    133  1.1   matt #define GTMPSC_MMCR_LO_RESb	BIT(11)
    134  1.1   matt #define GTMPSC_MMCR_LO_TSYN	BIT(12)		/* Transmitter sync to Rcvr. */
    135  1.1   matt #define GTMPSC_MMCR_LO_RESc	BIT(13)
    136  1.1   matt #define GTMPSC_MMCR_LO_TSNS_MASK BITS(15,14)	/* Transmit Sense */
    137  1.1   matt #define GTMPSC_MMCR_LO_TSNS_INF	(0 << 14)	/* Infinite */
    138  1.1   matt #define GTMPSC_MMCR_LO_TIDL	BIT(16)		/* TX Idles */
    139  1.1   matt #define GTMPSC_MMCR_LO_RTSM	BIT(17)		/* RTS Mode */
    140  1.1   matt #define GTMPSC_MMCR_LO_RESd	BIT(18)
    141  1.1   matt #define GTMPSC_MMCR_LO_CTSS	BIT(19)		/* CTS Sampling mode */
    142  1.1   matt #define GTMPSC_MMCR_LO_CDS	BIT(20)		/* CD Sampling mode */
    143  1.1   matt #define GTMPSC_MMCR_LO_CTSM	BIT(21)		/* CTS operating Mode */
    144  1.1   matt #define GTMPSC_MMCR_LO_CDM	BIT(22)		/* CD operating Mode */
    145  1.1   matt #define GTMPSC_MMCR_LO_CRCM_MASK BITS(25,23)	/* CRC Mode */
    146  1.1   matt #define GTMPSC_MMCR_LO_CRCM_NONE (0 << 23)	/* CRC Mode */
    147  1.1   matt #define GTMPSC_MMCR_LO_RESe	BITS(27,26)
    148  1.1   matt #define GTMPSC_MMCR_LO_TRVD	BIT(28)		/* Transmit Reverse Data */
    149  1.1   matt #define GTMPSC_MMCR_LO_RRVD	BIT(29)		/* Receive  Reverse Data */
    150  1.1   matt #define GTMPSC_MMCR_LO_RESf	BIT(30)
    151  1.1   matt #define GTMPSC_MMCR_LO_GDE	BIT(31)		/* Glitch Detect Enable */
    152  1.1   matt #define GTMPSC_MMCR_LO_RES \
    153  1.1   matt 		(GTMPSC_MMCR_LO_RESa|GTMPSC_MMCR_LO_RESb|GTMPSC_MMCR_LO_RESc \
    154  1.1   matt 		|GTMPSC_MMCR_LO_RESd|GTMPSC_MMCR_LO_RESe|GTMPSC_MMCR_LO_RESf)
    155  1.1   matt /*
    156  1.1   matt  * MPSC Main Configuration Register HI bits
    157  1.1   matt  */
    158  1.1   matt #define GTMPSC_MMCR_HI_TCI	 BIT(0)		/* TX Clock Invert */
    159  1.1   matt #define GTMPSC_MMCR_HI_TINV	 BIT(1)		/* TX Bitstream Inversion */
    160  1.1   matt #define GTMPSC_MMCR_HI_TPL	 BITS(4,2)	/* TX Preable Length */
    161  1.1   matt #define GTMPSC_MMCR_HI_TPL_NONE	 0		/* no TX Preable (default) */
    162  1.1   matt #define GTMPSC_MMCR_HI_TPL_16	 (6 << 2)	/* 16 byte preamble */
    163  1.1   matt #define GTMPSC_MMCR_HI_TPPT_MASK BITS(8,5)	/* TX Preable Pattern */
    164  1.1   matt #define GTMPSC_MMCR_HI_TPPT_NONE (0 << 5)	/* TX Preable Pattern */
    165  1.1   matt #define GTMPSC_MMCR_HI_TCDV_MASK BITS(10,9)	/* TX Clock Divide */
    166  1.1   matt #define GTMPSC_MMCR_HI_TCDV_1X	 (0 << 9)	/* 1x clock mode */
    167  1.1   matt #define GTMPSC_MMCR_HI_TCDV_8X	 (1 << 9)	/* 8x clock mode */
    168  1.1   matt #define GTMPSC_MMCR_HI_TCDV_16X	 (2 << 9)	/* 16x clock mode */
    169  1.1   matt #define GTMPSC_MMCR_HI_TCDV_32X	 (3 << 9)	/* 32x clock mode */
    170  1.1   matt #define GTMPSC_MMCR_HI_TDEC_MASK BITS(13,11)	/* TX Encoder */
    171  1.1   matt #define GTMPSC_MMCR_HI_TDEC_NRZ	 (0 << 9)	/* NRZ (default) */
    172  1.1   matt #define GTMPSC_MMCR_HI_TDEC_NRZI (1 << 9)	/* NRZI (mark) */
    173  1.1   matt #define GTMPSC_MMCR_HI_TDEC_FM0	 (2 << 9)	/* FM0 */
    174  1.1   matt #define GTMPSC_MMCR_HI_TDEC_MAN	 (4 << 9)	/* Manchester */
    175  1.1   matt #define GTMPSC_MMCR_HI_TDEC_DMAN (6 << 9)	/* Differential Manchester */
    176  1.1   matt 						/* all other values rsvd. */
    177  1.1   matt #define GTMPSC_MMCR_HI_RESa	BITS(15,14)
    178  1.1   matt #define GTMPSC_MMCR_HI_RINV	BIT(16)		/* RX Bitstream Inversion */
    179  1.1   matt #define GTMPSC_MMCR_HI_GDW	BITS(20,17)	/* Clock Glitch Width */
    180  1.1   matt #define GTMPSC_MMCR_HI_RESb	BIT(21)
    181  1.1   matt #define GTMPSC_MMCR_HI_RDW	BIT(22)		/* Reveive Data Width */
    182  1.1   matt #define GTMPSC_MMCR_HI_RSYL_MASK  BITS(24,23)	/* Reveive Sync Width */
    183  1.1   matt #define GTMPSC_MMCR_HI_RSYL_EXT	  (0 << 23)	/* External sync */
    184  1.1   matt #define GTMPSC_MMCR_HI_RSYL_4BIT  (1 << 23)	/* 4-bit sync */
    185  1.1   matt #define GTMPSC_MMCR_HI_RSYL_8BIT  (2 << 23)	/* 8-bit sync */
    186  1.1   matt #define GTMPSC_MMCR_HI_RSYL_16BIT (3 << 23)	/* 16-bit sync */
    187  1.1   matt #define GTMPSC_MMCR_HI_RCDV_MASK BITS(26,25)     /* Receive Clock Divider */
    188  1.1   matt #define GTMPSC_MMCR_HI_RCDV_1X   (0 << 25)       /* 1x clock mode (default) */
    189  1.1   matt #define GTMPSC_MMCR_HI_RCDV_8X   (1 << 25)       /* 8x clock mode (default) */
    190  1.1   matt #define GTMPSC_MMCR_HI_RCDV_16X  (2 << 25)       /* 16x clock mode (default) */
    191  1.1   matt #define GTMPSC_MMCR_HI_RCDV_32X  (3 << 25)       /* 16x clock mode (default) */
    192  1.1   matt #define GTMPSC_MMCR_HI_RENC_MASK BITS(29,27)	/* Receive Encoder */
    193  1.1   matt #define GTMPSC_MMCR_HI_RENC_NRZ	(0 << 27)	/* NRZ (default) */
    194  1.1   matt #define GTMPSC_MMCR_HI_RENC_NRZI (1 << 27)	/* NRZI */
    195  1.1   matt #define GTMPSC_MMCR_HI_RENC_FM0	(2 << 27)	/* FM0 */
    196  1.1   matt #define GTMPSC_MMCR_HI_RENC_MAN	(4 << 27)	/* Manchester */
    197  1.1   matt #define GTMPSC_MMCR_HI_RENC_DMAN (6 << 27)	/* Differential Manchester */
    198  1.1   matt 						/* all other values rsvd. */
    199  1.1   matt #define GTMPSC_MMCR_HI_SEDG_MASK BITS(31,30)	/* Sync Clock Edge */
    200  1.1   matt #define GTMPSC_MMCR_HI_SEDG_BOTH (0 << 30)	/* rising and falling (dflt) */
    201  1.1   matt #define GTMPSC_MMCR_HI_SEDG_RISE (1 << 30)	/* rising edge */
    202  1.1   matt #define GTMPSC_MMCR_HI_SEDG_FALL (2 << 30)	/* falling edge */
    203  1.1   matt #define GTMPSC_MMCR_HI_SEDG_NONE (3 << 30)	/* no adjustment */
    204  1.1   matt /*
    205  1.1   matt  * SDMAx Command/Status Register bits for UART Mode, RX
    206  1.1   matt  *
    207  1.1   matt  * XXX these belong in sdmareg.h ?
    208  1.1   matt  */
    209  1.1   matt #define SDMA_CSR_RX_PE		BIT(0)		/* Parity Error */
    210  1.1   matt #define SDMA_CSR_RX_CDL		BIT(1)		/* Carrier Detect Loss */
    211  1.1   matt #define SDMA_CSR_RX_RESa	BIT(2)
    212  1.1   matt #define SDMA_CSR_RX_FR		BIT(3)		/* Framing Error */
    213  1.1   matt #define SDMA_CSR_RX_RESb	BITS(5,4)
    214  1.1   matt #define SDMA_CSR_RX_OR		BIT(6)		/* Data Overrun */
    215  1.1   matt #define SDMA_CSR_RX_RESc	BITS(8,7)
    216  1.1   matt #define SDMA_CSR_RX_BR		BIT(9)		/* Break Received */
    217  1.1   matt #define SDMA_CSR_RX_MI		BIT(10)		/* Max Idle */
    218  1.1   matt #define SDMA_CSR_RX_ADDR	BIT(11)		/* Address */
    219  1.1   matt #define SDMA_CSR_RX_AMATCH	BIT(12)		/* Address match */
    220  1.1   matt #define SDMA_CSR_RX_CT		BIT(13)		/* Transparency Control char */
    221  1.1   matt #define SDMA_CSR_RX_C		BIT(14)		/* Control char */
    222  1.1   matt #define SDMA_CSR_RX_ES		BIT(15)		/* Error Summary */
    223  1.1   matt #define SDMA_CSR_RX_L		BIT(16)		/* Last */
    224  1.1   matt #define SDMA_CSR_RX_F		BIT(17)		/* First */
    225  1.1   matt #define SDMA_CSR_RX_RESd	BITS(22,18)
    226  1.1   matt #define SDMA_CSR_RX_EI		BIT(23)		/* Enable Interrupt */
    227  1.1   matt #define SDMA_CSR_RX_RESe	BITS(29,24)
    228  1.1   matt #define SDMA_CSR_RX_AUTO	BIT(30)		/* Auto Mode */
    229  1.1   matt #define SDMA_CSR_RX_OWN		BIT(31)		/* Owner */
    230  1.1   matt #define SDMA_CSR_RX_RES (SDMA_CSR_RX_RESa|SDMA_CSR_RX_RESb|SDMA_CSR_RX_RESc \
    231  1.1   matt 			 |SDMA_CSR_RX_RESd|SDMA_CSR_RX_RESe)
    232  1.1   matt /*
    233  1.1   matt  * SDMAx Command/Status Register bits for UART Mode, TX
    234  1.1   matt  */
    235  1.1   matt #define SDMA_CSR_TX_RESa	BIT(0)
    236  1.1   matt #define SDMA_CSR_TX_CTSL	BIT(1)		/* CTS Loss */
    237  1.1   matt #define SDMA_CSR_TX_RESb	BITS(14,2)
    238  1.1   matt #define SDMA_CSR_TX_ES		BIT(15)		/* Error Summary */
    239  1.1   matt #define SDMA_CSR_TX_L		BIT(16)		/* Last */
    240  1.1   matt #define SDMA_CSR_TX_F		BIT(17)		/* First */
    241  1.1   matt #define SDMA_CSR_TX_P		BIT(18)		/* Preamble */
    242  1.1   matt #define SDMA_CSR_TX_ADDR	BIT(19)		/* Address */
    243  1.1   matt #define SDMA_CSR_TX_NS		BIT(20)		/* No Stop Bit */
    244  1.1   matt #define SDMA_CSR_TX_RESc	BITS(22,21)
    245  1.1   matt #define SDMA_CSR_TX_EI		BIT(23)		/* Enable Interrupt */
    246  1.1   matt #define SDMA_CSR_TX_RESd	BITS(29,24)
    247  1.1   matt #define SDMA_CSR_TX_AUTO	BIT(30)		/* Auto Mode */
    248  1.1   matt #define SDMA_CSR_TX_OWN		BIT(31)		/* Owner */
    249  1.1   matt #define SDMA_CSR_TX_RES \
    250  1.1   matt 	(SDMA_CSR_TX_RESa|SDMA_CSR_TX_RESb|SDMA_CSR_TX_RESc|SDMA_CSR_TX_RESd)
    251  1.1   matt /*
    252  1.1   matt  * MPSCx Protocol Configuration Register for UART Mode
    253  1.1   matt  */
    254  1.1   matt #define GTMPSC_MPCR_RESa	BITS(5,0)
    255  1.1   matt #define GTMPSC_MPCR_DRT		BIT(6)		/* Disable Rx on Tx */
    256  1.1   matt #define GTMPSC_MPCR_ISO		BIT(7)		/* Isochronous Mode */
    257  1.1   matt #define GTMPSC_MPCR_RZS		BIT(8)		/* Rx Zero Stop Bit(s) */
    258  1.1   matt #define GTMPSC_MPCR_FRZ		BIT(9)		/* Freeze Tx */
    259  1.1   matt #define GTMPSC_MPCR_UM_MASK	BITS(11,10)	/* UART Mode mask */
    260  1.1   matt #define GTMPSC_MPCR_UM_NORM	(0 << 10)	/* Normal UART Mode */
    261  1.1   matt #define GTMPSC_MPCR_UM_MDROP	(1 << 10)	/* Multi-Drop UART Mode */
    262  1.1   matt 						/* other values are resvd. */
    263  1.2  perry #define GTMPSC_MPCR_CLMASK	BITS(13,12)	/* Character Length mask */
    264  1.2  perry #define GTMPSC_MPCR_CL_5	(0 << 12)	/* 5 data bits */
    265  1.2  perry #define GTMPSC_MPCR_CL_6	(1 << 12)	/* 6 data bits */
    266  1.2  perry #define GTMPSC_MPCR_CL_7	(2 << 12)	/* 7 data bits */
    267  1.2  perry #define GTMPSC_MPCR_CL_8	(3 << 12)	/* 8 data bits */
    268  1.1   matt #define GTMPSC_MPCR_SBL_1	0x0		/* 1 stop bit */
    269  1.1   matt #define GTMPSC_MPCR_SBL_2	BIT(14)		/* 2 stop bits */
    270  1.1   matt #define GTMPSC_MPCR_FLC_NORM	0x0		/* Normal Flow Ctl mode */
    271  1.1   matt #define GTMPSC_MPCR_FLC_ASYNC	BIT(15)		/* Asynchronous Flow Ctl mode */
    272  1.1   matt #define GTMPSC_MPCR_RESb	BITS(31,16)
    273  1.1   matt #define GTMPSC_MPCR_RES (GTMPSC_MPCR_RESa|GTMPSC_MPCR_RESb)
    274  1.1   matt /*
    275  1.1   matt  * MPSC Channel Register 1 for UART Mode "Break/Stuff"
    276  1.1   matt  */
    277  1.1   matt #define GTMPSC_CHR1_TCS		BITS(7,0)	/* Constrol Stuff Character */
    278  1.1   matt #define GTMPSC_CHR1_BRK		BITS(23,16)	/* Break Count */
    279  1.1   matt #define GTMPSC_CHR1_RES		BITS(15,8)|BITS(31,24)
    280  1.1   matt /*
    281  1.1   matt  * MPSC Channel Register 2 for UART Mode "Command"
    282  1.1   matt  */
    283  1.1   matt #define GTMPSC_CHR2_RESa	BIT(0)
    284  1.1   matt #define GTMPSC_CHR2_TEV		BIT(1)		/* Tx Enb. Vert. Redundancy  */
    285  1.1   matt #define GTMPSC_CHR2_TPM_MASK	BITS(3,2)	/* Tx Parity Mode mask */
    286  1.1   matt #define GTMPSC_CHR2_TPM_ODD	(0 << 2)	/* Odd Tx Parity */
    287  1.1   matt #define GTMPSC_CHR2_TPM_LOW	(1 << 2)	/* Low (always 0) Tx Parity */
    288  1.1   matt #define GTMPSC_CHR2_TPM_EVEN	(2 << 2)	/* Even Tx Parity */
    289  1.1   matt #define GTMPSC_CHR2_TPM_HIGH	(3 << 2)	/* High (always 1) Tx Parity */
    290  1.1   matt #define GTMPSC_CHR2_RESb	BITS(6,4)
    291  1.1   matt #define GTMPSC_CHR2_TXABORT	BIT(7)		/* Tx Abort */
    292  1.1   matt #define GTMPSC_CHR2_RESc	BIT(8)
    293  1.1   matt #define GTMPSC_CHR2_TCS		BIT(9)		/* Tx TCS Char */
    294  1.1   matt #define GTMPSC_CHR2_RESd	BITS(16,10)
    295  1.1   matt #define GTMPSC_CHR2_REC		BIT(17)		/* Rx Enb. Vert. Redundancy */
    296  1.1   matt #define GTMPSC_CHR2_RPM_MASK	BITS(19,18)	/* Rx Parity Mode mask */
    297  1.1   matt #define GTMPSC_CHR2_RPM_ODD	(0 << 18)	/* Odd Rx Parity */
    298  1.1   matt #define GTMPSC_CHR2_RPM_LOW	(1 << 18)	/* Low (always 0) Rx Parity */
    299  1.1   matt #define GTMPSC_CHR2_RPM_EVEN	(2 << 18)	/* Even Rx Parity */
    300  1.1   matt #define GTMPSC_CHR2_RPM_HIGH	(3 << 18)	/* High (always 1) Rx Parity */
    301  1.1   matt #define GTMPSC_CHR2_RESe	BITS(22,20)
    302  1.1   matt #define GTMPSC_CHR2_RXABORT	BIT(23)		/* Rx Abort */
    303  1.1   matt #define GTMPSC_CHR2_RESf	BIT(24)
    304  1.1   matt #define GTMPSC_CHR2_CRD		BIT(25)		/* Close RX Descriptor */
    305  1.1   matt #define GTMPSC_CHR2_RESg	BITS(30,26)
    306  1.1   matt #define GTMPSC_CHR2_EH		BIT(31)		/* Enter Hunt */
    307  1.1   matt #define GTMPSC_CHR2_RES \
    308  1.1   matt 		(GTMPSC_CHR2_RESa|GTMPSC_CHR2_RESb|GTMPSC_CHR2_RESc| \
    309  1.1   matt 		 GTMPSC_CHR2_RESd|GTMPSC_CHR2_RESe|GTMPSC_CHR2_RESf| \
    310  1.1   matt 		 GTMPSC_CHR2_RESg)
    311  1.1   matt /*
    312  1.1   matt  * MPSC Channel Register 3 for UART Mode "Max Idle"
    313  1.1   matt  */
    314  1.1   matt #define GTMPSC_CHR3_MIR		BITS(15,0)	/* Max Idle Char count */
    315  1.1   matt #define GTMPSC_CHR3_RES		BITS(31,16)
    316  1.1   matt /*
    317  1.1   matt  * MPSC Channel Register 4 for UART Mode "Control Filtering"
    318  1.1   matt  */
    319  1.1   matt #define GTMPSC_CHR4_CFR		BITS(7,0)	/* Control bit compare enable */
    320  1.1   matt #define GTMPSC_CHR4_RES		BITS(31,8)
    321  1.1   matt /*
    322  1.1   matt  * MPSC Channel Registers 5..8 for UART Mode "UART Control Character"
    323  1.1   matt  *
    324  1.1   matt  * NOTE: two 16 bit CHRCC fields exist in each of Channel Registers 5..8
    325  1.1   matt  */
    326  1.1   matt #define GTMPSC_CHRCC_SHIFT	16
    327  1.1   matt #define GTMPSC_CHRCC_CHAR	BITS(7,0)	/* the control character */
    328  1.1   matt #define GTMPSC_CHRCC_RES	BITS(11,8)
    329  1.1   matt #define GTMPSC_CHRCC_INT	BIT(12)		/* Interrupt */
    330  1.1   matt #define GTMPSC_CHRCC_CO		BIT(13)		/* ISO 3309 Control Octet */
    331  1.1   matt #define GTMPSC_CHRCC_R		BIT(14)		/* Reject */
    332  1.1   matt #define GTMPSC_CHRCC_V		BIT(15)		/* Valid */
    333  1.1   matt /*
    334  1.1   matt  * MPSC Channel Register 9 for UART Mode "Address" (for multidrop operation)
    335  1.1   matt  */
    336  1.1   matt #define GTMPSC_CHR9_AD1		BITS(7,0)	/* address #1 */
    337  1.1   matt #define GTMPSC_CHR9_RESa	BITS(14,8)
    338  1.1   matt #define GTMPSC_CHR9_MODE1	BIT(15)		/* mode #1 */
    339  1.1   matt #define GTMPSC_CHR9_AD2		BITS(23,16)	/* address #2 */
    340  1.1   matt #define GTMPSC_CHR9_RESb	BITS(30,24)
    341  1.1   matt #define GTMPSC_CHR9_MODE2	BIT(31)		/* mode #2 */
    342  1.1   matt #define GTMPSC_CHR9_RES	(GTMPSC_CHR9_RESa|GTMPSC_CHR9_RESb)
    343  1.1   matt /*
    344  1.1   matt  * MPSC Channel Register 10 for UART Mode "Event Status"
    345  1.1   matt  */
    346  1.1   matt #define GTMPSC_CHR10_CTS	BIT(0)		/* Clear To Send */
    347  1.1   matt #define GTMPSC_CHR10_CD		BIT(1)		/* Carrier Detect */
    348  1.1   matt #define GTMPSC_CHR10_RESa	BIT(2)
    349  1.1   matt #define GTMPSC_CHR10_TIDLE	BIT(3)		/* Tx in Idle State */
    350  1.1   matt #define GTMPSC_CHR10_RESb	BIT(4)
    351  1.1   matt #define GTMPSC_CHR10_RHS	BIT(5)		/* Rx in HUNT State */
    352  1.1   matt #define GTMPSC_CHR10_RESc	BIT(6)
    353  1.1   matt #define GTMPSC_CHR10_RLS	BIT(7)		/* Rx Line STatus */
    354  1.1   matt #define GTMPSC_CHR10_RESd	BITS(10,8)
    355  1.1   matt #define GTMPSC_CHR10_RLIDL	BIT(11)		/* Rx IDLE Line */
    356  1.1   matt #define GTMPSC_CHR10_RESe	BITS(15,12)
    357  1.1   matt #define GTMPSC_CHR10_RCRn	BITS(23,16)	/* Received Control Char # */
    358  1.1   matt #define GTMPSC_CHR10_RESf	BITS(31,24)
    359  1.1   matt #define GTMPSC_CHR10_RES \
    360  1.1   matt 		(GTMPSC_CHR10_RESa|GTMPSC_CHR10_RESb|GTMPSC_CHR10_RESc \
    361  1.1   matt 		|GTMPSC_CHR10_RESd|GTMPSC_CHR10_RESe|GTMPSC_CHR10_RESf)
    362  1.1   matt 
    363  1.1   matt 
    364  1.1   matt #endif	/* _GTMPSCREG_H */
    365