aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci.h
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-12-05 06:18:31 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-20 13:14:26 -0500
commitdd9048af41d017f5f9ea18fb451a3b5dc89d6b83 (patch)
treef205763d802ec27d06937bdd79dd598914ad7182 /drivers/usb/host/ohci.h
parent23d8c90e5691992a09ab113be2c1a81271b6d0d8 (diff)
USB: ohci whitespace/comment fixups
This is an OHCI cleanup patch ... it removes a lot of erroneous whitespace (space before tab, at end of line) as well as the obsolete inline changelog. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci.h')
-rw-r--r--drivers/usb/host/ohci.h86
1 files changed, 43 insertions, 43 deletions
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index fd93e7eca7bf..405257f3e853 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -1,9 +1,9 @@
1/* 1/*
2 * OHCI HCD (Host Controller Driver) for USB. 2 * OHCI HCD (Host Controller Driver) for USB.
3 * 3 *
4 * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> 4 * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
5 * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net> 5 * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
6 * 6 *
7 * This file is licenced under the GPL. 7 * This file is licenced under the GPL.
8 */ 8 */
9 9
@@ -14,7 +14,7 @@
14 */ 14 */
15typedef __u32 __bitwise __hc32; 15typedef __u32 __bitwise __hc32;
16typedef __u16 __bitwise __hc16; 16typedef __u16 __bitwise __hc16;
17 17
18/* 18/*
19 * OHCI Endpoint Descriptor (ED) ... holds TD queue 19 * OHCI Endpoint Descriptor (ED) ... holds TD queue
20 * See OHCI spec, section 4.2 20 * See OHCI spec, section 4.2
@@ -24,7 +24,7 @@ typedef __u16 __bitwise __hc16;
24 */ 24 */
25struct ed { 25struct ed {
26 /* first fields are hardware-specified */ 26 /* first fields are hardware-specified */
27 __hc32 hwINFO; /* endpoint config bitmap */ 27 __hc32 hwINFO; /* endpoint config bitmap */
28 /* info bits defined by hcd */ 28 /* info bits defined by hcd */
29#define ED_DEQUEUE (1 << 27) 29#define ED_DEQUEUE (1 << 27)
30 /* info bits defined by the hardware */ 30 /* info bits defined by the hardware */
@@ -52,11 +52,11 @@ struct ed {
52 * usually: OPER --> UNLINK --> (IDLE | OPER) --> ... 52 * usually: OPER --> UNLINK --> (IDLE | OPER) --> ...
53 */ 53 */
54 u8 state; /* ED_{IDLE,UNLINK,OPER} */ 54 u8 state; /* ED_{IDLE,UNLINK,OPER} */
55#define ED_IDLE 0x00 /* NOT linked to HC */ 55#define ED_IDLE 0x00 /* NOT linked to HC */
56#define ED_UNLINK 0x01 /* being unlinked from hc */ 56#define ED_UNLINK 0x01 /* being unlinked from hc */
57#define ED_OPER 0x02 /* IS linked to hc */ 57#define ED_OPER 0x02 /* IS linked to hc */
58 58
59 u8 type; /* PIPE_{BULK,...} */ 59 u8 type; /* PIPE_{BULK,...} */
60 60
61 /* periodic scheduling params (for intr and iso) */ 61 /* periodic scheduling params (for intr and iso) */
62 u8 branch; 62 u8 branch;
@@ -70,7 +70,7 @@ struct ed {
70 70
71#define ED_MASK ((u32)~0x0f) /* strip hw status in low addr bits */ 71#define ED_MASK ((u32)~0x0f) /* strip hw status in low addr bits */
72 72
73 73
74/* 74/*
75 * OHCI Transfer Descriptor (TD) ... one per transfer segment 75 * OHCI Transfer Descriptor (TD) ... one per transfer segment
76 * See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt) 76 * See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt)
@@ -107,22 +107,22 @@ struct td {
107 107
108 /* (no hwINFO #defines yet for iso tds) */ 108 /* (no hwINFO #defines yet for iso tds) */
109 109
110 __hc32 hwCBP; /* Current Buffer Pointer (or 0) */ 110 __hc32 hwCBP; /* Current Buffer Pointer (or 0) */
111 __hc32 hwNextTD; /* Next TD Pointer */ 111 __hc32 hwNextTD; /* Next TD Pointer */
112 __hc32 hwBE; /* Memory Buffer End Pointer */ 112 __hc32 hwBE; /* Memory Buffer End Pointer */
113 113
114 /* PSW is only for ISO. Only 1 PSW entry is used, but on 114 /* PSW is only for ISO. Only 1 PSW entry is used, but on
115 * big-endian PPC hardware that's the second entry. 115 * big-endian PPC hardware that's the second entry.
116 */ 116 */
117#define MAXPSW 2 117#define MAXPSW 2
118 __hc16 hwPSW [MAXPSW]; 118 __hc16 hwPSW [MAXPSW];
119 119
120 /* rest are purely for the driver's use */ 120 /* rest are purely for the driver's use */
121 __u8 index; 121 __u8 index;
122 struct ed *ed; 122 struct ed *ed;
123 struct td *td_hash; /* dma-->td hashtable */ 123 struct td *td_hash; /* dma-->td hashtable */
124 struct td *next_dl_td; 124 struct td *next_dl_td;
125 struct urb *urb; 125 struct urb *urb;
126 126
127 dma_addr_t td_dma; /* addr of this TD */ 127 dma_addr_t td_dma; /* addr of this TD */
128 dma_addr_t data_dma; /* addr of data it points to */ 128 dma_addr_t data_dma; /* addr of data it points to */
@@ -152,8 +152,8 @@ struct td {
152#define TD_NOTACCESSED 0x0F 152#define TD_NOTACCESSED 0x0F
153 153
154 154
155/* map OHCI TD status codes (CC) to errno values */ 155/* map OHCI TD status codes (CC) to errno values */
156static const int cc_to_error [16] = { 156static const int cc_to_error [16] = {
157 /* No Error */ 0, 157 /* No Error */ 0,
158 /* CRC Error */ -EILSEQ, 158 /* CRC Error */ -EILSEQ,
159 /* Bit Stuff */ -EPROTO, 159 /* Bit Stuff */ -EPROTO,
@@ -169,7 +169,7 @@ static const int cc_to_error [16] = {
169 /* BufferOver */ -ECOMM, 169 /* BufferOver */ -ECOMM,
170 /* BuffUnder */ -ENOSR, 170 /* BuffUnder */ -ENOSR,
171 /* (for HCD) */ -EALREADY, 171 /* (for HCD) */ -EALREADY,
172 /* (for HCD) */ -EALREADY 172 /* (for HCD) */ -EALREADY
173}; 173};
174 174
175 175
@@ -182,7 +182,7 @@ struct ohci_hcca {
182#define NUM_INTS 32 182#define NUM_INTS 32
183 __hc32 int_table [NUM_INTS]; /* periodic schedule */ 183 __hc32 int_table [NUM_INTS]; /* periodic schedule */
184 184
185 /* 185 /*
186 * OHCI defines u16 frame_no, followed by u16 zero pad. 186 * OHCI defines u16 frame_no, followed by u16 zero pad.
187 * Since some processors can't do 16 bit bus accesses, 187 * Since some processors can't do 16 bit bus accesses,
188 * portable access must be a 32 bits wide. 188 * portable access must be a 32 bits wide.
@@ -262,10 +262,10 @@ struct ohci_regs {
262 * HcCommandStatus (cmdstatus) register masks 262 * HcCommandStatus (cmdstatus) register masks
263 */ 263 */
264#define OHCI_HCR (1 << 0) /* host controller reset */ 264#define OHCI_HCR (1 << 0) /* host controller reset */
265#define OHCI_CLF (1 << 1) /* control list filled */ 265#define OHCI_CLF (1 << 1) /* control list filled */
266#define OHCI_BLF (1 << 2) /* bulk list filled */ 266#define OHCI_BLF (1 << 2) /* bulk list filled */
267#define OHCI_OCR (1 << 3) /* ownership change request */ 267#define OHCI_OCR (1 << 3) /* ownership change request */
268#define OHCI_SOC (3 << 16) /* scheduling overrun count */ 268#define OHCI_SOC (3 << 16) /* scheduling overrun count */
269 269
270/* 270/*
271 * masks used with interrupt registers: 271 * masks used with interrupt registers:
@@ -285,20 +285,20 @@ struct ohci_regs {
285 285
286 286
287/* OHCI ROOT HUB REGISTER MASKS */ 287/* OHCI ROOT HUB REGISTER MASKS */
288 288
289/* roothub.portstatus [i] bits */ 289/* roothub.portstatus [i] bits */
290#define RH_PS_CCS 0x00000001 /* current connect status */ 290#define RH_PS_CCS 0x00000001 /* current connect status */
291#define RH_PS_PES 0x00000002 /* port enable status*/ 291#define RH_PS_PES 0x00000002 /* port enable status*/
292#define RH_PS_PSS 0x00000004 /* port suspend status */ 292#define RH_PS_PSS 0x00000004 /* port suspend status */
293#define RH_PS_POCI 0x00000008 /* port over current indicator */ 293#define RH_PS_POCI 0x00000008 /* port over current indicator */
294#define RH_PS_PRS 0x00000010 /* port reset status */ 294#define RH_PS_PRS 0x00000010 /* port reset status */
295#define RH_PS_PPS 0x00000100 /* port power status */ 295#define RH_PS_PPS 0x00000100 /* port power status */
296#define RH_PS_LSDA 0x00000200 /* low speed device attached */ 296#define RH_PS_LSDA 0x00000200 /* low speed device attached */
297#define RH_PS_CSC 0x00010000 /* connect status change */ 297#define RH_PS_CSC 0x00010000 /* connect status change */
298#define RH_PS_PESC 0x00020000 /* port enable status change */ 298#define RH_PS_PESC 0x00020000 /* port enable status change */
299#define RH_PS_PSSC 0x00040000 /* port suspend status change */ 299#define RH_PS_PSSC 0x00040000 /* port suspend status change */
300#define RH_PS_OCIC 0x00080000 /* over current indicator change */ 300#define RH_PS_OCIC 0x00080000 /* over current indicator change */
301#define RH_PS_PRSC 0x00100000 /* port reset status change */ 301#define RH_PS_PRSC 0x00100000 /* port reset status change */
302 302
303/* roothub.status bits */ 303/* roothub.status bits */
304#define RH_HS_LPS 0x00000001 /* local power status */ 304#define RH_HS_LPS 0x00000001 /* local power status */
@@ -333,7 +333,7 @@ typedef struct urb_priv {
333} urb_priv_t; 333} urb_priv_t;
334 334
335#define TD_HASH_SIZE 64 /* power'o'two */ 335#define TD_HASH_SIZE 64 /* power'o'two */
336// sizeof (struct td) ~= 64 == 2^6 ... 336// sizeof (struct td) ~= 64 == 2^6 ...
337#define TD_HASH_FUNC(td_dma) ((td_dma ^ (td_dma >> 6)) % TD_HASH_SIZE) 337#define TD_HASH_FUNC(td_dma) ((td_dma ^ (td_dma >> 6)) % TD_HASH_SIZE)
338 338
339 339
@@ -364,11 +364,11 @@ struct ohci_hcd {
364 364
365 struct ed *ed_bulktail; /* last in bulk list */ 365 struct ed *ed_bulktail; /* last in bulk list */
366 struct ed *ed_controltail; /* last in ctrl list */ 366 struct ed *ed_controltail; /* last in ctrl list */
367 struct ed *periodic [NUM_INTS]; /* shadow int_table */ 367 struct ed *periodic [NUM_INTS]; /* shadow int_table */
368 368
369 /* 369 /*
370 * OTG controllers and transceivers need software interaction; 370 * OTG controllers and transceivers need software interaction;
371 * other external transceivers should be software-transparent 371 * other external transceivers should be software-transparent
372 */ 372 */
373 struct otg_transceiver *transceiver; 373 struct otg_transceiver *transceiver;
374 374
@@ -385,7 +385,7 @@ struct ohci_hcd {
385 */ 385 */
386 int num_ports; 386 int num_ports;
387 int load [NUM_INTS]; 387 int load [NUM_INTS];
388 u32 hc_control; /* copy of hc control reg */ 388 u32 hc_control; /* copy of hc control reg */
389 unsigned long next_statechange; /* suspend/resume */ 389 unsigned long next_statechange; /* suspend/resume */
390 u32 fminterval; /* saved register */ 390 u32 fminterval; /* saved register */
391 unsigned autostop:1; /* rh auto stopping/stopped */ 391 unsigned autostop:1; /* rh auto stopping/stopped */
@@ -598,7 +598,7 @@ static inline void disable (struct ohci_hcd *ohci)
598} 598}
599 599
600#define FI 0x2edf /* 12000 bits per frame (-1) */ 600#define FI 0x2edf /* 12000 bits per frame (-1) */
601#define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7)) 601#define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7))
602#define FIT (1 << 31) 602#define FIT (1 << 31)
603#define LSTHRESH 0x628 /* lowspeed bit threshold */ 603#define LSTHRESH 0x628 /* lowspeed bit threshold */
604 604