Subversion Repositories freemyipod

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15 theseven 1
//
2
//
3
//    Copyright 2010 TheSeven
4
//
5
//
6
//    This file is part of emBIOS.
7
//
8
//    emBIOS is free software: you can redistribute it and/or
9
//    modify it under the terms of the GNU General Public License as
10
//    published by the Free Software Foundation, either version 2 of the
11
//    License, or (at your option) any later version.
12
//
13
//    emBIOS is distributed in the hope that it will be useful,
14
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
//    See the GNU General Public License for more details.
17
//
18
//    You should have received a copy of the GNU General Public License along
19
//    with emBIOS.  If not, see <http://www.gnu.org/licenses/>.
20
//
21
//
22
 
23
 
24
#ifndef __SYNOPSYSOTG_H__
25
#define __SYNOPSYSOTG_H__
26
 
27
 
28
#include "global.h"
29
 
30
 
31
#ifdef TARGET_ipodnano2g
32
#include "s5l8701.h"
33
#endif
34
 
35
 
36
/*** OTG PHY CONTROL REGISTERS ***/
37
#define OPHYPWR     (*((volatile uint32_t*)(PHYBASE + 0x000)))
38
#define OPHYCLK     (*((volatile uint32_t*)(PHYBASE + 0x004)))
39
#define ORSTCON     (*((volatile uint32_t*)(PHYBASE + 0x008)))
40
#define OPHYUNK1    (*((volatile uint32_t*)(PHYBASE + 0x01c)))
41
#define OPHYUNK2    (*((volatile uint32_t*)(PHYBASE + 0x044)))
42
 
43
/*** OTG LINK CORE REGISTERS ***/
44
/* Core Global Registers */
45
#define GOTGCTL     (*((volatile uint32_t*)(OTGBASE + 0x000)))
46
#define GOTGINT     (*((volatile uint32_t*)(OTGBASE + 0x004)))
47
#define GAHBCFG     (*((volatile uint32_t*)(OTGBASE + 0x008)))
48
#define GUSBCFG     (*((volatile uint32_t*)(OTGBASE + 0x00C)))
49
#define GRSTCTL     (*((volatile uint32_t*)(OTGBASE + 0x010)))
50
#define GINTSTS     (*((volatile uint32_t*)(OTGBASE + 0x014)))
51
#define GINTMSK     (*((volatile uint32_t*)(OTGBASE + 0x018)))
52
#define GRXSTSR     (*((volatile uint32_t*)(OTGBASE + 0x01C)))
53
#define GRXSTSP     (*((volatile uint32_t*)(OTGBASE + 0x020)))
54
#define GRXFSIZ     (*((volatile uint32_t*)(OTGBASE + 0x024)))
55
#define GNPTXFSIZ   (*((volatile uint32_t*)(OTGBASE + 0x028)))
56
#define GNPTXSTS    (*((volatile uint32_t*)(OTGBASE + 0x02C)))
57
#define HPTXFSIZ    (*((volatile uint32_t*)(OTGBASE + 0x100)))
58
#define DPTXFSIZ(x) (*((volatile uint32_t*)(OTGBASE + 0x100 + 4 * x)))
59
#define DPTXFSIZ1   (*((volatile uint32_t*)(OTGBASE + 0x104)))
60
#define DPTXFSIZ2   (*((volatile uint32_t*)(OTGBASE + 0x108)))
61
#define DPTXFSIZ3   (*((volatile uint32_t*)(OTGBASE + 0x10C)))
62
#define DPTXFSIZ4   (*((volatile uint32_t*)(OTGBASE + 0x110)))
63
#define DPTXFSIZ5   (*((volatile uint32_t*)(OTGBASE + 0x114)))
64
#define DPTXFSIZ6   (*((volatile uint32_t*)(OTGBASE + 0x118)))
65
#define DPTXFSIZ7   (*((volatile uint32_t*)(OTGBASE + 0x11C)))
66
#define DPTXFSIZ8   (*((volatile uint32_t*)(OTGBASE + 0x120)))
67
#define DPTXFSIZ9   (*((volatile uint32_t*)(OTGBASE + 0x124)))
68
#define DPTXFSIZ10  (*((volatile uint32_t*)(OTGBASE + 0x128)))
69
#define DPTXFSIZ11  (*((volatile uint32_t*)(OTGBASE + 0x12C)))
70
#define DPTXFSIZ12  (*((volatile uint32_t*)(OTGBASE + 0x130)))
71
#define DPTXFSIZ13  (*((volatile uint32_t*)(OTGBASE + 0x134)))
72
#define DPTXFSIZ14  (*((volatile uint32_t*)(OTGBASE + 0x138)))
73
#define DPTXFSIZ15  (*((volatile uint32_t*)(OTGBASE + 0x13C)))
74
 
