Go to the documentation of this file.
5 #define OXU_DEVICEID 0x00
6 #define OXU_REV_MASK 0xffff0000
7 #define OXU_REV_SHIFT 16
8 #define OXU_REV_2100 0x2100
10 #define OXU_BO_MASK (0x3 << OXU_BO_SHIFT)
11 #define OXU_MAJ_REV_SHIFT 4
12 #define OXU_MAJ_REV_MASK (0xf << OXU_MAJ_REV_SHIFT)
13 #define OXU_MIN_REV_SHIFT 0
14 #define OXU_MIN_REV_MASK (0xf << OXU_MIN_REV_SHIFT)
15 #define OXU_HOSTIFCONFIG 0x04
16 #define OXU_SOFTRESET 0x08
17 #define OXU_SRESET (1 << 0)
19 #define OXU_PIOBURSTREADCTRL 0x0C
21 #define OXU_CHIPIRQSTATUS 0x10
22 #define OXU_CHIPIRQEN_SET 0x14
23 #define OXU_CHIPIRQEN_CLR 0x18
24 #define OXU_USBSPHLPWUI 0x00000080
25 #define OXU_USBOTGLPWUI 0x00000040
26 #define OXU_USBSPHI 0x00000002
27 #define OXU_USBOTGI 0x00000001
29 #define OXU_CLKCTRL_SET 0x1C
30 #define OXU_SYSCLKEN 0x00000008
31 #define OXU_USBSPHCLKEN 0x00000002
32 #define OXU_USBOTGCLKEN 0x00000001
35 #define OXU_SPHPOEN 0x00000100
36 #define OXU_OVRCCURPUPDEN 0x00000800
37 #define OXU_ASO_OP (1 << 10)
38 #define OXU_COMPARATOR 0x000004000
40 #define OXU_USBMODE 0x1A8
41 #define OXU_VBPS 0x00000020
42 #define OXU_ES_LITTLE 0x00000000
43 #define OXU_CM_HOST_ONLY 0x00000003
50 #define EHCI_TUNE_CERR 3
51 #define EHCI_TUNE_RL_HS 4
52 #define EHCI_TUNE_RL_TT 0
53 #define EHCI_TUNE_MULT_HS 1
54 #define EHCI_TUNE_MULT_TT 1
55 #define EHCI_TUNE_FLS 2
67 #define HC_LENGTH(p) (((p)>>00)&0x00ff)
68 #define HC_VERSION(p) (((p)>>16)&0xffff)
70 #define HCS_DEBUG_PORT(p) (((p)>>20)&0xf)
71 #define HCS_INDICATOR(p) ((p)&(1 << 16))
72 #define HCS_N_CC(p) (((p)>>12)&0xf)
73 #define HCS_N_PCC(p) (((p)>>8)&0xf)
74 #define HCS_PORTROUTED(p) ((p)&(1 << 7))
75 #define HCS_PPC(p) ((p)&(1 << 4))
76 #define HCS_N_PORTS(p) (((p)>>0)&0xf)
79 #define HCC_EXT_CAPS(p) (((p)>>8)&0xff)
80 #define HCC_ISOC_CACHE(p) ((p)&(1 << 7))
81 #define HCC_ISOC_THRES(p) (((p)>>4)&0x7)
82 #define HCC_CANPARK(p) ((p)&(1 << 2))
83 #define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1))
84 #define HCC_64BIT_ADDR(p) ((p)&(1))
94 #define CMD_PARK (1<<11)
95 #define CMD_PARK_CNT(c) (((c)>>8)&3)
96 #define CMD_LRESET (1<<7)
97 #define CMD_IAAD (1<<6)
98 #define CMD_ASE (1<<5)
99 #define CMD_PSE (1<<4)
101 #define CMD_RESET (1<<1)
102 #define CMD_RUN (1<<0)
106 #define STS_ASS (1<<15)
107 #define STS_PSS (1<<14)
108 #define STS_RECL (1<<13)
109 #define STS_HALT (1<<12)
112 #define STS_IAA (1<<5)
113 #define STS_FATAL (1<<4)
114 #define STS_FLR (1<<3)
115 #define STS_PCD (1<<2)
116 #define STS_ERR (1<<1)
117 #define STS_INT (1<<0)
119 #define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT)
137 #define FLAG_CF (1<<0)
142 #define PORT_WKOC_E (1<<22)
143 #define PORT_WKDISC_E (1<<21)
144 #define PORT_WKCONN_E (1<<20)
146 #define PORT_LED_OFF (0<<14)
147 #define PORT_LED_AMBER (1<<14)
148 #define PORT_LED_GREEN (2<<14)
149 #define PORT_LED_MASK (3<<14)
150 #define PORT_OWNER (1<<13)
151 #define PORT_POWER (1<<12)
152 #define PORT_USB11(x) (((x)&(3<<10)) == (1<<10))
155 #define PORT_RESET (1<<8)
156 #define PORT_SUSPEND (1<<7)
157 #define PORT_RESUME (1<<6)
158 #define PORT_OCC (1<<5)
159 #define PORT_OC (1<<4)
160 #define PORT_PEC (1<<3)
161 #define PORT_PE (1<<2)
162 #define PORT_CSC (1<<1)
163 #define PORT_CONNECT (1<<0)
164 #define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)
172 #define DBGP_OWNER (1<<30)
173 #define DBGP_ENABLED (1<<28)
174 #define DBGP_DONE (1<<16)
175 #define DBGP_INUSE (1<<10)
176 #define DBGP_ERRCODE(x) (((x)>>7)&0x07)
177 # define DBGP_ERR_BAD 1
178 # define DBGP_ERR_SIGNAL 2
179 #define DBGP_ERROR (1<<6)
180 #define DBGP_GO (1<<5)
181 #define DBGP_OUT (1<<4)
182 #define DBGP_LEN(x) (((x)>>0)&0x0f)
184 #define DBGP_PID_GET(x) (((x)>>16)&0xff)
185 #define DBGP_PID_SET(data, tok) (((data)<<8)|(tok))
189 #define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep))
193 #define QTD_NEXT(dma) cpu_to_le32((u32)dma)
208 #define QTD_TOGGLE (1 << 31)
209 #define QTD_LENGTH(tok) (((tok)>>16) & 0x7fff)
210 #define QTD_IOC (1 << 15)
211 #define QTD_CERR(tok) (((tok)>>10) & 0x3)
212 #define QTD_PID(tok) (((tok)>>8) & 0x3)
213 #define QTD_STS_ACTIVE (1 << 7)
214 #define QTD_STS_HALT (1 << 6)
215 #define QTD_STS_DBE (1 << 5)
216 #define QTD_STS_BABBLE (1 << 4)
217 #define QTD_STS_XACT (1 << 3)
218 #define QTD_STS_MMF (1 << 2)
219 #define QTD_STS_STS (1 << 1)
220 #define QTD_STS_PING (1 << 0)
238 #define QTD_MASK cpu_to_le32 (~0x1f)
240 #define IS_SHORT_READ(token) (QTD_LENGTH(token) != 0 && QTD_PID(token) == 1)
243 #define Q_NEXT_TYPE(dma) ((dma) & cpu_to_le32 (3 << 1))
246 #define Q_TYPE_QH cpu_to_le32 (1 << 1)
249 #define QH_NEXT(dma) (cpu_to_le32(((u32)dma)&~0x01f)|Q_TYPE_QH)
252 #define EHCI_LIST_END cpu_to_le32(1)
280 #define QH_HEAD 0x00008000
282 #define QH_SMASK 0x000000ff
283 #define QH_CMASK 0x0000ff00
284 #define QH_HUBADDR 0x007f0000
285 #define QH_HUBPORT 0x3f800000
286 #define QH_MULT 0xc0000000
308 #define QH_STATE_LINKED 1
309 #define QH_STATE_UNLINK 2
310 #define QH_STATE_IDLE 3
311 #define QH_STATE_UNLINK_WAIT 4
312 #define QH_STATE_COMPLETING 5
320 unsigned short start;
321 #define NO_FRAME ((unsigned short)~0)
322 struct usb_device *
dev;
329 #define OXU_OTG_CORE_OFFSET 0x00400
330 #define OXU_OTG_CAP_OFFSET (OXU_OTG_CORE_OFFSET + 0x100)
331 #define OXU_SPH_CORE_OFFSET 0x00800
332 #define OXU_SPH_CAP_OFFSET (OXU_SPH_CORE_OFFSET + 0x100)
334 #define OXU_OTG_MEM 0xE000
335 #define OXU_SPH_MEM 0x16000
339 #define DEFAULT_I_TDPS 1024
346 #define BUFFER_SIZE 512
364 #define EHCI_MAX_ROOT_PORTS 15
435 #define EHCI_IAA_JIFFIES (HZ/100)
436 #define EHCI_IO_JIFFIES (HZ/10)
437 #define EHCI_ASYNC_JIFFIES (HZ/20)
438 #define EHCI_SHRINK_JIFFIES (HZ/200)