add global proxy / cache settings to httpget class. This removes the need of passing...
[Rockbox.git] / firmware / export / mcf5249.h
blob87c4ae75b379c3ea61de9cb30dc5c7b2ceaa3776
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2004 by Linus Nielsen Feltzing
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef __MCF5249_H__
20 #define __MCF5249_H__
22 #define MBAR 0x40000000
23 #define MBAR2 0x80000000
25 #define RSR (*(volatile unsigned char *)(MBAR + 0x000))
26 #define SYPCR (*(volatile unsigned char *)(MBAR + 0x001))
27 #define SWIVR (*(volatile unsigned char *)(MBAR + 0x002))
28 #define SWSR (*(volatile unsigned char *)(MBAR + 0x003))
30 #define MPARK (*(volatile unsigned char *)(MBAR + 0x00c))
32 #define IPR (*(volatile unsigned long *)(MBAR + 0x040))
33 #define IMR (*(volatile unsigned long *)(MBAR + 0x044))
34 #define ICR0 (*(volatile unsigned char *)(MBAR + 0x04c))
35 #define ICR1 (*(volatile unsigned char *)(MBAR + 0x04d))
36 #define ICR2 (*(volatile unsigned char *)(MBAR + 0x04e))
37 #define ICR3 (*(volatile unsigned char *)(MBAR + 0x04f))
38 #define ICR4 (*(volatile unsigned char *)(MBAR + 0x050))
39 #define ICR5 (*(volatile unsigned char *)(MBAR + 0x051))
40 #define ICR6 (*(volatile unsigned char *)(MBAR + 0x052))
41 #define ICR7 (*(volatile unsigned char *)(MBAR + 0x053))
42 #define ICR8 (*(volatile unsigned char *)(MBAR + 0x054))
43 #define ICR9 (*(volatile unsigned char *)(MBAR + 0x055))
44 #define ICR10 (*(volatile unsigned char *)(MBAR + 0x056))
45 #define ICR11 (*(volatile unsigned char *)(MBAR + 0x057))
47 #define CSAR0 (*(volatile unsigned long *)(MBAR + 0x080))
48 #define CSMR0 (*(volatile unsigned long *)(MBAR + 0x084))
49 #define CSCR0 (*(volatile unsigned long *)(MBAR + 0x088))
50 #define CSAR1 (*(volatile unsigned long *)(MBAR + 0x08c))
51 #define CSMR1 (*(volatile unsigned long *)(MBAR + 0x090))
52 #define CSCR1 (*(volatile unsigned long *)(MBAR + 0x094))
53 #define CSAR2 (*(volatile unsigned long *)(MBAR + 0x098))
54 #define CSMR2 (*(volatile unsigned long *)(MBAR + 0x09c))
55 #define CSCR2 (*(volatile unsigned long *)(MBAR + 0x0a0))
56 #define CSAR3 (*(volatile unsigned long *)(MBAR + 0x0a4))
57 #define CSMR3 (*(volatile unsigned long *)(MBAR + 0x0a8))
58 #define CSCR3 (*(volatile unsigned long *)(MBAR + 0x0ac))
60 #define DCR (*(volatile unsigned short *)(MBAR + 0x100))
61 #define DACR0 (*(volatile unsigned long *)(MBAR + 0x108))
62 #define DMR0 (*(volatile unsigned long *)(MBAR + 0x10c))
63 #define DACR1 (*(volatile unsigned long *)(MBAR + 0x110))
64 #define DMR1 (*(volatile unsigned long *)(MBAR + 0x114))
65 #define TMR0 (*(volatile unsigned short *)(MBAR + 0x140))
66 #define TRR0 (*(volatile unsigned short *)(MBAR + 0x144))
67 #define TCR0 (*(volatile unsigned short *)(MBAR + 0x148))
68 #define TCN0 (*(volatile unsigned short *)(MBAR + 0x14c))
69 #define TER0 (*(volatile unsigned char *)(MBAR + 0x151))
70 #define TMR1 (*(volatile unsigned short *)(MBAR + 0x180))
71 #define TRR1 (*(volatile unsigned short *)(MBAR + 0x184))
72 #define TCR1 (*(volatile unsigned short *)(MBAR + 0x188))
73 #define TCN1 (*(volatile unsigned short *)(MBAR + 0x18c))
74 #define TER1 (*(volatile unsigned char *)(MBAR + 0x191))
76 #define UMR0 (*(volatile unsigned char *)(MBAR + 0x1c0))
77 #define USR0 (*(volatile unsigned char *)(MBAR + 0x1c4))
78 #define UCSR0 (*(volatile unsigned char *)(MBAR + 0x1c4))
79 #define UCR0 (*(volatile unsigned char *)(MBAR + 0x1c8))
80 #define URB0 (*(volatile unsigned char *)(MBAR + 0x1cc))
81 #define UTB0 (*(volatile unsigned char *)(MBAR + 0x1cc))
82 #define UIPCR0 (*(volatile unsigned char *)(MBAR + 0x1d0))
83 #define UACR0 (*(volatile unsigned char *)(MBAR + 0x1d0))
84 #define UISR0 (*(volatile unsigned char *)(MBAR + 0x1d4))
85 #define UIMR0 (*(volatile unsigned char *)(MBAR + 0x1d4))
86 #define UBG10 (*(volatile unsigned char *)(MBAR + 0x1d8))
87 #define UBG20 (*(volatile unsigned char *)(MBAR + 0x1dc))
88 #define UIVR0 (*(volatile unsigned char *)(MBAR + 0x1f0))
89 #define UIP0 (*(volatile unsigned char *)(MBAR + 0x1f4))
90 #define UOP10 (*(volatile unsigned char *)(MBAR + 0x1f8))
91 #define UOP00 (*(volatile unsigned char *)(MBAR + 0x1fc))
93 #define UMR1 (*(volatile unsigned char *)(MBAR + 0x200))
94 #define USR1 (*(volatile unsigned char *)(MBAR + 0x204))
95 #define UCSR1 (*(volatile unsigned char *)(MBAR + 0x204))
96 #define UCR1 (*(volatile unsigned char *)(MBAR + 0x208))
97 #define URB1 (*(volatile unsigned char *)(MBAR + 0x20c))
98 #define UTB1 (*(volatile unsigned char *)(MBAR + 0x20c))
99 #define UIPCR1 (*(volatile unsigned char *)(MBAR + 0x210))
100 #define UACR1 (*(volatile unsigned char *)(MBAR + 0x210))
101 #define UISR1 (*(volatile unsigned char *)(MBAR + 0x214))
102 #define UIMR1 (*(volatile unsigned char *)(MBAR + 0x214))
103 #define UBG11 (*(volatile unsigned char *)(MBAR + 0x218))
104 #define UBG21 (*(volatile unsigned char *)(MBAR + 0x21c))
105 #define UIVR1 (*(volatile unsigned char *)(MBAR + 0x230))
106 #define UIP1 (*(volatile unsigned char *)(MBAR + 0x234))
107 #define UOP11 (*(volatile unsigned char *)(MBAR + 0x238))
108 #define UOP01 (*(volatile unsigned char *)(MBAR + 0x23c))
110 #define MADR (*(volatile unsigned char *)(MBAR + 0x280))
111 #define MFDR (*(volatile unsigned char *)(MBAR + 0x284))
112 #define MBCR (*(volatile unsigned char *)(MBAR + 0x288))
113 #define MBSR (*(volatile unsigned char *)(MBAR + 0x28c))
114 #define MBDR (*(volatile unsigned char *)(MBAR + 0x290))
116 #define SAR0 (*(volatile unsigned long *)(MBAR + 0x300))
117 #define DAR0 (*(volatile unsigned long *)(MBAR + 0x304))
118 #define DCR0 (*(volatile unsigned long *)(MBAR + 0x308))
119 #define BCR0 (*(volatile unsigned long *)(MBAR + 0x30c))
120 #define DSR0 (*(volatile unsigned char *)(MBAR + 0x310))
121 #define DIVR0 (*(volatile unsigned char *)(MBAR + 0x314))
123 #define SAR1 (*(volatile unsigned long *)(MBAR + 0x340))
124 #define DAR1 (*(volatile unsigned long *)(MBAR + 0x344))
125 #define DCR1 (*(volatile unsigned long *)(MBAR + 0x348))
126 #define BCR1 (*(volatile unsigned long *)(MBAR + 0x34c))
127 #define DSR1 (*(volatile unsigned char *)(MBAR + 0x350))
128 #define DIVR1 (*(volatile unsigned char *)(MBAR + 0x354))
130 #define SAR2 (*(volatile unsigned long *)(MBAR + 0x380))
131 #define DAR2 (*(volatile unsigned long *)(MBAR + 0x384))
132 #define DCR2 (*(volatile unsigned long *)(MBAR + 0x388))
133 #define BCR2 (*(volatile unsigned long *)(MBAR + 0x38c))
134 #define DSR2 (*(volatile unsigned char *)(MBAR + 0x390))
135 #define DIVR2 (*(volatile unsigned char *)(MBAR + 0x394))
137 #define SAR3 (*(volatile unsigned long *)(MBAR + 0x3c0))
138 #define DAR3 (*(volatile unsigned long *)(MBAR + 0x3c4))
139 #define DCR3 (*(volatile unsigned long *)(MBAR + 0x3c8))
140 #define BCR3 (*(volatile unsigned long *)(MBAR + 0x3cc))
141 #define DSR3 (*(volatile unsigned char *)(MBAR + 0x3d0))
142 #define DIVR3 (*(volatile unsigned char *)(MBAR + 0x3d4))
144 #define QSPIMR (*(volatile unsigned short *)(MBAR + 0x400))
145 #define QSPIQDLYR (*(volatile unsigned short *)(MBAR + 0x404))
146 #define QSPIQWR (*(volatile unsigned short *)(MBAR + 0x408))
147 #define QSPIQIR (*(volatile unsigned short *)(MBAR + 0x40c))
148 #define QSPIQAR (*(volatile unsigned short *)(MBAR + 0x410))
149 #define QSPIQDR (*(volatile unsigned short *)(MBAR + 0x414))
151 #define GPIO_READ (*(volatile unsigned long *)(MBAR2 + 0x000))
152 #define GPIO_OUT (*(volatile unsigned long *)(MBAR2 + 0x004))
153 #define GPIO_ENABLE (*(volatile unsigned long *)(MBAR2 + 0x008))
154 #define GPIO_FUNCTION (*(volatile unsigned long *)(MBAR2 + 0x00c))
156 #define IIS1CONFIG (*(volatile unsigned long *)(MBAR2 + 0x010))
157 #define IIS2CONFIG (*(volatile unsigned long *)(MBAR2 + 0x014))
158 #define IIS3CONFIG (*(volatile unsigned long *)(MBAR2 + 0x018))
159 #define IIS4CONFIG (*(volatile unsigned long *)(MBAR2 + 0x01c))
160 #define EBU1CONFIG (*(volatile unsigned long *)(MBAR2 + 0x020))
161 #define EBU1RCVCCHANNEL1 (*(volatile unsigned long *)(MBAR2 + 0x024))
162 #define EBUTXCCHANNEL1 (*(volatile unsigned long *)(MBAR2 + 0x028))
163 #define EBUTXCCHANNEL2 (*(volatile unsigned long *)(MBAR2 + 0x02c))
164 #define DATAINCONTROL (*(volatile unsigned long *)(MBAR2 + 0x030))
165 #define PDIR1_L (*(volatile unsigned long *)(MBAR2 + 0x034))
166 #define PDIR3_L (*(volatile unsigned long *)(MBAR2 + 0x044))
167 #define PDIR1_R (*(volatile unsigned long *)(MBAR2 + 0x054))
168 #define PDIR3_R (*(volatile unsigned long *)(MBAR2 + 0x064))
169 #define PDOR1_L (*(volatile unsigned long *)(MBAR2 + 0x034))
170 #define PDOR1_R (*(volatile unsigned long *)(MBAR2 + 0x044))
171 #define PDOR2_L (*(volatile unsigned long *)(MBAR2 + 0x054))
172 #define PDOR2_R (*(volatile unsigned long *)(MBAR2 + 0x064))
173 #define PDIR2 (*(volatile unsigned long *)(MBAR2 + 0x074))
174 #define PDOR3 (*(volatile unsigned long *)(MBAR2 + 0x074))
175 #define UCHANNELTRANSMIT (*(volatile unsigned long *)(MBAR2 + 0x084))
176 #define U1CHANNELRECEIVE (*(volatile unsigned long *)(MBAR2 + 0x088))
177 #define Q1CHANNELRECEIVE (*(volatile unsigned long *)(MBAR2 + 0x08c))
178 #define CD_TEXT_CONTROL (*(volatile unsigned char *)(MBAR2 + 0x092))
179 #define INTERRUPTEN (*(volatile unsigned long *)(MBAR2 + 0x094))
180 #define INTERRUPTCLEAR (*(volatile unsigned long *)(MBAR2 + 0x098))
181 #define INTERRUPTSTAT (*(volatile unsigned long *)(MBAR2 + 0x098))
182 #define DMACONFIG (*(volatile unsigned char *)(MBAR2 + 0x09f))
183 #define PHASECONFIG (*(volatile unsigned char *)(MBAR2 + 0x0a3))
184 #define XTRIM (*(volatile unsigned short *)(MBAR2 + 0x0a6))
185 #define FREQMEAS (*(volatile unsigned long *)(MBAR2 + 0x0a8))
186 #define BLOCKCONTROL (*(volatile unsigned short *)(MBAR2 + 0x0ca))
187 #define AUDIOGLOB (*(volatile unsigned short *)(MBAR2 + 0x0ce))
188 #define EBU2CONFIG (*(volatile unsigned long *)(MBAR2 + 0x0d0))
189 #define EBU2RCVCCHANNEL1 (*(volatile unsigned short *)(MBAR2 + 0x0d4))
190 #define U2CHANNELRECEIVE (*(volatile unsigned long *)(MBAR2 + 0x0d8))
191 #define Q2CHANNELRECEIVE (*(volatile unsigned long *)(MBAR2 + 0x0dc))
193 #define DEVICE_ID (*(volatile unsigned long *)(MBAR2 + 0x0ac))
195 #define GPIO1_READ (*(volatile unsigned long *)(MBAR2 + 0x0b0))
196 #define GPIO1_OUT (*(volatile unsigned long *)(MBAR2 + 0x0b4))
197 #define GPIO1_ENABLE (*(volatile unsigned long *)(MBAR2 + 0x0b8))
198 #define GPIO1_FUNCTION (*(volatile unsigned long *)(MBAR2 + 0x0bc))
199 #define GPIO_INT_STAT (*(volatile unsigned long *)(MBAR2 + 0x0c0))
200 #define GPIO_INT_CLEAR (*(volatile unsigned long *)(MBAR2 + 0x0c0))
201 #define GPIO_INT_EN (*(volatile unsigned long *)(MBAR2 + 0x0c4))
202 #define INTERRUPTSTAT3 (*(volatile unsigned long *)(MBAR2 + 0x0e0))
203 #define INTERRUPTCLEAR3 (*(volatile unsigned long *)(MBAR2 + 0x0e0))
204 #define INTERRUPTEN3 (*(volatile unsigned long *)(MBAR2 + 0x0e4))
205 #define INTPRI1 (*(volatile unsigned long *)(MBAR2 + 0x140))
206 #define INTPRI2 (*(volatile unsigned long *)(MBAR2 + 0x144))
207 #define INTPRI3 (*(volatile unsigned long *)(MBAR2 + 0x148))
208 #define INTPRI4 (*(volatile unsigned long *)(MBAR2 + 0x14c))
209 #define INTPRI5 (*(volatile unsigned long *)(MBAR2 + 0x150))
210 #define INTPRI6 (*(volatile unsigned long *)(MBAR2 + 0x154))
211 #define INTPRI7 (*(volatile unsigned long *)(MBAR2 + 0x158))
212 #define INTPRI8 (*(volatile unsigned long *)(MBAR2 + 0x15c))
213 #define SPURVEC (*(volatile unsigned char *)(MBAR2 + 0x167))
214 #define INTBASE (*(volatile unsigned char *)(MBAR2 + 0x16b))
215 #define PLLCR (*(volatile unsigned long *)(MBAR2 + 0x180))
216 #define DMAROUTE (*(volatile unsigned long *)(MBAR2 + 0x188))
217 #define IDECONFIG1 (*(volatile unsigned long *)(MBAR2 + 0x18c))
218 #define IDECONFIG2 (*(volatile unsigned long *)(MBAR2 + 0x190))
219 #define IPERRORADR (*(volatile unsigned long *)(MBAR2 + 0x194))
220 #define EXTRAINT (*(volatile unsigned long *)(MBAR2 + 0x198))
222 #define ADCONFIG (*(volatile unsigned short *)(MBAR2 + 0x402))
223 #define ADVALUE (*(volatile unsigned short *)(MBAR2 + 0x406))
224 #define MADR2 (*(volatile unsigned char *)(MBAR2 + 0x440))
225 #define MFDR2 (*(volatile unsigned char *)(MBAR2 + 0x444))
226 #define MBCR2 (*(volatile unsigned char *)(MBAR2 + 0x448))
227 #define MBSR2 (*(volatile unsigned char *)(MBAR2 + 0x44c))
228 #define MBDR2 (*(volatile unsigned char *)(MBAR2 + 0x450))
230 #define FLASHMEDIACONFIG (*(volatile unsigned long *)(MBAR2 + 0x460))
231 #define FLASHMEDIACMD1 (*(volatile unsigned long *)(MBAR2 + 0x464))
232 #define FLASHMEDIACMD2 (*(volatile unsigned long *)(MBAR2 + 0x468))
233 #define FLASHMEDIADATA1 (*(volatile unsigned long *)(MBAR2 + 0x46c))
234 #define FLASHMEDIADATA2 (*(volatile unsigned long *)(MBAR2 + 0x470))
235 #define FLASHMEDIASTATUS (*(volatile unsigned long *)(MBAR2 + 0x474))
236 #define FLASHMEDIAINTEN (*(volatile unsigned long *)(MBAR2 + 0x478))
237 #define FLASHMEDIAINTSTAT (*(volatile unsigned long *)(MBAR2 + 0x47c))
238 #define FLASHMEDIAINTCLEAR (*(volatile unsigned long *)(MBAR2 + 0x47c))
240 /* DMA Registers ... */
242 #define O_SAR 0x00 /* Source Address */
243 #define O_DAR 0x04 /* Destination Address */
244 #define O_DCR 0x08 /* DMA Control Register */
245 #define O_BCR 0x0C /* 16 or 24 bits depending on BCR24BIT */
246 #define O_DSR 0x10 /* DMA Status Register */
247 #define O_IVR 0x14 /* Interrupt Vector Register */
249 /* DMA Control Register bits */
250 #define DMA_INT (1 << 31) /* Enable Interrupts */
251 #define DMA_EEXT (1 << 30) /* Enable peripherial request */
252 #define DMA_CS (1 << 29) /* Cycle Steal */
253 #define DMA_AA (1 << 28) /* Auto-Align */
254 #define DMA_BWC(x) (((x)&7) << 25) /* Bandwidth control */
255 #define DMA_SINC (1 << 22) /* Source Increment */
256 #define DMA_SSIZE(x) (((x)&3) << 20) /* Size of source data */
257 #define DMA_DINC (1 << 19) /* Destination Increment */
258 #define DMA_DSIZE(x) (((x)&3) << 17) /* Size of destination data */
259 #define DMA_START (1 << 16) /* Start DMA transfer */
261 #define DMA_SIZE_DWORD 0 /* 4 bytes */
262 #define DMA_SIZE_BYTE 1 /* 1 byte */
263 #define DMA_SIZE_WORD 2 /* 2 bytes */
264 #define DMA_SIZE_LINE 3 /* 16 bytes */
266 /* DMA Status Register bits */
267 #define DMA_CE (1 << 6) /* Configuration Error */
268 #define DMA_BES (1 << 5) /* Bus error on source */
269 #define DMA_BED (1 << 4) /* Bus error on destination */
270 #define DMA_REQ (1 << 2) /* Request pending */
271 #define DMA_BSY (1 << 1) /* DMA channel busy */
272 #define DMA_DONE (1 << 0) /* Transfer has completed */
274 /* DMAROUTE config */
275 #define DMA0_REQ_AUDIO_1 0x80
276 #define DMA0_REQ_AUDIO_2 0x81
277 #define DMA1_REQ_AUDIO_1 0x8000
278 #define DMA1_REQ_AUDIO_2 0x8100
281 #endif