75
/*** HOST MODE REGISTERS ***/
76
/* Host Global Registers */
77
#define HCFG        (*((volatile uint32_t*)(OTGBASE + 0x400)))
78
#define HFIR        (*((volatile uint32_t*)(OTGBASE + 0x404)))
79
#define HFNUM       (*((volatile uint32_t*)(OTGBASE + 0x408)))
80
#define HPTXSTS     (*((volatile uint32_t*)(OTGBASE + 0x410)))
81
#define HAINT       (*((volatile uint32_t*)(OTGBASE + 0x414)))
82
#define HAINTMSK    (*((volatile uint32_t*)(OTGBASE + 0x418)))
83
 
84
/* Host Port Control and Status Registers */
85
#define HPRT        (*((volatile uint32_t*)(OTGBASE + 0x440)))
86
 
87
/* Host Channel-Specific Registers */
88
#define HCCHAR(x)   (*((volatile uint32_t*)(OTGBASE + 0x500 + 0x20 * x)))
89
#define HCSPLT(x)   (*((volatile uint32_t*)(OTGBASE + 0x504 + 0x20 * x)))
90
#define HCINT(x)    (*((volatile uint32_t*)(OTGBASE + 0x508 + 0x20 * x)))
91
#define HCINTMSK(x) (*((volatile uint32_t*)(OTGBASE + 0x50C + 0x20 * x)))
92
#define HCTSIZ(x)   (*((volatile uint32_t*)(OTGBASE + 0x510 + 0x20 * x)))
93
#define HCDMA(x)    (*((volatile uint32_t*)(OTGBASE + 0x514 + 0x20 * x)))
94
#define HCCHAR0     (*((volatile uint32_t*)(OTGBASE + 0x500)))
95
#define HCSPLT0     (*((volatile uint32_t*)(OTGBASE + 0x504)))
96
#define HCINT0      (*((volatile uint32_t*)(OTGBASE + 0x508)))
97
#define HCINTMSK0   (*((volatile uint32_t*)(OTGBASE + 0x50C)))
98
#define HCTSIZ0     (*((volatile uint32_t*)(OTGBASE + 0x510)))
99
#define HCDMA0      (*((volatile uint32_t*)(OTGBASE + 0x514)))
100
#define HCCHAR1     (*((volatile uint32_t*)(OTGBASE + 0x520)))
101
#define HCSPLT1     (*((volatile uint32_t*)(OTGBASE + 0x524)))
102
#define HCINT1      (*((volatile uint32_t*)(OTGBASE + 0x528)))
103
#define HCINTMSK1   (*((volatile uint32_t*)(OTGBASE + 0x52C)))
104
#define HCTSIZ1     (*((volatile uint32_t*)(OTGBASE + 0x530)))
105
#define HCDMA1      (*((volatile uint32_t*)(OTGBASE + 0x534)))
106
#define HCCHAR2     (*((volatile uint32_t*)(OTGBASE + 0x540)))
107
#define HCSPLT2     (*((volatile uint32_t*)(OTGBASE + 0x544)))
108
#define HCINT2      (*((volatile uint32_t*)(OTGBASE + 0x548)))
109
#define HCINTMSK2   (*((volatile uint32_t*)(OTGBASE + 0x54C)))
110
#define HCTSIZ2     (*((volatile uint32_t*)(OTGBASE + 0x550)))
111
#define HCDMA2      (*((volatile uint32_t*)(OTGBASE + 0x554)))
112
#define HCCHAR3     (*((volatile uint32_t*)(OTGBASE + 0x560)))
113
#define HCSPLT3     (*((volatile uint32_t*)(OTGBASE + 0x564)))
114
#define HCINT3      (*((volatile uint32_t*)(OTGBASE + 0x568)))
115
#define HCINTMSK3   (*((volatile uint32_t*)(OTGBASE + 0x56C)))
116
#define HCTSIZ3     (*((volatile uint32_t*)(OTGBASE + 0x570)))
117
#define HCDMA3      (*((volatile uint32_t*)(OTGBASE + 0x574)))
118
#define HCCHAR4     (*((volatile uint32_t*)(OTGBASE + 0x580)))
119
#define HCSPLT4     (*((volatile uint32_t*)(OTGBASE + 0x584)))
120
#define HCINT4      (*((volatile uint32_t*)(OTGBASE + 0x588)))
121
#define HCINTMSK4   (*((volatile uint32_t*)(OTGBASE + 0x58C)))
122
#define HCTSIZ4     (*((volatile uint32_t*)(OTGBASE + 0x590)))
123
#define HCDMA4      (*((volatile uint32_t*)(OTGBASE + 0x594)))
124
#define HCCHAR5     (*((volatile uint32_t*)(OTGBASE + 0x5A0)))
125
#define HCSPLT5     (*((volatile uint32_t*)(OTGBASE + 0x5A4)))
126
#define HCINT5      (*((volatile uint32_t*)(OTGBASE + 0x5A8)))
127
#define HCINTMSK5   (*((volatile uint32_t*)(OTGBASE + 0x5AC)))
128
#define HCTSIZ5     (*((volatile uint32_t*)(OTGBASE + 0x5B0)))
129
#define HCDMA5      (*((volatile uint32_t*)(OTGBASE + 0x5B4)))
130
#define HCCHAR6     (*((volatile uint32_t*)(OTGBASE + 0x5C0)))
131
#define HCSPLT6     (*((volatile uint32_t*)(OTGBASE + 0x5C4)))
132
#define HCINT6      (*((volatile uint32_t*)(OTGBASE + 0x5C8)))
133
#define HCINTMSK6   (*((volatile uint32_t*)(OTGBASE + 0x5CC)))
134
#define HCTSIZ6     (*((volatile uint32_t*)(OTGBASE + 0x5D0)))
135
#define HCDMA6      (*((volatile uint32_t*)(OTGBASE + 0x5D4)))
136
#define HCCHAR7     (*((volatile uint32_t*)(OTGBASE + 0x5E0)))
137
#define HCSPLT7     (*((volatile uint32_t*)(OTGBASE + 0x5E4)))
138
#define HCINT7      (*((volatile uint32_t*)(OTGBASE + 0x5E8)))
139
#define HCINTMSK7   (*((volatile uint32_t*)(OTGBASE + 0x5EC)))
140
#define HCTSIZ7     (*((volatile uint32_t*)(OTGBASE + 0x5F0)))
141
#define HCDMA7      (*((volatile uint32_t*)(OTGBASE + 0x5F4)))
142
#define HCCHAR8     (*((volatile uint32_t*)(OTGBASE + 0x600)))
143
#define HCSPLT8     (*((volatile uint32_t*)(OTGBASE + 0x604)))
144
#define HCINT8      (*((volatile uint32_t*)(OTGBASE + 0x608)))
145
#define HCINTMSK8   (*((volatile uint32_t*)(OTGBASE + 0x60C)))
146
#define HCTSIZ8     (*((volatile uint32_t*)(OTGBASE + 0x610)))
147
#define HCDMA8      (*((volatile uint32_t*)(OTGBASE + 0x614)))
148
#define HCCHAR9     (*((volatile uint32_t*)(OTGBASE + 0x620)))
149
#define HCSPLT9     (*((volatile uint32_t*)(OTGBASE + 0x624)))
150
#define HCINT9      (*((volatile uint32_t*)(OTGBASE + 0x628)))
151
#define HCINTMSK9   (*((volatile uint32_t*)(OTGBASE + 0x62C)))
152
#define HCTSIZ9     (*((volatile uint32_t*)(OTGBASE + 0x630)))
153
#define HCDMA9      (*((volatile uint32_t*)(OTGBASE + 0x634)))
154
#define HCCHAR10    (*((volatile uint32_t*)(OTGBASE + 0x640)))
155
#define HCSPLT10    (*((volatile uint32_t*)(OTGBASE + 0x644)))
156
#define HCINT10     (*((volatile uint32_t*)(OTGBASE + 0x648)))
157
#define HCINTMSK10  (*((volatile uint32_t*)(OTGBASE + 0x64C)))
158
#define HCTSIZ10    (*((volatile uint32_t*)(OTGBASE + 0x650)))
159
#define HCDMA10     (*((volatile uint32_t*)(OTGBASE + 0x654)))
160
#define HCCHAR11    (*((volatile uint32_t*)(OTGBASE + 0x660)))
161
#define HCSPLT11    (*((volatile uint32_t*)(OTGBASE + 0x664)))
162
#define HCINT11     (*((volatile uint32_t*)(OTGBASE + 0x668)))
163
#define HCINTMSK11  (*((volatile uint32_t*)(OTGBASE + 0x66C)))
164
#define HCTSIZ11    (*((volatile uint32_t*)(OTGBASE + 0x670)))
165
#define HCDMA11     (*((volatile uint32_t*)(OTGBASE + 0x674)))
166
#define HCCHAR12    (*((volatile uint32_t*)(OTGBASE + 0x680)))
167
#define HCSPLT12    (*((volatile uint32_t*)(OTGBASE + 0x684)))
168
#define HCINT12     (*((volatile uint32_t*)(OTGBASE + 0x688)))
169
#define HCINTMSK12  (*((volatile uint32_t*)(OTGBASE + 0x68C)))
170
#define HCTSIZ12    (*((volatile uint32_t*)(OTGBASE + 0x690)))
171
#define HCDMA12     (*((volatile uint32_t*)(OTGBASE + 0x694)))
172
#define HCCHAR13    (*((volatile uint32_t*)(OTGBASE + 0x6A0)))
173
#define HCSPLT13    (*((volatile uint32_t*)(OTGBASE + 0x6A4)))
174
#define HCINT13     (*((volatile uint32_t*)(OTGBASE + 0x6A8)))
175
#define HCINTMSK13  (*((volatile uint32_t*)(OTGBASE + 0x6AC)))
176
#define HCTSIZ13    (*((volatile uint32_t*)(OTGBASE + 0x6B0)))
177
#define HCDMA13     (*((volatile uint32_t*)(OTGBASE + 0x6B4)))
178
#define HCCHAR14    (*((volatile uint32_t*)(OTGBASE + 0x6C0)))
179
#define HCSPLT14    (*((volatile uint32_t*)(OTGBASE + 0x6C4)))
180
#define HCINT14     (*((volatile uint32_t*)(OTGBASE + 0x6C8)))
181
#define HCINTMSK14  (*((volatile uint32_t*)(OTGBASE + 0x6CC)))
182
#define HCTSIZ14    (*((volatile uint32_t*)(OTGBASE + 0x6D0)))
183
#define HCDMA14     (*((volatile uint32_t*)(OTGBASE + 0x6D4)))
184
#define HCCHAR15    (*((volatile uint32_t*)(OTGBASE + 0x6E0)))
185
#define HCSPLT15    (*((volatile uint32_t*)(OTGBASE + 0x6E4)))
186
#define HCINT15     (*((volatile uint32_t*)(OTGBASE + 0x6E8)))
187
#define HCINTMSK15  (*((volatile uint32_t*)(OTGBASE + 0x6EC)))
188
#define HCTSIZ15    (*((volatile uint32_t*)(OTGBASE + 0x6F0)))
189
#define HCDMA15     (*((volatile uint32_t*)(OTGBASE + 0x6F4)))
190
 
