drop linux/ufs_fs.h from userspace export and relocate it to fs/ufs/ufs_fs.h
[wrt350n-kernel.git] / include / asm-mips / sibyte / sb1250_syncser.h
blobd4b8558e0bf1b8af4ddc91a5f29537893071deca
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 program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License as
18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 * MA 02111-1307 USA
30 ********************************************************************* */
33 #ifndef _SB1250_SYNCSER_H
34 #define _SB1250_SYNCSER_H
36 #include "sb1250_defs.h"
39 * Serial Mode Configuration Register
42 #define M_SYNCSER_CRC_MODE _SB_MAKEMASK1(0)
43 #define M_SYNCSER_MSB_FIRST _SB_MAKEMASK1(1)
45 #define S_SYNCSER_FLAG_NUM 2
46 #define M_SYNCSER_FLAG_NUM _SB_MAKEMASK(4, S_SYNCSER_FLAG_NUM)
47 #define V_SYNCSER_FLAG_NUM _SB_MAKEVALUE(x, S_SYNCSER_FLAG_NUM)
49 #define M_SYNCSER_FLAG_EN _SB_MAKEMASK1(6)
50 #define M_SYNCSER_HDLC_EN _SB_MAKEMASK1(7)
51 #define M_SYNCSER_LOOP_MODE _SB_MAKEMASK1(8)
52 #define M_SYNCSER_LOOPBACK _SB_MAKEMASK1(9)
55 * Serial Clock Source and Line Interface Mode Register
58 #define M_SYNCSER_RXCLK_INV _SB_MAKEMASK1(0)
59 #define M_SYNCSER_RXCLK_EXT _SB_MAKEMASK1(1)
61 #define S_SYNCSER_RXSYNC_DLY 2
62 #define M_SYNCSER_RXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_RXSYNC_DLY)
63 #define V_SYNCSER_RXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_RXSYNC_DLY)
65 #define M_SYNCSER_RXSYNC_LOW _SB_MAKEMASK1(4)
66 #define M_SYNCSER_RXSTRB_LOW _SB_MAKEMASK1(5)
68 #define M_SYNCSER_RXSYNC_EDGE _SB_MAKEMASK1(6)
69 #define M_SYNCSER_RXSYNC_INT _SB_MAKEMASK1(7)
71 #define M_SYNCSER_TXCLK_INV _SB_MAKEMASK1(8)
72 #define M_SYNCSER_TXCLK_EXT _SB_MAKEMASK1(9)
74 #define S_SYNCSER_TXSYNC_DLY 10
75 #define M_SYNCSER_TXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_TXSYNC_DLY)
76 #define V_SYNCSER_TXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_TXSYNC_DLY)
78 #define M_SYNCSER_TXSYNC_LOW _SB_MAKEMASK1(12)
79 #define M_SYNCSER_TXSTRB_LOW _SB_MAKEMASK1(13)
81 #define M_SYNCSER_TXSYNC_EDGE _SB_MAKEMASK1(14)
82 #define M_SYNCSER_TXSYNC_INT _SB_MAKEMASK1(15)
85 * Serial Command Register
88 #define M_SYNCSER_CMD_RX_EN _SB_MAKEMASK1(0)
89 #define M_SYNCSER_CMD_TX_EN _SB_MAKEMASK1(1)
90 #define M_SYNCSER_CMD_RX_RESET _SB_MAKEMASK1(2)
91 #define M_SYNCSER_CMD_TX_RESET _SB_MAKEMASK1(3)
92 #define M_SYNCSER_CMD_TX_PAUSE _SB_MAKEMASK1(5)
95 * Serial DMA Enable Register
98 #define M_SYNCSER_DMA_RX_EN _SB_MAKEMASK1(0)
99 #define M_SYNCSER_DMA_TX_EN _SB_MAKEMASK1(4)
102 * Serial Status Register
105 #define M_SYNCSER_RX_CRCERR _SB_MAKEMASK1(0)
106 #define M_SYNCSER_RX_ABORT _SB_MAKEMASK1(1)
107 #define M_SYNCSER_RX_OCTET _SB_MAKEMASK1(2)
108 #define M_SYNCSER_RX_LONGFRM _SB_MAKEMASK1(3)
109 #define M_SYNCSER_RX_SHORTFRM _SB_MAKEMASK1(4)
110 #define M_SYNCSER_RX_OVERRUN _SB_MAKEMASK1(5)
111 #define M_SYNCSER_RX_SYNC_ERR _SB_MAKEMASK1(6)
112 #define M_SYNCSER_TX_CRCERR _SB_MAKEMASK1(8)
113 #define M_SYNCSER_TX_UNDERRUN _SB_MAKEMASK1(9)
114 #define M_SYNCSER_TX_SYNC_ERR _SB_MAKEMASK1(10)
115 #define M_SYNCSER_TX_PAUSE_COMPLETE _SB_MAKEMASK1(11)
116 #define M_SYNCSER_RX_EOP_COUNT _SB_MAKEMASK1(16)
117 #define M_SYNCSER_RX_EOP_TIMER _SB_MAKEMASK1(17)
118 #define M_SYNCSER_RX_EOP_SEEN _SB_MAKEMASK1(18)
119 #define M_SYNCSER_RX_HWM _SB_MAKEMASK1(19)
120 #define M_SYNCSER_RX_LWM _SB_MAKEMASK1(20)
121 #define M_SYNCSER_RX_DSCR _SB_MAKEMASK1(21)
122 #define M_SYNCSER_RX_DERR _SB_MAKEMASK1(22)
123 #define M_SYNCSER_TX_EOP_COUNT _SB_MAKEMASK1(24)
124 #define M_SYNCSER_TX_EOP_TIMER _SB_MAKEMASK1(25)
125 #define M_SYNCSER_TX_EOP_SEEN _SB_MAKEMASK1(26)
126 #define M_SYNCSER_TX_HWM _SB_MAKEMASK1(27)
127 #define M_SYNCSER_TX_LWM _SB_MAKEMASK1(28)
128 #define M_SYNCSER_TX_DSCR _SB_MAKEMASK1(29)
129 #define M_SYNCSER_TX_DERR _SB_MAKEMASK1(30)
130 #define M_SYNCSER_TX_DZERO _SB_MAKEMASK1(31)
133 * Sequencer Table Entry format
136 #define M_SYNCSER_SEQ_LAST _SB_MAKEMASK1(0)
137 #define M_SYNCSER_SEQ_BYTE _SB_MAKEMASK1(1)
139 #define S_SYNCSER_SEQ_COUNT 2
140 #define M_SYNCSER_SEQ_COUNT _SB_MAKEMASK(4, S_SYNCSER_SEQ_COUNT)
141 #define V_SYNCSER_SEQ_COUNT(x) _SB_MAKEVALUE(x, S_SYNCSER_SEQ_COUNT)
143 #define M_SYNCSER_SEQ_ENABLE _SB_MAKEMASK1(6)
144 #define M_SYNCSER_SEQ_STROBE _SB_MAKEMASK1(7)
146 #endif