diff options
author | Andrew Morton <akpm@osdl.org> | 2006-01-11 15:17:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 21:42:14 -0500 |
commit | 8d8706e2f86d28814c1b40a116ffdeca35e4c949 (patch) | |
tree | 146567d7a807feb37a5368fbb4a6ee76d9d7bc7e /drivers/char/rio/phb.h | |
parent | a9415644583ef344e02f84faf5fe24bfadb2af8e (diff) |
[PATCH] lindent rio drivers
Run all rio files through indent -kr -i8 -bri0 -l255, as requested by Alan.
rioboot.c and rioinit.c were skipped due to worrisome lindent warnings.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/rio/phb.h')
-rw-r--r-- | drivers/char/rio/phb.h | 285 |
1 files changed, 137 insertions, 148 deletions
diff --git a/drivers/char/rio/phb.h b/drivers/char/rio/phb.h index e1483a0e30bd..3baebf8513af 100644 --- a/drivers/char/rio/phb.h +++ b/drivers/char/rio/phb.h | |||
@@ -58,37 +58,37 @@ | |||
58 | /************************************************* | 58 | /************************************************* |
59 | * Handshake asserted. Deasserted by the LTT(s) | 59 | * Handshake asserted. Deasserted by the LTT(s) |
60 | ************************************************/ | 60 | ************************************************/ |
61 | #define PHB_HANDSHAKE_SET ((ushort) 0x001) /* Set by LRT */ | 61 | #define PHB_HANDSHAKE_SET ((ushort) 0x001) /* Set by LRT */ |
62 | 62 | ||
63 | #define PHB_HANDSHAKE_RESET ((ushort) 0x002) /* Set by ISR / driver */ | 63 | #define PHB_HANDSHAKE_RESET ((ushort) 0x002) /* Set by ISR / driver */ |
64 | 64 | ||
65 | #define PHB_HANDSHAKE_FLAGS (PHB_HANDSHAKE_RESET | PHB_HANDSHAKE_SET) | 65 | #define PHB_HANDSHAKE_FLAGS (PHB_HANDSHAKE_RESET | PHB_HANDSHAKE_SET) |
66 | /* Reset by ltt */ | 66 | /* Reset by ltt */ |
67 | 67 | ||
68 | 68 | ||
69 | /************************************************* | 69 | /************************************************* |
70 | * Maximum number of PHB's | 70 | * Maximum number of PHB's |
71 | ************************************************/ | 71 | ************************************************/ |
72 | #if defined (HOST) || defined (INKERNEL) | 72 | #if defined (HOST) || defined (INKERNEL) |
73 | #define MAX_PHB ((ushort) 128) /* range 0-127 */ | 73 | #define MAX_PHB ((ushort) 128) /* range 0-127 */ |
74 | #else | 74 | #else |
75 | #define MAX_PHB ((ushort) 8) /* range 0-7 */ | 75 | #define MAX_PHB ((ushort) 8) /* range 0-7 */ |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | /************************************************* | 78 | /************************************************* |
79 | * Defines for the mode fields | 79 | * Defines for the mode fields |
80 | ************************************************/ | 80 | ************************************************/ |
81 | #define TXPKT_INCOMPLETE 0x0001 /* Previous tx packet not completed */ | 81 | #define TXPKT_INCOMPLETE 0x0001 /* Previous tx packet not completed */ |
82 | #define TXINTR_ENABLED 0x0002 /* Tx interrupt is enabled */ | 82 | #define TXINTR_ENABLED 0x0002 /* Tx interrupt is enabled */ |
83 | #define TX_TAB3 0x0004 /* TAB3 mode */ | 83 | #define TX_TAB3 0x0004 /* TAB3 mode */ |
84 | #define TX_OCRNL 0x0008 /* OCRNL mode */ | 84 | #define TX_OCRNL 0x0008 /* OCRNL mode */ |
85 | #define TX_ONLCR 0x0010 /* ONLCR mode */ | 85 | #define TX_ONLCR 0x0010 /* ONLCR mode */ |
86 | #define TX_SENDSPACES 0x0020 /* Send n spaces command needs | 86 | #define TX_SENDSPACES 0x0020 /* Send n spaces command needs |
87 | completing */ | 87 | completing */ |
88 | #define TX_SENDNULL 0x0040 /* Escaping NULL needs completing */ | 88 | #define TX_SENDNULL 0x0040 /* Escaping NULL needs completing */ |
89 | #define TX_SENDLF 0x0080 /* LF -> CR LF needs completing */ | 89 | #define TX_SENDLF 0x0080 /* LF -> CR LF needs completing */ |
90 | #define TX_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel | 90 | #define TX_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel |
91 | port */ | 91 | port */ |
92 | #define TX_HANGOVER (TX_SENDSPACES | TX_SENDLF | TX_SENDNULL) | 92 | #define TX_HANGOVER (TX_SENDSPACES | TX_SENDLF | TX_SENDNULL) |
93 | #define TX_DTRFLOW 0x0200 /* DTR tx flow control */ | 93 | #define TX_DTRFLOW 0x0200 /* DTR tx flow control */ |
94 | #define TX_DTRFLOWED 0x0400 /* DTR is low - don't allow more data | 94 | #define TX_DTRFLOWED 0x0400 /* DTR is low - don't allow more data |
@@ -96,34 +96,34 @@ | |||
96 | #define TX_DATAINFIFO 0x0800 /* There is data in the FIFO */ | 96 | #define TX_DATAINFIFO 0x0800 /* There is data in the FIFO */ |
97 | #define TX_BUSY 0x1000 /* Data in FIFO, shift or holding regs */ | 97 | #define TX_BUSY 0x1000 /* Data in FIFO, shift or holding regs */ |
98 | 98 | ||
99 | #define RX_SPARE 0x0001 /* SPARE */ | 99 | #define RX_SPARE 0x0001 /* SPARE */ |
100 | #define RXINTR_ENABLED 0x0002 /* Rx interrupt enabled */ | 100 | #define RXINTR_ENABLED 0x0002 /* Rx interrupt enabled */ |
101 | #define RX_ICRNL 0x0008 /* ICRNL mode */ | 101 | #define RX_ICRNL 0x0008 /* ICRNL mode */ |
102 | #define RX_INLCR 0x0010 /* INLCR mode */ | 102 | #define RX_INLCR 0x0010 /* INLCR mode */ |
103 | #define RX_IGNCR 0x0020 /* IGNCR mode */ | 103 | #define RX_IGNCR 0x0020 /* IGNCR mode */ |
104 | #define RX_CTSFLOW 0x0040 /* CTSFLOW enabled */ | 104 | #define RX_CTSFLOW 0x0040 /* CTSFLOW enabled */ |
105 | #define RX_IXOFF 0x0080 /* IXOFF enabled */ | 105 | #define RX_IXOFF 0x0080 /* IXOFF enabled */ |
106 | #define RX_CTSFLOWED 0x0100 /* CTSFLOW and CTS dropped */ | 106 | #define RX_CTSFLOWED 0x0100 /* CTSFLOW and CTS dropped */ |
107 | #define RX_IXOFFED 0x0200 /* IXOFF and xoff sent */ | 107 | #define RX_IXOFFED 0x0200 /* IXOFF and xoff sent */ |
108 | #define RX_BUFFERED 0x0400 /* Try and pass on complete packets */ | 108 | #define RX_BUFFERED 0x0400 /* Try and pass on complete packets */ |
109 | 109 | ||
110 | #define PORT_ISOPEN 0x0001 /* Port open? */ | 110 | #define PORT_ISOPEN 0x0001 /* Port open? */ |
111 | #define PORT_HUPCL 0x0002 /* Hangup on close? */ | 111 | #define PORT_HUPCL 0x0002 /* Hangup on close? */ |
112 | #define PORT_MOPENPEND 0x0004 /* Modem open pending */ | 112 | #define PORT_MOPENPEND 0x0004 /* Modem open pending */ |
113 | #define PORT_ISPARALLEL 0x0008 /* Parallel port */ | 113 | #define PORT_ISPARALLEL 0x0008 /* Parallel port */ |
114 | #define PORT_BREAK 0x0010 /* Port on break */ | 114 | #define PORT_BREAK 0x0010 /* Port on break */ |
115 | #define PORT_STATUSPEND 0x0020 /* Status packet pending */ | 115 | #define PORT_STATUSPEND 0x0020 /* Status packet pending */ |
116 | #define PORT_BREAKPEND 0x0040 /* Break packet pending */ | 116 | #define PORT_BREAKPEND 0x0040 /* Break packet pending */ |
117 | #define PORT_MODEMPEND 0x0080 /* Modem status packet pending */ | 117 | #define PORT_MODEMPEND 0x0080 /* Modem status packet pending */ |
118 | #define PORT_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel | 118 | #define PORT_PARALLELBUG 0x0100 /* CD1400 LF -> CR LF bug on parallel |
119 | port */ | 119 | port */ |
120 | #define PORT_FULLMODEM 0x0200 /* Full modem signals */ | 120 | #define PORT_FULLMODEM 0x0200 /* Full modem signals */ |
121 | #define PORT_RJ45 0x0400 /* RJ45 connector - no RI signal */ | 121 | #define PORT_RJ45 0x0400 /* RJ45 connector - no RI signal */ |
122 | #define PORT_RESTRICTED 0x0600 /* Restricted connector - no RI / DTR */ | 122 | #define PORT_RESTRICTED 0x0600 /* Restricted connector - no RI / DTR */ |
123 | 123 | ||
124 | #define PORT_MODEMBITS 0x0600 /* Mask for modem fields */ | 124 | #define PORT_MODEMBITS 0x0600 /* Mask for modem fields */ |
125 | 125 | ||
126 | #define PORT_WCLOSE 0x0800 /* Waiting for close */ | 126 | #define PORT_WCLOSE 0x0800 /* Waiting for close */ |
127 | #define PORT_HANDSHAKEFIX 0x1000 /* Port has H/W flow control fix */ | 127 | #define PORT_HANDSHAKEFIX 0x1000 /* Port has H/W flow control fix */ |
128 | #define PORT_WASPCLOSED 0x2000 /* Port closed with PCLOSE */ | 128 | #define PORT_WASPCLOSED 0x2000 /* Port closed with PCLOSE */ |
129 | #define DUMPMODE 0x4000 /* Dump RTA mem */ | 129 | #define DUMPMODE 0x4000 /* Dump RTA mem */ |
@@ -155,139 +155,128 @@ | |||
155 | #define rx_end u4.s1.rx_end_ptr_ptr | 155 | #define rx_end u4.s1.rx_end_ptr_ptr |
156 | #define rx_remove u4.s1.rx_remove_ptr_ptr | 156 | #define rx_remove u4.s1.rx_remove_ptr_ptr |
157 | #endif | 157 | #endif |
158 | typedef struct PHB PHB ; | 158 | typedef struct PHB PHB; |
159 | struct PHB { | 159 | struct PHB { |
160 | #ifdef RTA | 160 | #ifdef RTA |
161 | ushort port; | 161 | ushort port; |
162 | #endif | 162 | #endif |
163 | #ifdef INKERNEL | 163 | #ifdef INKERNEL |
164 | WORD source; | 164 | WORD source; |
165 | #else | 165 | #else |
166 | union | 166 | union { |
167 | { | 167 | ushort source; /* Complete source */ |
168 | ushort source; /* Complete source */ | 168 | struct { |
169 | struct | 169 | unsigned char unit; /* Source unit */ |
170 | { | 170 | unsigned char port; /* Source port */ |
171 | unsigned char unit; /* Source unit */ | 171 | } s2; |
172 | unsigned char port; /* Source port */ | 172 | } u2; |
173 | } s2; | ||
174 | } u2; | ||
175 | #endif | 173 | #endif |
176 | WORD handshake ; | 174 | WORD handshake; |
177 | WORD status ; | 175 | WORD status; |
178 | NUMBER timeout ; /* Maximum of 1.9 seconds */ | 176 | NUMBER timeout; /* Maximum of 1.9 seconds */ |
179 | WORD link ; /* Send down this link */ | 177 | WORD link; /* Send down this link */ |
180 | #ifdef INKERNEL | 178 | #ifdef INKERNEL |
181 | WORD destination; | 179 | WORD destination; |
182 | #else | 180 | #else |
183 | union | 181 | union { |
184 | { | 182 | ushort destination; /* Complete destination */ |
185 | ushort destination; /* Complete destination */ | 183 | struct { |
186 | struct | 184 | unsigned char unit; /* Destination unit */ |
187 | { | 185 | unsigned char port; /* Destination port */ |
188 | unsigned char unit; /* Destination unit */ | 186 | } s1; |
189 | unsigned char port; /* Destination port */ | 187 | } u1; |
190 | } s1; | ||
191 | } u1; | ||
192 | #endif | 188 | #endif |
193 | #ifdef RTA | 189 | #ifdef RTA |
194 | ushort tx_pkts_added; | 190 | ushort tx_pkts_added; |
195 | ushort tx_pkts_removed; | 191 | ushort tx_pkts_removed; |
196 | Q_BUF_ptr tx_q_start ; /* Start of the Q list chain */ | 192 | Q_BUF_ptr tx_q_start; /* Start of the Q list chain */ |
197 | short num_tx_q_bufs ; /* Number of Q buffers in the chain */ | 193 | short num_tx_q_bufs; /* Number of Q buffers in the chain */ |
198 | PKT_ptr_ptr tx_add ; /* Add a new Packet here */ | 194 | PKT_ptr_ptr tx_add; /* Add a new Packet here */ |
199 | Q_BUF_ptr tx_add_qb; /* Pointer to the add Q buf */ | 195 | Q_BUF_ptr tx_add_qb; /* Pointer to the add Q buf */ |
200 | PKT_ptr_ptr tx_add_st_qbb ; /* Pointer to start of the Q's buf */ | 196 | PKT_ptr_ptr tx_add_st_qbb; /* Pointer to start of the Q's buf */ |
201 | PKT_ptr_ptr tx_add_end_qbb ; /* Pointer to the end of the Q's buf */ | 197 | PKT_ptr_ptr tx_add_end_qbb; /* Pointer to the end of the Q's buf */ |
202 | PKT_ptr_ptr tx_remove ; /* Remove a Packet here */ | 198 | PKT_ptr_ptr tx_remove; /* Remove a Packet here */ |
203 | Q_BUF_ptr tx_remove_qb ; /* Pointer to the remove Q buf */ | 199 | Q_BUF_ptr tx_remove_qb; /* Pointer to the remove Q buf */ |
204 | PKT_ptr_ptr tx_remove_st_qbb ; /* Pointer to the start of the Q buf */ | 200 | PKT_ptr_ptr tx_remove_st_qbb; /* Pointer to the start of the Q buf */ |
205 | PKT_ptr_ptr tx_remove_end_qbb ; /* Pointer to the end of the Q buf */ | 201 | PKT_ptr_ptr tx_remove_end_qbb; /* Pointer to the end of the Q buf */ |
206 | #endif | 202 | #endif |
207 | #ifdef INKERNEL | 203 | #ifdef INKERNEL |
208 | PKT_ptr_ptr tx_start ; | 204 | PKT_ptr_ptr tx_start; |
209 | PKT_ptr_ptr tx_end ; | 205 | PKT_ptr_ptr tx_end; |
210 | PKT_ptr_ptr tx_add ; | 206 | PKT_ptr_ptr tx_add; |
211 | PKT_ptr_ptr tx_remove ; | 207 | PKT_ptr_ptr tx_remove; |
212 | #endif | 208 | #endif |
213 | #ifdef HOST | 209 | #ifdef HOST |
214 | union | 210 | union { |
215 | { | 211 | struct { |
216 | struct | 212 | PKT_ptr_ptr tx_start_ptr_ptr; |
217 | { | 213 | PKT_ptr_ptr tx_end_ptr_ptr; |
218 | PKT_ptr_ptr tx_start_ptr_ptr; | 214 | PKT_ptr_ptr tx_add_ptr_ptr; |
219 | PKT_ptr_ptr tx_end_ptr_ptr; | 215 | PKT_ptr_ptr tx_remove_ptr_ptr; |
220 | PKT_ptr_ptr tx_add_ptr_ptr; | 216 | } s1; |
221 | PKT_ptr_ptr tx_remove_ptr_ptr; | 217 | struct { |
222 | } s1; | 218 | ushort *tx_start_ptr; |
223 | struct | 219 | ushort *tx_end_ptr; |
224 | { | 220 | ushort *tx_add_ptr; |
225 | ushort * tx_start_ptr; | 221 | ushort *tx_remove_ptr; |
226 | ushort * tx_end_ptr; | 222 | } s2; |
227 | ushort * tx_add_ptr; | 223 | } u3; |
228 | ushort * tx_remove_ptr; | ||
229 | } s2; | ||
230 | } u3; | ||
231 | #endif | 224 | #endif |
232 | 225 | ||
233 | #ifdef RTA | 226 | #ifdef RTA |
234 | ushort rx_pkts_added; | 227 | ushort rx_pkts_added; |
235 | ushort rx_pkts_removed; | 228 | ushort rx_pkts_removed; |
236 | Q_BUF_ptr rx_q_start ; /* Start of the Q list chain */ | 229 | Q_BUF_ptr rx_q_start; /* Start of the Q list chain */ |
237 | short num_rx_q_bufs ; /* Number of Q buffers in the chain */ | 230 | short num_rx_q_bufs; /* Number of Q buffers in the chain */ |
238 | PKT_ptr_ptr rx_add ; /* Add a new Packet here */ | 231 | PKT_ptr_ptr rx_add; /* Add a new Packet here */ |
239 | Q_BUF_ptr rx_add_qb ; /* Pointer to the add Q buf */ | 232 | Q_BUF_ptr rx_add_qb; /* Pointer to the add Q buf */ |
240 | PKT_ptr_ptr rx_add_st_qbb ; /* Pointer to start of the Q's buf */ | 233 | PKT_ptr_ptr rx_add_st_qbb; /* Pointer to start of the Q's buf */ |
241 | PKT_ptr_ptr rx_add_end_qbb ; /* Pointer to the end of the Q's buf */ | 234 | PKT_ptr_ptr rx_add_end_qbb; /* Pointer to the end of the Q's buf */ |
242 | PKT_ptr_ptr rx_remove ; /* Remove a Packet here */ | 235 | PKT_ptr_ptr rx_remove; /* Remove a Packet here */ |
243 | Q_BUF_ptr rx_remove_qb ; /* Pointer to the remove Q buf */ | 236 | Q_BUF_ptr rx_remove_qb; /* Pointer to the remove Q buf */ |
244 | PKT_ptr_ptr rx_remove_st_qbb ; /* Pointer to the start of the Q buf */ | 237 | PKT_ptr_ptr rx_remove_st_qbb; /* Pointer to the start of the Q buf */ |
245 | PKT_ptr_ptr rx_remove_end_qbb ; /* Pointer to the end of the Q buf */ | 238 | PKT_ptr_ptr rx_remove_end_qbb; /* Pointer to the end of the Q buf */ |
246 | #endif | 239 | #endif |
247 | #ifdef INKERNEL | 240 | #ifdef INKERNEL |
248 | PKT_ptr_ptr rx_start ; | 241 | PKT_ptr_ptr rx_start; |
249 | PKT_ptr_ptr rx_end ; | 242 | PKT_ptr_ptr rx_end; |
250 | PKT_ptr_ptr rx_add ; | 243 | PKT_ptr_ptr rx_add; |
251 | PKT_ptr_ptr rx_remove ; | 244 | PKT_ptr_ptr rx_remove; |
252 | #endif | 245 | #endif |
253 | #ifdef HOST | 246 | #ifdef HOST |
254 | union | 247 | union { |
255 | { | 248 | struct { |
256 | struct | 249 | PKT_ptr_ptr rx_start_ptr_ptr; |
257 | { | 250 | PKT_ptr_ptr rx_end_ptr_ptr; |
258 | PKT_ptr_ptr rx_start_ptr_ptr; | 251 | PKT_ptr_ptr rx_add_ptr_ptr; |
259 | PKT_ptr_ptr rx_end_ptr_ptr; | 252 | PKT_ptr_ptr rx_remove_ptr_ptr; |
260 | PKT_ptr_ptr rx_add_ptr_ptr; | 253 | } s1; |
261 | PKT_ptr_ptr rx_remove_ptr_ptr; | 254 | struct { |
262 | } s1; | 255 | ushort *rx_start_ptr; |
263 | struct | 256 | ushort *rx_end_ptr; |
264 | { | 257 | ushort *rx_add_ptr; |
265 | ushort * rx_start_ptr; | 258 | ushort *rx_remove_ptr; |
266 | ushort * rx_end_ptr; | 259 | } s2; |
267 | ushort * rx_add_ptr; | 260 | } u4; |
268 | ushort * rx_remove_ptr; | ||
269 | } s2; | ||
270 | } u4; | ||
271 | #endif | 261 | #endif |
272 | 262 | ||
273 | #ifdef RTA /* some fields for the remotes */ | 263 | #ifdef RTA /* some fields for the remotes */ |
274 | ushort flush_count; /* Count of write flushes */ | 264 | ushort flush_count; /* Count of write flushes */ |
275 | ushort txmode; /* Modes for tx */ | 265 | ushort txmode; /* Modes for tx */ |
276 | ushort rxmode; /* Modes for rx */ | 266 | ushort rxmode; /* Modes for rx */ |
277 | ushort portmode; /* Generic modes */ | 267 | ushort portmode; /* Generic modes */ |
278 | ushort column; /* TAB3 column count */ | 268 | ushort column; /* TAB3 column count */ |
279 | ushort tx_subscript; /* (TX) Subscript into data field */ | 269 | ushort tx_subscript; /* (TX) Subscript into data field */ |
280 | ushort rx_subscript; /* (RX) Subscript into data field */ | 270 | ushort rx_subscript; /* (RX) Subscript into data field */ |
281 | PKT_ptr rx_incomplete; /* Hold an incomplete packet here */ | 271 | PKT_ptr rx_incomplete; /* Hold an incomplete packet here */ |
282 | ushort modem_bits; /* Modem bits to mask */ | 272 | ushort modem_bits; /* Modem bits to mask */ |
283 | ushort lastModem; /* Modem control lines. */ | 273 | ushort lastModem; /* Modem control lines. */ |
284 | ushort addr; /* Address for sub commands */ | 274 | ushort addr; /* Address for sub commands */ |
285 | ushort MonitorTstate; /* TRUE if monitoring tstop */ | 275 | ushort MonitorTstate; /* TRUE if monitoring tstop */ |
286 | #endif | 276 | #endif |
287 | 277 | ||
288 | } ; | 278 | }; |
289 | 279 | ||
290 | #endif | 280 | #endif |
291 | 281 | ||
292 | /*********** end of file ***********/ | 282 | /*********** end of file ***********/ |
293 | |||