191
/*** DEVICE MODE REGISTERS ***/
192
/* Device Global Registers */
193
#define DCFG        (*((volatile uint32_t*)(OTGBASE + 0x800)))
194
#define DCTL        (*((volatile uint32_t*)(OTGBASE + 0x804)))
195
#define DSTS        (*((volatile uint32_t*)(OTGBASE + 0x808)))
196
#define DIEPMSK     (*((volatile uint32_t*)(OTGBASE + 0x810)))
197
#define DOEPMSK     (*((volatile uint32_t*)(OTGBASE + 0x814)))
198
#define DAINT       (*((volatile uint32_t*)(OTGBASE + 0x818)))
199
#define DAINTMSK    (*((volatile uint32_t*)(OTGBASE + 0x81C)))
200
#define DTKNQR1     (*((volatile uint32_t*)(OTGBASE + 0x820)))
201
#define DTKNQR2     (*((volatile uint32_t*)(OTGBASE + 0x824)))
202
#define DVBUSDIS    (*((volatile uint32_t*)(OTGBASE + 0x828)))
203
#define DVBUSPULSE  (*((volatile uint32_t*)(OTGBASE + 0x82C)))
204
#define DTKNQR3     (*((volatile uint32_t*)(OTGBASE + 0x830)))
205
#define DTKNQR4     (*((volatile uint32_t*)(OTGBASE + 0x834)))
206
 
