7 struct usb_endpoint_descriptor;
9 struct usb_pipe *ohci_realloc_pipe(struct usbdevice_s *usbdev
10 , struct usb_pipe *upipe
11 , struct usb_endpoint_descriptor *epdesc);
12 int ohci_send_pipe(struct usb_pipe *p, int dir, const void *cmd
13 , void *data, int datasize);
14 int ohci_poll_intr(struct usb_pipe *p, void *data);
17 /****************************************************************
18 * ohci structs and flags
19 ****************************************************************/
28 #define ED_ISO (1 << 15)
29 #define ED_SKIP (1 << 14)
30 #define ED_LOWSPEED (1 << 13)
31 #define ED_OUT (0x01 << 11)
32 #define ED_IN (0x02 << 11)
44 #define TD_CC 0xf0000000
45 #define TD_CC_GET(td_p) ((td_p >>28) & 0x0f)
46 #define TD_DI 0x00E00000
48 #define TD_DONE 0x00020000
49 #define TD_ISO 0x00010000
51 #define TD_EC 0x0C000000
52 #define TD_T 0x03000000
53 #define TD_T_DATA0 0x02000000
54 #define TD_T_DATA1 0x03000000
55 #define TD_T_TOGGLE 0x00000000
56 #define TD_DP 0x00180000
57 #define TD_DP_SETUP 0x00000000
58 #define TD_DP_IN 0x00100000
59 #define TD_DP_OUT 0x00080000
61 #define TD_R 0x00040000
81 u32 ed_controlcurrent;
95 u32 roothub_portstatus[15];
98 #define OHCI_CTRL_CBSR (3 << 0)
99 #define OHCI_CTRL_PLE (1 << 2)
100 #define OHCI_CTRL_CLE (1 << 4)
101 #define OHCI_CTRL_BLE (1 << 5)
102 #define OHCI_CTRL_HCFS (3 << 6)
103 # define OHCI_USB_RESET (0 << 6)
104 # define OHCI_USB_OPER (2 << 6)
105 #define OHCI_CTRL_RWC (1 << 9)
107 #define OHCI_HCR (1 << 0)
108 #define OHCI_CLF (1 << 1)
109 #define OHCI_BLF (1 << 2)
111 #define OHCI_INTR_MIE (1 << 31)
113 #define RH_PS_CCS 0x00000001
114 #define RH_PS_PES 0x00000002
115 #define RH_PS_PSS 0x00000004
116 #define RH_PS_POCI 0x00000008
117 #define RH_PS_PRS 0x00000010
118 #define RH_PS_PPS 0x00000100
119 #define RH_PS_LSDA 0x00000200
120 #define RH_PS_CSC 0x00010000
121 #define RH_PS_PESC 0x00020000
122 #define RH_PS_PSSC 0x00040000
123 #define RH_PS_OCIC 0x00080000
124 #define RH_PS_PRSC 0x00100000
126 #define RH_HS_LPS 0x00000001
127 #define RH_HS_OCI 0x00000002
128 #define RH_HS_DRWE 0x00008000
129 #define RH_HS_LPSC 0x00010000
130 #define RH_HS_OCIC 0x00020000
131 #define RH_HS_CRWE 0x80000000
133 #define RH_B_DR 0x0000ffff
134 #define RH_B_PPCM 0xffff0000
136 #define RH_A_NDP (0xff << 0)
137 #define RH_A_PSM (1 << 8)
138 #define RH_A_NPS (1 << 9)
139 #define RH_A_DT (1 << 10)
140 #define RH_A_OCPM (1 << 11)
141 #define RH_A_NOCP (1 << 12)
142 #define RH_A_POTPGT (0xff << 24)