Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / mips / sibyte / include / sb1250_syncser.h
blob415c36f7483551414d05e5a546d11d7f87cda185
1 /* *********************************************************************
2 * SB1250 Board Support Package
4 * Synchronous Serial Constants File: sb1250_syncser.h
6 * This module contains constants and macros useful for
7 * manipulating the SB1250's Synchronous Serial
9 * SB1250 specification level: User's manual 1/02/02
11 *********************************************************************
13 * Copyright 2000,2001,2002,2003
14 * Broadcom Corporation. All rights reserved.
16 * This software is furnished under license and may be used and
17 * copied only in accordance with the following terms and
18 * conditions. Subject to these conditions, you may download,
19 * copy, install, use, modify and distribute modified or unmodified
20 * copies of this software in source and/or binary form. No title
21 * or ownership is transferred hereby.
23 * 1) Any source code used, modified or distributed must reproduce
24 * and retain this copyright notice and list of conditions
25 * as they appear in the source file.
27 * 2) No right is granted to use any trade name, trademark, or
28 * logo of Broadcom Corporation. The "Broadcom Corporation"
29 * name may not be used to endorse or promote products derived
30 * from this software without the prior written permission of
31 * Broadcom Corporation.
33 * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR
34 * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
35 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36 * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT
37 * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN
38 * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT,
39 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
40 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
41 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
42 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
43 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
44 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF
45 * THE POSSIBILITY OF SUCH DAMAGE.
46 ********************************************************************* */
49 #ifndef _SB1250_SYNCSER_H
50 #define _SB1250_SYNCSER_H
52 #include "sb1250_defs.h"
55 * Serial Mode Configuration Register
58 #define M_SYNCSER_CRC_MODE _SB_MAKEMASK1(0)
59 #define M_SYNCSER_MSB_FIRST _SB_MAKEMASK1(1)
61 #define S_SYNCSER_FLAG_NUM 2
62 #define M_SYNCSER_FLAG_NUM _SB_MAKEMASK(4,S_SYNCSER_FLAG_NUM)
63 #define V_SYNCSER_FLAG_NUM _SB_MAKEVALUE(x,S_SYNCSER_FLAG_NUM)
65 #define M_SYNCSER_FLAG_EN _SB_MAKEMASK1(6)
66 #define M_SYNCSER_HDLC_EN _SB_MAKEMASK1(7)
67 #define M_SYNCSER_LOOP_MODE _SB_MAKEMASK1(8)
68 #define M_SYNCSER_LOOPBACK _SB_MAKEMASK1(9)
71 * Serial Clock Source and Line Interface Mode Register
74 #define M_SYNCSER_RXCLK_INV _SB_MAKEMASK1(0)
75 #define M_SYNCSER_RXCLK_EXT _SB_MAKEMASK1(1)
77 #define S_SYNCSER_RXSYNC_DLY 2
78 #define M_SYNCSER_RXSYNC_DLY _SB_MAKEMASK(2,S_SYNCSER_RXSYNC_DLY)
79 #define V_SYNCSER_RXSYNC_DLY(x) _SB_MAKEVALUE(x,S_SYNCSER_RXSYNC_DLY)
81 #define M_SYNCSER_RXSYNC_LOW _SB_MAKEMASK1(4)
82 #define M_SYNCSER_RXSTRB_LOW _SB_MAKEMASK1(5)
84 #define M_SYNCSER_RXSYNC_EDGE _SB_MAKEMASK1(6)
85 #define M_SYNCSER_RXSYNC_INT _SB_MAKEMASK1(7)
87 #define M_SYNCSER_TXCLK_INV _SB_MAKEMASK1(8)
88 #define M_SYNCSER_TXCLK_EXT _SB_MAKEMASK1(9)
90 #define S_SYNCSER_TXSYNC_DLY 10
91 #define M_SYNCSER_TXSYNC_DLY _SB_MAKEMASK(2,S_SYNCSER_TXSYNC_DLY)
92 #define V_SYNCSER_TXSYNC_DLY(x) _SB_MAKEVALUE(x,S_SYNCSER_TXSYNC_DLY)
94 #define M_SYNCSER_TXSYNC_LOW _SB_MAKEMASK1(12)
95 #define M_SYNCSER_TXSTRB_LOW _SB_MAKEMASK1(13)
97 #define M_SYNCSER_TXSYNC_EDGE _SB_MAKEMASK1(14)
98 #define M_SYNCSER_TXSYNC_INT _SB_MAKEMASK1(15)
101 * Serial Command Register
104 #define M_SYNCSER_CMD_RX_EN _SB_MAKEMASK1(0)
105 #define M_SYNCSER_CMD_TX_EN _SB_MAKEMASK1(1)
106 #define M_SYNCSER_CMD_RX_RESET _SB_MAKEMASK1(2)
107 #define M_SYNCSER_CMD_TX_RESET _SB_MAKEMASK1(3)
108 #define M_SYNCSER_CMD_TX_PAUSE _SB_MAKEMASK1(5)
111 * Serial DMA Enable Register
114 #define M_SYNCSER_DMA_RX_EN _SB_MAKEMASK1(0)
115 #define M_SYNCSER_DMA_TX_EN _SB_MAKEMASK1(4)
118 * Serial Status Register
121 #define M_SYNCSER_RX_CRCERR _SB_MAKEMASK1(0)
122 #define M_SYNCSER_RX_ABORT _SB_MAKEMASK1(1)
123 #define M_SYNCSER_RX_OCTET _SB_MAKEMASK1(2)
124 #define M_SYNCSER_RX_LONGFRM _SB_MAKEMASK1(3)
125 #define M_SYNCSER_RX_SHORTFRM _SB_MAKEMASK1(4)
126 #define M_SYNCSER_RX_OVERRUN _SB_MAKEMASK1(5)
127 #define M_SYNCSER_RX_SYNC_ERR _SB_MAKEMASK1(6)
128 #define M_SYNCSER_TX_CRCERR _SB_MAKEMASK1(8)
129 #define M_SYNCSER_TX_UNDERRUN _SB_MAKEMASK1(9)
130 #define M_SYNCSER_TX_SYNC_ERR _SB_MAKEMASK1(10)
131 #define M_SYNCSER_TX_PAUSE_COMPLETE _SB_MAKEMASK1(11)
132 #define M_SYNCSER_RX_EOP_COUNT _SB_MAKEMASK1(16)
133 #define M_SYNCSER_RX_EOP_TIMER _SB_MAKEMASK1(17)
134 #define M_SYNCSER_RX_EOP_SEEN _SB_MAKEMASK1(18)
135 #define M_SYNCSER_RX_HWM _SB_MAKEMASK1(19)
136 #define M_SYNCSER_RX_LWM _SB_MAKEMASK1(20)
137 #define M_SYNCSER_RX_DSCR _SB_MAKEMASK1(21)
138 #define M_SYNCSER_RX_DERR _SB_MAKEMASK1(22)
139 #define M_SYNCSER_TX_EOP_COUNT _SB_MAKEMASK1(24)
140 #define M_SYNCSER_TX_EOP_TIMER _SB_MAKEMASK1(25)
141 #define M_SYNCSER_TX_EOP_SEEN _SB_MAKEMASK1(26)
142 #define M_SYNCSER_TX_HWM _SB_MAKEMASK1(27)
143 #define M_SYNCSER_TX_LWM _SB_MAKEMASK1(28)
144 #define M_SYNCSER_TX_DSCR _SB_MAKEMASK1(29)
145 #define M_SYNCSER_TX_DERR _SB_MAKEMASK1(30)
146 #define M_SYNCSER_TX_DZERO _SB_MAKEMASK1(31)
149 * Sequencer Table Entry format
152 #define M_SYNCSER_SEQ_LAST _SB_MAKEMASK1(0)
153 #define M_SYNCSER_SEQ_BYTE _SB_MAKEMASK1(1)
155 #define S_SYNCSER_SEQ_COUNT 2
156 #define M_SYNCSER_SEQ_COUNT _SB_MAKEMASK(4,S_SYNCSER_SEQ_COUNT)
157 #define V_SYNCSER_SEQ_COUNT(x) _SB_MAKEVALUE(x,S_SYNCSER_SEQ_COUNT)
159 #define M_SYNCSER_SEQ_ENABLE _SB_MAKEMASK1(6)
160 #define M_SYNCSER_SEQ_STROBE _SB_MAKEMASK1(7)
162 #endif