Subversion Repositories freemyipod

Rev

Rev 15 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15 Rev 85
Line 28... Line 28...
28
#include "global.h"
28
#include "global.h"
29
 
29
 
30
 
30
 
31
#ifdef TARGET_ipodnano2g
31
#ifdef TARGET_ipodnano2g
32
#include "s5l8701.h"
32
#include "s5l8701.h"
-
 
33
#define SYNOPSYSOTG_CLOCK 0
-
 
34
#define SYNOPSYSOTG_AHBCFG 0x27
-
 
35
#endif
-
 
36
#ifdef TARGET_ipodnano4g
-
 
37
#include "s5l8720.h"
-
 
38
#define SYNOPSYSOTG_CLOCK 0x11
-
 
39
#define SYNOPSYSOTG_AHBCFG 0x2B
33
#endif
40
#endif
34
 
41
 
35
 
42
 
36
/*** OTG PHY CONTROL REGISTERS ***/
43
/*** OTG PHY CONTROL REGISTERS ***/
37
#define OPHYPWR     (*((volatile uint32_t*)(PHYBASE + 0x000)))
44
#define OPHYPWR     (*((volatile uint32_t*)(PHYBASE + 0x000)))
Line 53... Line 60...
53
#define GRXSTSP     (*((volatile uint32_t*)(OTGBASE + 0x020)))
60
#define GRXSTSP     (*((volatile uint32_t*)(OTGBASE + 0x020)))
54
#define GRXFSIZ     (*((volatile uint32_t*)(OTGBASE + 0x024)))
61
#define GRXFSIZ     (*((volatile uint32_t*)(OTGBASE + 0x024)))
55
#define GNPTXFSIZ   (*((volatile uint32_t*)(OTGBASE + 0x028)))
62
#define GNPTXFSIZ   (*((volatile uint32_t*)(OTGBASE + 0x028)))
56
#define GNPTXSTS    (*((volatile uint32_t*)(OTGBASE + 0x02C)))
63
#define GNPTXSTS    (*((volatile uint32_t*)(OTGBASE + 0x02C)))
57
#define HPTXFSIZ    (*((volatile uint32_t*)(OTGBASE + 0x100)))
64
#define HPTXFSIZ    (*((volatile uint32_t*)(OTGBASE + 0x100)))
58
#define DPTXFSIZ(x) (*((volatile uint32_t*)(OTGBASE + 0x100 + 4 * x)))
65
#define DPTXFSIZ(x) (*((volatile uint32_t*)(OTGBASE + 0x100 + 4 * (x))))
59
#define DPTXFSIZ1   (*((volatile uint32_t*)(OTGBASE + 0x104)))
66
#define DPTXFSIZ1   (*((volatile uint32_t*)(OTGBASE + 0x104)))
60
#define DPTXFSIZ2   (*((volatile uint32_t*)(OTGBASE + 0x108)))
67
#define DPTXFSIZ2   (*((volatile uint32_t*)(OTGBASE + 0x108)))
61
#define DPTXFSIZ3   (*((volatile uint32_t*)(OTGBASE + 0x10C)))
68
#define DPTXFSIZ3   (*((volatile uint32_t*)(OTGBASE + 0x10C)))
62
#define DPTXFSIZ4   (*((volatile uint32_t*)(OTGBASE + 0x110)))
69
#define DPTXFSIZ4   (*((volatile uint32_t*)(OTGBASE + 0x110)))
63
#define DPTXFSIZ5   (*((volatile uint32_t*)(OTGBASE + 0x114)))
70
#define DPTXFSIZ5   (*((volatile uint32_t*)(OTGBASE + 0x114)))
Line 83... Line 90...
83
 
90
 
84
/* Host Port Control and Status Registers */
91
/* Host Port Control and Status Registers */
85
#define HPRT        (*((volatile uint32_t*)(OTGBASE + 0x440)))
92
#define HPRT        (*((volatile uint32_t*)(OTGBASE + 0x440)))
86
 
93
 