207
/* Device Logical IN Endpoint-Specific Registers */
208
#define DIEPCTL(x)  (*((volatile uint32_t*)(OTGBASE + 0x900 + 0x20 * x)))
209
#define DIEPINT(x)  (*((volatile uint32_t*)(OTGBASE + 0x908 + 0x20 * x)))
210
#define DIEPTSIZ(x) (*((volatile uint32_t*)(OTGBASE + 0x910 + 0x20 * x)))
211
#define DIEPDMA(x)  (*((volatile uint32_t*)(OTGBASE + 0x914 + 0x20 * x)))
212
#define DIEPCTL0    (*((volatile uint32_t*)(OTGBASE + 0x900)))
213
#define DIEPINT0    (*((volatile uint32_t*)(OTGBASE + 0x908)))
214
#define DIEPTSIZ0   (*((volatile uint32_t*)(OTGBASE + 0x910)))
215
#define DIEPDMA0    (*((volatile uint32_t*)(OTGBASE + 0x914)))
216
#define DIEPCTL1    (*((volatile uint32_t*)(OTGBASE + 0x920)))
217
#define DIEPINT1    (*((volatile uint32_t*)(OTGBASE + 0x928)))
218
#define DIEPTSIZ1   (*((volatile uint32_t*)(OTGBASE + 0x930)))
219
#define DIEPDMA1    (*((volatile uint32_t*)(OTGBASE + 0x934)))
220
#define DIEPCTL2    (*((volatile uint32_t*)(OTGBASE + 0x940)))
221
#define DIEPINT2    (*((volatile uint32_t*)(OTGBASE + 0x948)))
222
#define DIEPTSIZ2   (*((volatile uint32_t*)(OTGBASE + 0x950)))
223
#define DIEPDMA2    (*((volatile uint32_t*)(OTGBASE + 0x954)))
224
#define DIEPCTL3    (*((volatile uint32_t*)(OTGBASE + 0x960)))
225
#define DIEPINT3    (*((volatile uint32_t*)(OTGBASE + 0x968)))
226
#define DIEPTSIZ3   (*((volatile uint32_t*)(OTGBASE + 0x970)))
227
#define DIEPDMA3    (*((volatile uint32_t*)(OTGBASE + 0x974)))
228
#define DIEPCTL4    (*((volatile uint32_t*)(OTGBASE + 0x980)))
229
#define DIEPINT4    (*((volatile uint32_t*)(OTGBASE + 0x988)))
230
#define DIEPTSIZ4   (*((volatile uint32_t*)(OTGBASE + 0x990)))
231
#define DIEPDMA4    (*((volatile uint32_t*)(OTGBASE + 0x994)))
232
#define DIEPCTL5    (*((volatile uint32_t*)(OTGBASE + 0x9A0)))
233
#define DIEPINT5    (*((volatile uint32_t*)(OTGBASE + 0x9A8)))
234
#define DIEPTSIZ5   (*((volatile uint32_t*)(OTGBASE + 0x9B0)))
235
#define DIEPDMA5    (*((volatile uint32_t*)(OTGBASE + 0x9B4)))
236
#define DIEPCTL6    (*((volatile uint32_t*)(OTGBASE + 0x9C0)))
237
#define DIEPINT6    (*((volatile uint32_t*)(OTGBASE + 0x9C8)))
238
#define DIEPTSIZ6   (*((volatile uint32_t*)(OTGBASE + 0x9D0)))
239
#define DIEPDMA6    (*((volatile uint32_t*)(OTGBASE + 0x9D4)))
240
#define DIEPCTL7    (*((volatile uint32_t*)(OTGBASE + 0x9E0)))
241
#define DIEPINT7    (*((volatile uint32_t*)(OTGBASE + 0x9E8)))
242
#define DIEPTSIZ7   (*((volatile uint32_t*)(OTGBASE + 0x9F0)))
243
#define DIEPDMA7    (*((volatile uint32_t*)(OTGBASE + 0x9F4)))
244
#define DIEPCTL8    (*((volatile uint32_t*)(OTGBASE + 0xA00)))
245
#define DIEPINT8    (*((volatile uint32_t*)(OTGBASE + 0xA08)))
246
#define DIEPTSIZ8   (*((volatile uint32_t*)(OTGBASE + 0xA10)))
247
#define DIEPDMA8    (*((volatile uint32_t*)(OTGBASE + 0xA14)))
248
#define DIEPCTL9    (*((volatile uint32_t*)(OTGBASE + 0xA20)))
249
#define DIEPINT9    (*((volatile uint32_t*)(OTGBASE + 0xA28)))
250
#define DIEPTSIZ9   (*((volatile uint32_t*)(OTGBASE + 0xA30)))
251
#define DIEPDMA9    (*((volatile uint32_t*)(OTGBASE + 0xA34)))
252
#define DIEPCTL10   (*((volatile uint32_t*)(OTGBASE + 0xA40)))
253
#define DIEPINT10   (*((volatile uint32_t*)(OTGBASE + 0xA48)))
254
#define DIEPTSIZ10  (*((volatile uint32_t*)(OTGBASE + 0xA50)))
255
#define DIEPDMA10   (*((volatile uint32_t*)(OTGBASE + 0xA54)))
256
#define DIEPCTL11   (*((volatile uint32_t*)(OTGBASE + 0xA60)))
257
#define DIEPINT11   (*((volatile uint32_t*)(OTGBASE + 0xA68)))
258
#define DIEPTSIZ11  (*((volatile uint32_t*)(OTGBASE + 0xA70)))
259
#define DIEPDMA11   (*((volatile uint32_t*)(OTGBASE + 0xA74)))
260
#define DIEPCTL12   (*((volatile uint32_t*)(OTGBASE + 0xA80)))
261
#define DIEPINT12   (*((volatile uint32_t*)(OTGBASE + 0xA88)))
262
#define DIEPTSIZ12  (*((volatile uint32_t*)(OTGBASE + 0xA90)))
263
#define DIEPDMA12   (*((volatile uint32_t*)(OTGBASE + 0xA94)))
264
#define DIEPCTL13   (*((volatile uint32_t*)(OTGBASE + 0xAA0)))
265
#define DIEPINT13   (*((volatile uint32_t*)(OTGBASE + 0xAA8)))
266
#define DIEPTSIZ13  (*((volatile uint32_t*)(OTGBASE + 0xAB0)))
267
#define DIEPDMA13   (*((volatile uint32_t*)(OTGBASE + 0xAB4)))
268
#define DIEPCTL14   (*((volatile uint32_t*)(OTGBASE + 0xAC0)))
269
#define DIEPINT14   (*((volatile uint32_t*)(OTGBASE + 0xAC8)))
270
#define DIEPTSIZ14  (*((volatile uint32_t*)(OTGBASE + 0xAD0)))
271
#define DIEPDMA14   (*((volatile uint32_t*)(OTGBASE + 0xAD4)))
272
#define DIEPCTL15   (*((volatile uint32_t*)(OTGBASE + 0xAE0)))
273
#define DIEPINT15   (*((volatile uint32_t*)(OTGBASE + 0xAE8)))
274
#define DIEPTSIZ15  (*((volatile uint32_t*)(OTGBASE + 0xAF0)))
275
#define DIEPDMA15   (*((volatile uint32_t*)(OTGBASE + 0xAF4)))
276
 
