Sorting source tree a bit
[tpg/acess2.git] / KernelLand / Modules / USB / OHCI / ohci.h
1 /*
2  * Acess2 OHCI Driver
3  * - By John Hodge (thePowersGang)
4  *
5  * ohci.h
6  * - Core Header
7  */
8 #ifndef _OHCI_H_
9 #define _OHCI_H_
10
11 struct sEndpointDesc
12 {
13         //  0: 6 = Address
14         //  7:10 = Endpoint Num
15         // 11:12 = Direction (TD, OUT, IN, TD)
16         // 13    = Speed (Full, Low)
17         // 14    = Skip entry
18         // 15    = Format (Others, Isochronous)
19         // 16:26 = Max Packet Size
20         // 27:31 = AVAIL
21         Uint32  Flags;
22         //  0: 3 = AVAIL
23         //  4:31 = TailP
24         Uint32  TailP;  // Last TD in queue
25         //  0    = Halted (Queue stopped due to error)
26         //  1    = Data toggle carry
27         //  2: 3 = ZERO
28         //  4:31 = HeadP
29         Uint32  HeadP;  // First TD in queue
30         //  0: 3 = AVAIL
31         //  4:31 = NextED
32         Uint32  NextED; // Next endpoint descriptor
33 };
34
35 struct sGeneralTD
36 {
37         //  0:17 = AVAIL
38         // 18    = Buffer Rounding (Allow an undersized packet)
39         // 19:20 = Direction (SETUP, OUT, IN, Resvd)
40         // 21:23 = Delay Interrupt (Frame count, 7 = no int)
41         // 24:25 = Data Toggle (ToggleCarry, ToggleCarry, 0, 1)
42         // 26:27 = Error Count
43         // 28:31 = Condition Code
44         Uint32  Flags;
45         
46         // Base address of packet (or current when being read)
47         Uint32  CBP;
48         
49         Uint32  NextTD;
50         
51         // Address of final byte in buffer
52         Uint32  BE;
53 };
54
55 struct sIsochronousTD
56 {
57         //  0:15 = Starting Frame
58         // 16:20 = AVAIL
59         // 21:23 = Delay Interrupt
60         // 24:26 = Frame Count - 1 (1, 2, 3, 4, 5, 6, 7, 8)
61         // 27    = AVAIL
62         // 28:31 = Condition Code
63         Uint32  Flags;
64         
65         //  0:11 = AVAIL
66         // 12:31 = Page number of first byte in buffer
67         Uint32  BP0;    // Buffer Page 0
68         
69         Uint32  NextTD;
70         
71         // Address of last byte in buffer
72         Uint32  BufferEnd;
73         
74         //  0:11 = Page Offset
75         // 12    = Page selector (BufferPage0, BufferEnd)
76         // 13:15 = Unused?
77         Uint16  Offsets[8];
78 };
79
80 #endif
81

UCC git Repository :: git.ucc.asn.au