Go to the documentation of this file.
17 #ifndef RENESAS_USB_DRIVER_H
18 #define RENESAS_USB_DRIVER_H
34 #define BUSWAIT 0x0002
35 #define DVSTCTR 0x0008
36 #define TESTMODE 0x000C
38 #define CFIFOSEL 0x0020
39 #define CFIFOCTR 0x0022
41 #define D0FIFOSEL 0x0028
42 #define D0FIFOCTR 0x002A
44 #define D1FIFOSEL 0x002C
45 #define D1FIFOCTR 0x002E
46 #define INTENB0 0x0030
47 #define INTENB1 0x0032
48 #define BRDYENB 0x0036
49 #define NRDYENB 0x0038
50 #define BEMPENB 0x003A
51 #define INTSTS0 0x0040
52 #define INTSTS1 0x0042
53 #define BRDYSTS 0x0046
54 #define NRDYSTS 0x0048
55 #define BEMPSTS 0x004A
59 #define USBINDX 0x0058
60 #define USBLENG 0x005A
62 #define DCPMAXP 0x005E
64 #define PIPESEL 0x0064
65 #define PIPECFG 0x0068
66 #define PIPEBUF 0x006A
67 #define PIPEMAXP 0x006C
68 #define PIPEPERI 0x006E
69 #define PIPEnCTR 0x0070
70 #define PIPE1TRE 0x0090
71 #define PIPE1TRN 0x0092
72 #define PIPE2TRE 0x0094
73 #define PIPE2TRN 0x0096
74 #define PIPE3TRE 0x0098
75 #define PIPE3TRN 0x009A
76 #define PIPE4TRE 0x009C
77 #define PIPE4TRN 0x009E
78 #define PIPE5TRE 0x00A0
79 #define PIPE5TRN 0x00A2
80 #define PIPEBTRE 0x00A4
81 #define PIPEBTRN 0x00A6
82 #define PIPECTRE 0x00A8
83 #define PIPECTRN 0x00AA
84 #define PIPEDTRE 0x00AC
85 #define PIPEDTRN 0x00AE
86 #define PIPEETRE 0x00B0
87 #define PIPEETRN 0x00B2
88 #define PIPEFTRE 0x00B4
89 #define PIPEFTRN 0x00B6
90 #define PIPE9TRE 0x00B8
91 #define PIPE9TRN 0x00BA
92 #define PIPEATRE 0x00BC
93 #define PIPEATRN 0x00BE
94 #define DEVADD0 0x00D0
95 #define DEVADD1 0x00D2
96 #define DEVADD2 0x00D4
97 #define DEVADD3 0x00D6
98 #define DEVADD4 0x00D8
99 #define DEVADD5 0x00DA
100 #define DEVADD6 0x00DC
101 #define DEVADD7 0x00DE
102 #define DEVADD8 0x00E0
103 #define DEVADD9 0x00E2
104 #define DEVADDA 0x00E4
107 #define SCKE (1 << 10)
109 #define DCFM (1 << 6)
110 #define DRPD (1 << 5)
111 #define DPRPU (1 << 4)
112 #define USBE (1 << 0)
115 #define EXTLP (1 << 10)
116 #define PWEN (1 << 9)
117 #define USBRST (1 << 6)
118 #define UACT (1 << 4)
120 #define RHST_LOW_SPEED 1
121 #define RHST_FULL_SPEED 2
122 #define RHST_HIGH_SPEED 3
125 #define DREQE (1 << 12)
126 #define MBW_32 (0x2 << 10)
129 #define BVAL (1 << 15)
130 #define BCLR (1 << 14)
131 #define FRDY (1 << 13)
132 #define DTLN_MASK (0x0FFF)
135 #define VBSE (1 << 15)
136 #define RSME (1 << 14)
137 #define SOFE (1 << 13)
138 #define DVSE (1 << 12)
139 #define CTRE (1 << 11)
140 #define BEMPE (1 << 10)
141 #define NRDYE (1 << 9)
142 #define BRDYE (1 << 8)
145 #define BCHGE (1 << 14)
146 #define DTCHE (1 << 12)
147 #define ATTCHE (1 << 11)
148 #define EOFERRE (1 << 6)
149 #define SIGNE (1 << 5)
150 #define SACKE (1 << 4)
153 #define VBINT (1 << 15)
154 #define DVST (1 << 12)
155 #define CTRT (1 << 11)
156 #define BEMP (1 << 10)
157 #define BRDY (1 << 8)
158 #define VBSTS (1 << 7)
159 #define VALID (1 << 3)
161 #define DVSQ_MASK (0x3 << 4)
162 #define POWER_STATE (0 << 4)
163 #define DEFAULT_STATE (1 << 4)
164 #define ADDRESS_STATE (2 << 4)
165 #define CONFIGURATION_STATE (3 << 4)
167 #define CTSQ_MASK (0x7)
168 #define IDLE_SETUP_STAGE 0
169 #define READ_DATA_STAGE 1
170 #define READ_STATUS_STAGE 2
171 #define WRITE_DATA_STAGE 3
172 #define WRITE_STATUS_STAGE 4
173 #define NODATA_STATUS_STAGE 5
174 #define SEQUENCE_ERROR 6
177 #define OVRCR (1 << 15)
178 #define BCHG (1 << 14)
179 #define DTCH (1 << 12)
180 #define ATTCH (1 << 11)
181 #define EOFERR (1 << 6)
182 #define SIGN (1 << 5)
183 #define SACK (1 << 4)
187 #define TYPE_NONE (0 << 14)
188 #define TYPE_BULK (1 << 14)
189 #define TYPE_INT (2 << 14)
190 #define TYPE_ISO (3 << 14)
191 #define DBLB (1 << 9)
192 #define SHTNAK (1 << 7)
193 #define DIR_OUT (1 << 4)
197 #define DEVSEL_MASK (0xF << 12)
198 #define DCP_MAXP_MASK (0x7F)
199 #define PIPE_MAXP_MASK (0x7FF)
202 #define BUFSIZE_SHIFT 10
203 #define BUFSIZE_MASK (0x1F << BUFSIZE_SHIFT)
204 #define BUFNMB_MASK (0xFF)
208 #define BSTS (1 << 15)
209 #define SUREQ (1 << 14)
210 #define CSSTS (1 << 12)
211 #define ACLRM (1 << 9)
212 #define SQCLR (1 << 8)
213 #define SQSET (1 << 7)
214 #define PBUSY (1 << 5)
215 #define PID_MASK (0x3)
218 #define PID_STALL10 2
219 #define PID_STALL11 3
221 #define CCPL (1 << 2)
224 #define TRENB (1 << 9)
225 #define TRCLR (1 << 8)
228 #define FRNM_MASK (0x7FF)
231 #define UPPHUB(x) (((x) & 0xF) << 11)
232 #define HUBPORT(x) (((x) & 0x7) << 8)
233 #define USBSPD(x) (((x) & 0x3) << 6)
234 #define USBSPD_SPEED_LOW 0x1
235 #define USBSPD_SPEED_FULL 0x2
236 #define USBSPD_SPEED_HIGH 0x3
280 #define usbhs_lock(p, f) spin_lock_irqsave(usbhs_priv_to_lock(p), f)
281 #define usbhs_unlock(p, f) spin_unlock_irqrestore(usbhs_priv_to_lock(p), f)
319 #define usbhs_get_dparam(priv, param) (priv->dparam.param)
320 #define usbhs_priv_to_pdev(priv) (priv->pdev)
321 #define usbhs_priv_to_dev(priv) (&priv->pdev->dev)
322 #define usbhs_priv_to_lock(priv) (&priv->lock)