diff options
Diffstat (limited to 'include/asm-mips/sibyte/sb1250_syncser.h')
-rw-r--r-- | include/asm-mips/sibyte/sb1250_syncser.h | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/include/asm-mips/sibyte/sb1250_syncser.h b/include/asm-mips/sibyte/sb1250_syncser.h new file mode 100644 index 000000000000..8d5e8edd3c4b --- /dev/null +++ b/include/asm-mips/sibyte/sb1250_syncser.h | |||
@@ -0,0 +1,148 @@ | |||
1 | /* ********************************************************************* | ||
2 | * SB1250 Board Support Package | ||
3 | * | ||
4 | * Synchronous Serial Constants File: sb1250_syncser.h | ||
5 | * | ||
6 | * This module contains constants and macros useful for | ||
7 | * manipulating the SB1250's Synchronous Serial | ||
8 | * | ||
9 | * SB1250 specification level: User's manual 1/02/02 | ||
10 | * | ||
11 | * Author: Mitch Lichtenberg | ||
12 | * | ||
13 | ********************************************************************* | ||
14 | * | ||
15 | * Copyright 2000,2001,2002,2003 | ||
16 | * Broadcom Corporation. All rights reserved. | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or | ||
19 | * modify it under the terms of the GNU General Public License as | ||
20 | * published by the Free Software Foundation; either version 2 of | ||
21 | * the License, or (at your option) any later version. | ||
22 | * | ||
23 | * This program is distributed in the hope that it will be useful, | ||
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
26 | * GNU General Public License for more details. | ||
27 | * | ||
28 | * You should have received a copy of the GNU General Public License | ||
29 | * along with this program; if not, write to the Free Software | ||
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
31 | * MA 02111-1307 USA | ||
32 | ********************************************************************* */ | ||
33 | |||
34 | |||
35 | #ifndef _SB1250_SYNCSER_H | ||
36 | #define _SB1250_SYNCSER_H | ||
37 | |||
38 | #include "sb1250_defs.h" | ||
39 | |||
40 | /* | ||
41 | * Serial Mode Configuration Register | ||
42 | */ | ||
43 | |||
44 | #define M_SYNCSER_CRC_MODE _SB_MAKEMASK1(0) | ||
45 | #define M_SYNCSER_MSB_FIRST _SB_MAKEMASK1(1) | ||
46 | |||
47 | #define S_SYNCSER_FLAG_NUM 2 | ||
48 | #define M_SYNCSER_FLAG_NUM _SB_MAKEMASK(4,S_SYNCSER_FLAG_NUM) | ||
49 | #define V_SYNCSER_FLAG_NUM _SB_MAKEVALUE(x,S_SYNCSER_FLAG_NUM) | ||
50 | |||
51 | #define M_SYNCSER_FLAG_EN _SB_MAKEMASK1(6) | ||
52 | #define M_SYNCSER_HDLC_EN _SB_MAKEMASK1(7) | ||
53 | #define M_SYNCSER_LOOP_MODE _SB_MAKEMASK1(8) | ||
54 | #define M_SYNCSER_LOOPBACK _SB_MAKEMASK1(9) | ||
55 | |||
56 | /* | ||
57 | * Serial Clock Source and Line Interface Mode Register | ||
58 | */ | ||
59 | |||
60 | #define M_SYNCSER_RXCLK_INV _SB_MAKEMASK1(0) | ||
61 | #define M_SYNCSER_RXCLK_EXT _SB_MAKEMASK1(1) | ||
62 | |||
63 | #define S_SYNCSER_RXSYNC_DLY 2 | ||
64 | #define M_SYNCSER_RXSYNC_DLY _SB_MAKEMASK(2,S_SYNCSER_RXSYNC_DLY) | ||
65 | #define V_SYNCSER_RXSYNC_DLY(x) _SB_MAKEVALUE(x,S_SYNCSER_RXSYNC_DLY) | ||
66 | |||
67 | #define M_SYNCSER_RXSYNC_LOW _SB_MAKEMASK1(4) | ||
68 | #define M_SYNCSER_RXSTRB_LOW _SB_MAKEMASK1(5) | ||
69 | |||
70 | #define M_SYNCSER_RXSYNC_EDGE _SB_MAKEMASK1(6) | ||
71 | #define M_SYNCSER_RXSYNC_INT _SB_MAKEMASK1(7) | ||
72 | |||
73 | #define M_SYNCSER_TXCLK_INV _SB_MAKEMASK1(8) | ||
74 | #define M_SYNCSER_TXCLK_EXT _SB_MAKEMASK1(9) | ||
75 | |||
76 | #define S_SYNCSER_TXSYNC_DLY 10 | ||
77 | #define M_SYNCSER_TXSYNC_DLY _SB_MAKEMASK(2,S_SYNCSER_TXSYNC_DLY) | ||
78 | #define V_SYNCSER_TXSYNC_DLY(x) _SB_MAKEVALUE(x,S_SYNCSER_TXSYNC_DLY) | ||
79 | |||
80 | #define M_SYNCSER_TXSYNC_LOW _SB_MAKEMASK1(12) | ||
81 | #define M_SYNCSER_TXSTRB_LOW _SB_MAKEMASK1(13) | ||
82 | |||
83 | #define M_SYNCSER_TXSYNC_EDGE _SB_MAKEMASK1(14) | ||
84 | #define M_SYNCSER_TXSYNC_INT _SB_MAKEMASK1(15) | ||
85 | |||
86 | /* | ||
87 | * Serial Command Register | ||
88 | */ | ||
89 | |||
90 | #define M_SYNCSER_CMD_RX_EN _SB_MAKEMASK1(0) | ||
91 | #define M_SYNCSER_CMD_TX_EN _SB_MAKEMASK1(1) | ||
92 | #define M_SYNCSER_CMD_RX_RESET _SB_MAKEMASK1(2) | ||
93 | #define M_SYNCSER_CMD_TX_RESET _SB_MAKEMASK1(3) | ||
94 | #define M_SYNCSER_CMD_TX_PAUSE _SB_MAKEMASK1(5) | ||
95 | |||
96 | /* | ||
97 | * Serial DMA Enable Register | ||
98 | */ | ||
99 | |||
100 | #define M_SYNCSER_DMA_RX_EN _SB_MAKEMASK1(0) | ||
101 | #define M_SYNCSER_DMA_TX_EN _SB_MAKEMASK1(4) | ||
102 | |||
103 | /* | ||
104 | * Serial Status Register | ||
105 | */ | ||
106 | |||
107 | #define M_SYNCSER_RX_CRCERR _SB_MAKEMASK1(0) | ||
108 | #define M_SYNCSER_RX_ABORT _SB_MAKEMASK1(1) | ||
109 | #define M_SYNCSER_RX_OCTET _SB_MAKEMASK1(2) | ||
110 | #define M_SYNCSER_RX_LONGFRM _SB_MAKEMASK1(3) | ||
111 | #define M_SYNCSER_RX_SHORTFRM _SB_MAKEMASK1(4) | ||
112 | #define M_SYNCSER_RX_OVERRUN _SB_MAKEMASK1(5) | ||
113 | #define M_SYNCSER_RX_SYNC_ERR _SB_MAKEMASK1(6) | ||
114 | #define M_SYNCSER_TX_CRCERR _SB_MAKEMASK1(8) | ||
115 | #define M_SYNCSER_TX_UNDERRUN _SB_MAKEMASK1(9) | ||
116 | #define M_SYNCSER_TX_SYNC_ERR _SB_MAKEMASK1(10) | ||
117 | #define M_SYNCSER_TX_PAUSE_COMPLETE _SB_MAKEMASK1(11) | ||
118 | #define M_SYNCSER_RX_EOP_COUNT _SB_MAKEMASK1(16) | ||
119 | #define M_SYNCSER_RX_EOP_TIMER _SB_MAKEMASK1(17) | ||
120 | #define M_SYNCSER_RX_EOP_SEEN _SB_MAKEMASK1(18) | ||
121 | #define M_SYNCSER_RX_HWM _SB_MAKEMASK1(19) | ||
122 | #define M_SYNCSER_RX_LWM _SB_MAKEMASK1(20) | ||
123 | #define M_SYNCSER_RX_DSCR _SB_MAKEMASK1(21) | ||
124 | #define M_SYNCSER_RX_DERR _SB_MAKEMASK1(22) | ||
125 | #define M_SYNCSER_TX_EOP_COUNT _SB_MAKEMASK1(24) | ||
126 | #define M_SYNCSER_TX_EOP_TIMER _SB_MAKEMASK1(25) | ||
127 | #define M_SYNCSER_TX_EOP_SEEN _SB_MAKEMASK1(26) | ||
128 | #define M_SYNCSER_TX_HWM _SB_MAKEMASK1(27) | ||
129 | #define M_SYNCSER_TX_LWM _SB_MAKEMASK1(28) | ||
130 | #define M_SYNCSER_TX_DSCR _SB_MAKEMASK1(29) | ||
131 | #define M_SYNCSER_TX_DERR _SB_MAKEMASK1(30) | ||
132 | #define M_SYNCSER_TX_DZERO _SB_MAKEMASK1(31) | ||
133 | |||
134 | /* | ||
135 | * Sequencer Table Entry format | ||
136 | */ | ||
137 | |||
138 | #define M_SYNCSER_SEQ_LAST _SB_MAKEMASK1(0) | ||
139 | #define M_SYNCSER_SEQ_BYTE _SB_MAKEMASK1(1) | ||
140 | |||
141 | #define S_SYNCSER_SEQ_COUNT 2 | ||
142 | #define M_SYNCSER_SEQ_COUNT _SB_MAKEMASK(4,S_SYNCSER_SEQ_COUNT) | ||
143 | #define V_SYNCSER_SEQ_COUNT(x) _SB_MAKEVALUE(x,S_SYNCSER_SEQ_COUNT) | ||
144 | |||
145 | #define M_SYNCSER_SEQ_ENABLE _SB_MAKEMASK1(6) | ||
146 | #define M_SYNCSER_SEQ_STROBE _SB_MAKEMASK1(7) | ||
147 | |||
148 | #endif | ||