87
/* Host Channel-Specific Registers */
94
/* Host Channel-Specific Registers */
88
#define HCCHAR(x)   (*((volatile uint32_t*)(OTGBASE + 0x500 + 0x20 * x)))
95
#define HCCHAR(x)   (*((volatile uint32_t*)(OTGBASE + 0x500 + 0x20 * (x))))
89
#define HCSPLT(x)   (*((volatile uint32_t*)(OTGBASE + 0x504 + 0x20 * x)))
96
#define HCSPLT(x)   (*((volatile uint32_t*)(OTGBASE + 0x504 + 0x20 * (x))))
90
#define HCINT(x)    (*((volatile uint32_t*)(OTGBASE + 0x508 + 0x20 * x)))
97
#define HCINT(x)    (*((volatile uint32_t*)(OTGBASE + 0x508 + 0x20 * (x))))
91
#define HCINTMSK(x) (*((volatile uint32_t*)(OTGBASE + 0x50C + 0x20 * x)))
98
#define HCINTMSK(x) (*((volatile uint32_t*)(OTGBASE + 0x50C + 0x20 * (x))))
92
#define HCTSIZ(x)   (*((volatile uint32_t*)(OTGBASE + 0x510 + 0x20 * x)))
99
#define HCTSIZ(x)   (*((volatile uint32_t*)(OTGBASE + 0x510 + 0x20 * (x))))
93
#define HCDMA(x)    (*((volatile uint32_t*)(OTGBASE + 0x514 + 0x20 * x)))
100
#define HCDMA(x)    (*((volatile uint32_t*)(OTGBASE + 0x514 + 0x20 * (x))))
94
#define HCCHAR0     (*((volatile uint32_t*)(OTGBASE + 0x500)))
101
#define HCCHAR0     (*((volatile uint32_t*)(OTGBASE + 0x500)))
95
#define HCSPLT0     (*((volatile uint32_t*)(OTGBASE + 0x504)))
102
#define HCSPLT0     (*((volatile uint32_t*)(OTGBASE + 0x504)))
96
#define HCINT0      (*((volatile uint32_t*)(OTGBASE + 0x508)))
103
#define HCINT0      (*((volatile uint32_t*)(OTGBASE + 0x508)))
97
#define HCINTMSK0   (*((volatile uint32_t*)(OTGBASE + 0x50C)))
104
#define HCINTMSK0   (*((volatile uint32_t*)(OTGBASE + 0x50C)))
98
#define HCTSIZ0     (*((volatile uint32_t*)(OTGBASE + 0x510)))
105
#define HCTSIZ0     (*((volatile uint32_t*)(OTGBASE + 0x510)))
Line 203... Line 210...
203
#define DVBUSPULSE  (*((volatile uint32_t*)(OTGBASE + 0x82C)))
210
#define DVBUSPULSE  (*((volatile uint32_t*)(OTGBASE + 0x82C)))
204
#define DTKNQR3     (*((volatile uint32_t*)(OTGBASE + 0x830)))
211
#define DTKNQR3     (*((volatile uint32_t*)(OTGBASE + 0x830)))
205
#define DTKNQR4     (*((volatile uint32_t*)(OTGBASE + 0x834)))
212
#define DTKNQR4     (*((volatile uint32_t*)(OTGBASE + 0x834)))
206
 
213
 