277
/* Device Logical OUT Endpoint-Specific Registers */
278
#define DOEPCTL(x)  (*((volatile uint32_t*)(OTGBASE + 0xB00 + 0x20 * x)))
279
#define DOEPINT(x)  (*((volatile uint32_t*)(OTGBASE + 0xB08 + 0x20 * x)))
280
#define DOEPTSIZ(x) (*((volatile uint32_t*)(OTGBASE + 0xB10 + 0x20 * x)))
281
#define DOEPDMA(x)  (*((volatile uint32_t*)(OTGBASE + 0xB14 + 0x20 * x)))
282
#define DOEPCTL0    (*((volatile uint32_t*)(OTGBASE + 0xB00)))
283
#define DOEPINT0    (*((volatile uint32_t*)(OTGBASE + 0xB08)))
284
#define DOEPTSIZ0   (*((volatile uint32_t*)(OTGBASE + 0xB10)))
285
#define DOEPDMA0    (*((volatile uint32_t*)(OTGBASE + 0xB14)))
286
#define DOEPCTL1    (*((volatile uint32_t*)(OTGBASE + 0xB20)))
287
#define DOEPINT1    (*((volatile uint32_t*)(OTGBASE + 0xB28)))
288
#define DOEPTSIZ1   (*((volatile uint32_t*)(OTGBASE + 0xB30)))
289
#define DOEPDMA1    (*((volatile uint32_t*)(OTGBASE + 0xB34)))
290
#define DOEPCTL2    (*((volatile uint32_t*)(OTGBASE + 0xB40)))
291
#define DOEPINT2    (*((volatile uint32_t*)(OTGBASE + 0xB48)))
292
#define DOEPTSIZ2   (*((volatile uint32_t*)(OTGBASE + 0xB50)))
293
#define DOEPDMA2    (*((volatile uint32_t*)(OTGBASE + 0xB54)))
294
#define DOEPCTL3    (*((volatile uint32_t*)(OTGBASE + 0xB60)))
295
#define DOEPINT3    (*((volatile uint32_t*)(OTGBASE + 0xB68)))
296
#define DOEPTSIZ3   (*((volatile uint32_t*)(OTGBASE + 0xB70)))
297
#define DOEPDMA3    (*((volatile uint32_t*)(OTGBASE + 0xB74)))
298
#define DOEPCTL4    (*((volatile uint32_t*)(OTGBASE + 0xB80)))
299
#define DOEPINT4    (*((volatile uint32_t*)(OTGBASE + 0xB88)))
300
#define DOEPTSIZ4   (*((volatile uint32_t*)(OTGBASE + 0xB90)))
301
#define DOEPDMA4    (*((volatile uint32_t*)(OTGBASE + 0xB94)))
302
#define DOEPCTL5    (*((volatile uint32_t*)(OTGBASE + 0xBA0)))
303
#define DOEPINT5    (*((volatile uint32_t*)(OTGBASE + 0xBA8)))
304
#define DOEPTSIZ5   (*((volatile uint32_t*)(OTGBASE + 0xBB0)))
305
#define DOEPDMA5    (*((volatile uint32_t*)(OTGBASE + 0xBB4)))
306
#define DOEPCTL6    (*((volatile uint32_t*)(OTGBASE + 0xBC0)))
307
#define DOEPINT6    (*((volatile uint32_t*)(OTGBASE + 0xBC8)))
308
#define DOEPTSIZ6   (*((volatile uint32_t*)(OTGBASE + 0xBD0)))
309
#define DOEPDMA6    (*((volatile uint32_t*)(OTGBASE + 0xBD4)))
310
#define DOEPCTL7    (*((volatile uint32_t*)(OTGBASE + 0xBE0)))
311
#define DOEPINT7    (*((volatile uint32_t*)(OTGBASE + 0xBE8)))
312
#define DOEPTSIZ7   (*((volatile uint32_t*)(OTGBASE + 0xBF0)))
313
#define DOEPDMA7    (*((volatile uint32_t*)(OTGBASE + 0xBF4)))
314
#define DOEPCTL8    (*((volatile uint32_t*)(OTGBASE + 0xC00)))
315
#define DOEPINT8    (*((volatile uint32_t*)(OTGBASE + 0xC08)))
316
#define DOEPTSIZ8   (*((volatile uint32_t*)(OTGBASE + 0xC10)))
317
#define DOEPDMA8    (*((volatile uint32_t*)(OTGBASE + 0xC14)))
318
#define DOEPCTL9    (*((volatile uint32_t*)(OTGBASE + 0xC20)))
319
#define DOEPINT9    (*((volatile uint32_t*)(OTGBASE + 0xC28)))
320
#define DOEPTSIZ9   (*((volatile uint32_t*)(OTGBASE + 0xC30)))
321
#define DOEPDMA9    (*((volatile uint32_t*)(OTGBASE + 0xC34)))
322
#define DOEPCTL10   (*((volatile uint32_t*)(OTGBASE + 0xC40)))
323
#define DOEPINT10   (*((volatile uint32_t*)(OTGBASE + 0xC48)))
324
#define DOEPTSIZ10  (*((volatile uint32_t*)(OTGBASE + 0xC50)))
325
#define DOEPDMA10   (*((volatile uint32_t*)(OTGBASE + 0xC54)))
326
#define DOEPCTL11   (*((volatile uint32_t*)(OTGBASE + 0xC60)))
327
#define DOEPINT11   (*((volatile uint32_t*)(OTGBASE + 0xC68)))
328
#define DOEPTSIZ11  (*((volatile uint32_t*)(OTGBASE + 0xC70)))
329
#define DOEPDMA11   (*((volatile uint32_t*)(OTGBASE + 0xC74)))
330
#define DOEPCTL12   (*((volatile uint32_t*)(OTGBASE + 0xC80)))
331
#define DOEPINT12   (*((volatile uint32_t*)(OTGBASE + 0xC88)))
332
#define DOEPTSIZ12  (*((volatile uint32_t*)(OTGBASE + 0xC90)))
333
#define DOEPDMA12   (*((volatile uint32_t*)(OTGBASE + 0xC94)))
334
#define DOEPCTL13   (*((volatile uint32_t*)(OTGBASE + 0xCA0)))
335
#define DOEPINT13   (*((volatile uint32_t*)(OTGBASE + 0xCA8)))
336
#define DOEPTSIZ13  (*((volatile uint32_t*)(OTGBASE + 0xCB0)))
337
#define DOEPDMA13   (*((volatile uint32_t*)(OTGBASE + 0xCB4)))
338
#define DOEPCTL14   (*((volatile uint32_t*)(OTGBASE + 0xCC0)))
339
#define DOEPINT14   (*((volatile uint32_t*)(OTGBASE + 0xCC8)))
340
#define DOEPTSIZ14  (*((volatile uint32_t*)(OTGBASE + 0xCD0)))
341
#define DOEPDMA14   (*((volatile uint32_t*)(OTGBASE + 0xCD4)))
342
#define DOEPCTL15   (*((volatile uint32_t*)(OTGBASE + 0xCE0)))
343
#define DOEPINT15   (*((volatile uint32_t*)(OTGBASE + 0xCE8)))
344
#define DOEPTSIZ15  (*((volatile uint32_t*)(OTGBASE + 0xCF0)))
345
#define DOEPDMA15   (*((volatile uint32_t*)(OTGBASE + 0xCF4)))
346
 
347
/* Power and Clock Gating Register */
348
#define PCGCCTL     (*((volatile uint32_t*)(OTGBASE + 0xE00)))
349
 
350
 
351
#endif