207
/* Device Logical IN Endpoint-Specific Registers */
214
/* Device Logical IN Endpoint-Specific Registers */
208
#define DIEPCTL(x)  (*((volatile uint32_t*)(OTGBASE + 0x900 + 0x20 * x)))
215
#define DIEPCTL(x)  (*((volatile uint32_t*)(OTGBASE + 0x900 + 0x20 * (x))))
209
#define DIEPINT(x)  (*((volatile uint32_t*)(OTGBASE + 0x908 + 0x20 * x)))
216
#define DIEPINT(x)  (*((volatile uint32_t*)(OTGBASE + 0x908 + 0x20 * (x))))
210
#define DIEPTSIZ(x) (*((volatile uint32_t*)(OTGBASE + 0x910 + 0x20 * x)))
217
#define DIEPTSIZ(x) (*((volatile uint32_t*)(OTGBASE + 0x910 + 0x20 * (x))))
211
#define DIEPDMA(x)  (*((volatile uint32_t*)(OTGBASE + 0x914 + 0x20 * x)))
218
#define DIEPDMA(x)  (*((volatile uint32_t*)(OTGBASE + 0x914 + 0x20 * (x))))
212
#define DIEPCTL0    (*((volatile uint32_t*)(OTGBASE + 0x900)))
219
#define DIEPCTL0    (*((volatile uint32_t*)(OTGBASE + 0x900)))
213
#define DIEPINT0    (*((volatile uint32_t*)(OTGBASE + 0x908)))
220
#define DIEPINT0    (*((volatile uint32_t*)(OTGBASE + 0x908)))
214
#define DIEPTSIZ0   (*((volatile uint32_t*)(OTGBASE + 0x910)))
221
#define DIEPTSIZ0   (*((volatile uint32_t*)(OTGBASE + 0x910)))
215
#define DIEPDMA0    (*((volatile uint32_t*)(OTGBASE + 0x914)))
222
#define DIEPDMA0    (*((volatile uint32_t*)(OTGBASE + 0x914)))
216
#define DIEPCTL1    (*((volatile uint32_t*)(OTGBASE + 0x920)))
223
#define DIEPCTL1    (*((volatile uint32_t*)(OTGBASE + 0x920)))
Line 273... Line 280...
273
#define DIEPINT15   (*((volatile uint32_t*)(OTGBASE + 0xAE8)))
280
#define DIEPINT15   (*((volatile uint32_t*)(OTGBASE + 0xAE8)))
274
#define DIEPTSIZ15  (*((volatile uint32_t*)(OTGBASE + 0xAF0)))
281
#define DIEPTSIZ15  (*((volatile uint32_t*)(OTGBASE + 0xAF0)))
275
#define DIEPDMA15   (*((volatile uint32_t*)(OTGBASE + 0xAF4)))
282
#define DIEPDMA15   (*((volatile uint32_t*)(OTGBASE + 0xAF4)))
276
 
283
 
277
/* Device Logical OUT Endpoint-Specific Registers */
284
/* Device Logical OUT Endpoint-Specific Registers */
278
#define DOEPCTL(x)  (*((volatile uint32_t*)(OTGBASE + 0xB00 + 0x20 * x)))
285
#define DOEPCTL(x)  (*((volatile uint32_t*)(OTGBASE + 0xB00 + 0x20 * (x))))
279
#define DOEPINT(x)  (*((volatile uint32_t*)(OTGBASE + 0xB08 + 0x20 * x)))
286
#define DOEPINT(x)  (*((volatile uint32_t*)(OTGBASE + 0xB08 + 0x20 * (x))))
280
#define DOEPTSIZ(x) (*((volatile uint32_t*)(OTGBASE + 0xB10 + 0x20 * x)))
287
#define DOEPTSIZ(x) (*((volatile uint32_t*)(OTGBASE + 0xB10 + 0x20 * (x))))
281
#define DOEPDMA(x)  (*((volatile uint32_t*)(OTGBASE + 0xB14 + 0x20 * x)))
288
#define DOEPDMA(x)  (*((volatile uint32_t*)(OTGBASE + 0xB14 + 0x20 * (x))))
282
#define DOEPCTL0    (*((volatile uint32_t*)(OTGBASE + 0xB00)))
289
#define DOEPCTL0    (*((volatile uint32_t*)(OTGBASE + 0xB00)))
283
#define DOEPINT0    (*((volatile uint32_t*)(OTGBASE + 0xB08)))
290
#define DOEPINT0    (*((volatile uint32_t*)(OTGBASE + 0xB08)))
284
#define DOEPTSIZ0   (*((volatile uint32_t*)(OTGBASE + 0xB10)))
291
#define DOEPTSIZ0   (*((volatile uint32_t*)(OTGBASE + 0xB10)))
285
#define DOEPDMA0    (*((volatile uint32_t*)(OTGBASE + 0xB14)))
292
#define DOEPDMA0    (*((volatile uint32_t*)(OTGBASE + 0xB14)))
286
#define DOEPCTL1    (*((volatile uint32_t*)(OTGBASE + 0xB20)))
293
#define DOEPCTL1    (*((volatile uint32_t*)(OTGBASE + 0xB20)))