Trim down peak calculation a bit.
[kugel-rb.git] / firmware / export / dm320.h
blobf78fc6c6d6ff318656265ef2fd21004e77652b3c
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Karl Kurbjun
11 * Copyright (C) 2008 by Maurus Cuelenaere
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ****************************************************************************/
23 /** All register offset definitions for the TI DM320
24 * Taken from: http://svn.neurostechnology.com/filedetails.php?repname=neuros-bsp&path=%2Ftrunk%2Fkernels%2Flinux-2.6.15%2Finclude%2Fasm-arm%2Farch-ntosd-dm320%2Fio_registers.h&rev=0&sc=0
27 #ifndef __DM320_H__
28 #define __DM320_H__
30 #if !defined(__ASSEMBLER__) && !defined(__LD__)
31 /* These variables are created during linking (app/boot.lds) */
32 extern unsigned long _lcdbuf;
33 extern unsigned long _lcdbuf2;
34 extern unsigned long _ttbstart;
35 #endif
37 #define TTB_BASE_ADDR (_ttbstart) /* End of memory */
38 #define FRAME ((short *) (&_lcdbuf)) /* Right after TTB */
39 #define FRAME2 ((short *) (&_lcdbuf2)) /* Right after FRAME */
41 #define PHY_IO_BASE 0x00030000
42 #define DM320_REG(addr) (*(volatile unsigned short *)(PHY_IO_BASE + (addr)))
43 #define PHY_IO_BASE2 0x00060000
44 #define DM320_REG2(addr) (*(volatile unsigned int *)(PHY_IO_BASE2 + (addr)))
46 #define COP_IO_BASE 0x00090000
47 #define DM320_COP(addr) (*(volatile unsigned short *)(COP_IO_BASE + (addr)))
49 /* This needs to be 2048 byte aligned, but USB_QHARRAY_ATTR should take care
50 * of that */
51 #define USB_QHARRAY_ATTR __attribute__((section(".qharray"),nocommon,aligned(4)))
52 #define USB_DEVBSS_ATTR IBSS_ATTR
55 /* Timer 0-3 */
56 #define IO_TIMER0_TMMD DM320_REG(0x0000)
57 #define IO_TIMER0_TMRSV0 DM320_REG(0x0002)
58 #define IO_TIMER0_TMPRSCL DM320_REG(0x0004)
59 #define IO_TIMER0_TMDIV DM320_REG(0x0006)
60 #define IO_TIMER0_TMTRG DM320_REG(0x0008)
61 #define IO_TIMER0_TMCNT DM320_REG(0x000A)
63 #define IO_TIMER1_TMMD DM320_REG(0x0080)
64 #define IO_TIMER1_TMRSV0 DM320_REG(0x0082)
65 #define IO_TIMER1_TMPRSCL DM320_REG(0x0084)
66 #define IO_TIMER1_TMDIV DM320_REG(0x0086)
67 #define IO_TIMER1_TMTRG DM320_REG(0x0088)
68 #define IO_TIMER1_TMCNT DM320_REG(0x008A)
70 #define IO_TIMER2_TMMD DM320_REG(0x0100)
71 #define IO_TIMER2_TMVDCLR DM320_REG(0x0102)
72 #define IO_TIMER2_TMPRSCL DM320_REG(0x0104)
73 #define IO_TIMER2_TMDIV DM320_REG(0x0106)
74 #define IO_TIMER2_TMTRG DM320_REG(0x0108)
75 #define IO_TIMER2_TMCNT DM320_REG(0x010A)
77 #define IO_TIMER3_TMMD DM320_REG(0x0180)
78 #define IO_TIMER3_TMVDCLR DM320_REG(0x0182)
79 #define IO_TIMER3_TMPRSCL DM320_REG(0x0184)
80 #define IO_TIMER3_TMDIV DM320_REG(0x0186)
81 #define IO_TIMER3_TMTRG DM320_REG(0x0188)
82 #define IO_TIMER3_TMCNT DM320_REG(0x018A)
84 /* Serial 0/1 */
85 #define IO_SERIAL0_TX_DATA DM320_REG(0x0200)
86 #define IO_SERIAL0_RX_DATA DM320_REG(0x0202)
87 #define IO_SERIAL0_TX_ENABLE DM320_REG(0x0204)
88 #define IO_SERIAL0_MODE DM320_REG(0x0206)
89 #define IO_SERIAL0_DMA_TRIGGER DM320_REG(0x0208)
90 #define IO_SERIAL0_DMA_MODE DM320_REG(0x020A)
91 #define IO_SERIAL0_DMA_SDRAM_LOW DM320_REG(0x020C)
92 #define IO_SERIAL0_DMA_SDRAM_HI DM320_REG(0x020E)
93 #define IO_SERIAL0_DMA_STATUS DM320_REG(0x0210)
95 #define IO_SERIAL1_TX_DATA DM320_REG(0x0280)
96 #define IO_SERIAL1_RX_DATA DM320_REG(0x0282)
97 #define IO_SERIAL1_TX_ENABLE DM320_REG(0x0284)
98 #define IO_SERIAL1_MODE DM320_REG(0x0286)
100 /* UART 0/1 */
101 #define IO_UART0_DTRR DM320_REG(0x0300)
102 #define IO_UART0_BRSR DM320_REG(0x0302)
103 #define IO_UART0_MSR DM320_REG(0x0304)
104 #define IO_UART0_RFCR DM320_REG(0x0306)
105 #define IO_UART0_TFCR DM320_REG(0x0308)
106 #define IO_UART0_LCR DM320_REG(0x030A)
107 #define IO_UART0_SR DM320_REG(0x030C)
109 #define IO_UART1_DTRR DM320_REG(0x0380)
110 #define IO_UART1_BRSR DM320_REG(0x0382)
111 #define IO_UART1_MSR DM320_REG(0x0384)
112 #define IO_UART1_RFCR DM320_REG(0x0386)
113 #define IO_UART1_TFCR DM320_REG(0x0388)
114 #define IO_UART1_LCR DM320_REG(0x038A)
115 #define IO_UART1_SR DM320_REG(0x038C)
117 /* Watchdog Timer */
118 #define IO_WATCHDOG_MODE DM320_REG(0x0400)
119 #define IO_WATCHDOG_RESET DM320_REG(0x0402)
120 #define IO_WATCHDOG_PRESCALAR DM320_REG(0x0404)
121 #define IO_WATCHDOG_DIVISOR DM320_REG(0x0406)
122 #define IO_WATCHDOG_EXT_RESET DM320_REG(0x0408)
124 /* MMC/SD Controller */
125 #define IO_MMC_CONTROL DM320_REG(0x0480)
126 #define IO_MMC_MEM_CLK_CONTROL DM320_REG(0x0482)
127 #define IO_MMC_STATUS0 DM320_REG(0x0484)
128 #define IO_MMC_STATUS1 DM320_REG(0x0486)
129 #define IO_MMC_INT_ENABLE DM320_REG(0x0488)
130 #define IO_MMC_RESPONSE_TIMEOUT DM320_REG(0x048A)
131 #define IO_MMC_READ_TIMEOUT DM320_REG(0x048C)
132 #define IO_MMC_BLOCK_LENGTH DM320_REG(0x048E)
133 #define IO_MMC_NR_BLOCKS DM320_REG(0x0490)
134 #define IO_MMC_NR_BLOCKS_COUNT DM320_REG(0x0492)
135 #define IO_MMC_RX_DATA DM320_REG(0x0494)
136 #define IO_MMC_TX_DATA DM320_REG(0x0496)
137 #define IO_MMC_COMMAND DM320_REG(0x0498)
138 #define IO_MMC_ARG_LOW DM320_REG(0x049A)
139 #define IO_MMC_ARG_HI DM320_REG(0x049C)
140 #define IO_MMC_RESPONSE0 DM320_REG(0x049E)
141 #define IO_MMC_RESPONSE1 DM320_REG(0x04A0)
142 #define IO_MMC_RESPONSE2 DM320_REG(0x04A2)
143 #define IO_MMC_RESPONSE3 DM320_REG(0x04A4)
144 #define IO_MMC_RESPONSE4 DM320_REG(0x04A6)
145 #define IO_MMC_RESPONSE5 DM320_REG(0x04A8)
146 #define IO_MMC_RESPONSE6 DM320_REG(0x04AA)
147 #define IO_MMC_RESPONSE7 DM320_REG(0x04AC)
148 #define IO_MMC_SPI_DATA DM320_REG(0x04AE)
149 #define IO_MMC_SPI_ERR DM320_REG(0x04B0)
150 #define IO_MMC_COMMAND_INDEX DM320_REG(0x04B2)
151 #define IO_MMC_CLK_START_PHASE DM320_REG(0x04B4)
152 #define IO_MMC_RESPONSE_TOUT_CNT DM320_REG(0x04B6)
153 #define IO_MMC_READ_TOUT_CNT DM320_REG(0x04B8)
154 #define IO_MMC_BLOCK_LENGTH_CNT DM320_REG(0x04BA)
156 #define IO_MMC_SD_DMA_TRIGGER DM320_REG(0x04BC)
157 #define IO_MMC_SD_DMA_MODE DM320_REG(0x04BE)
158 #define IO_MMC_SD_DMA_ADDR_LOW DM320_REG(0x04C0)
159 #define IO_MMC_SD_DMA_ADDR_HI DM320_REG(0x04C2)
160 #define IO_MMC_SD_DMA_STATUS0 DM320_REG(0x04C4)
161 #define IO_MMC_SD_DMA_STATUS1 DM320_REG(0x04C6)
162 #define IO_MMC_SD_DMA_TIMEOUT DM320_REG(0x04C8)
164 #define IO_SDIO_CONTROL DM320_REG(0x04CA)
165 #define IO_SDIO_STATUS0 DM320_REG(0x04CC)
166 #define IO_SDIO_INT_ENABLE DM320_REG(0x04CE)
167 #define IO_SDIO_INT_STATUS DM320_REG(0x04D0)
169 /* Interrupt Controller */
170 #define IO_INTC_FIQ0 DM320_REG(0x0500)
171 #define IO_INTC_FIQ1 DM320_REG(0x0502)
172 #define IO_INTC_FIQ2 DM320_REG(0x0504)
173 #define IO_INTC_IRQ0 DM320_REG(0x0508)
174 #define IO_INTC_IRQ1 DM320_REG(0x050A)
175 #define IO_INTC_IRQ2 DM320_REG(0x050C)
176 #define IO_INTC_FIQENTRY0 DM320_REG(0x0510)
177 #define IO_INTC_FIQENTRY1 DM320_REG(0x0512)
178 #define IO_INTC_FIQ_LOCK_ADDR0 DM320_REG(0x0514)
179 #define IO_INTC_FIQ_LOCK_ADDR1 DM320_REG(0x0516)
180 #define IO_INTC_IRQENTRY0 DM320_REG(0x0518)
181 #define IO_INTC_IRQENTRY1 DM320_REG(0x051A)
182 #define IO_INTC_IRQ_LOCK_ADDR0 DM320_REG(0x051C)
183 #define IO_INTC_IRQ_LOCK_ADDR1 DM320_REG(0x051E)
184 #define IO_INTC_FISEL0 DM320_REG(0x0520)
185 #define IO_INTC_FISEL1 DM320_REG(0x0522)
186 #define IO_INTC_FISEL2 DM320_REG(0x0524)
187 #define IO_INTC_EINT0 DM320_REG(0x0528)
188 #define IO_INTC_EINT1 DM320_REG(0x052A)
189 #define IO_INTC_EINT2 DM320_REG(0x052C)
190 #define IO_INTC_RAW DM320_REG(0x0530)
191 #define IO_INTC_ENTRY_TBA0 DM320_REG(0x0538)
192 #define IO_INTC_ENTRY_TBA1 DM320_REG(0x053A)
193 #define IO_INTC_PRIORITY0 DM320_REG(0x0540)
194 #define IO_INTC_PRIORITY1 DM320_REG(0x0542)
195 #define IO_INTC_PRIORITY2 DM320_REG(0x0544)
196 #define IO_INTC_PRIORITY3 DM320_REG(0x0546)
197 #define IO_INTC_PRIORITY4 DM320_REG(0x0548)
198 #define IO_INTC_PRIORITY5 DM320_REG(0x054A)
199 #define IO_INTC_PRIORITY6 DM320_REG(0x054C)
200 #define IO_INTC_PRIORITY7 DM320_REG(0x054E)
201 #define IO_INTC_PRIORITY8 DM320_REG(0x0550)
202 #define IO_INTC_PRIORITY9 DM320_REG(0x0552)
203 #define IO_INTC_PRIORITY10 DM320_REG(0x0554)
204 #define IO_INTC_PRIORITY11 DM320_REG(0x0556)
205 #define IO_INTC_PRIORITY12 DM320_REG(0x0558)
206 #define IO_INTC_PRIORITY13 DM320_REG(0x055A)
207 #define IO_INTC_PRIORITY14 DM320_REG(0x055C)
208 #define IO_INTC_PRIORITY15 DM320_REG(0x055E)
209 #define IO_INTC_PRIORITY16 DM320_REG(0x0560)
210 #define IO_INTC_PRIORITY17 DM320_REG(0x0562)
211 #define IO_INTC_PRIORITY18 DM320_REG(0x0564)
212 #define IO_INTC_PRIORITY19 DM320_REG(0x0566)
213 #define IO_INTC_PRIORITY20 DM320_REG(0x0568)
214 #define IO_INTC_PRIORITY21 DM320_REG(0x056A)
215 #define IO_INTC_PRIORITY22 DM320_REG(0x056C)
217 /* GIO Controller */
218 #define IO_GIO_DIR0 DM320_REG(0x0580)
219 #define IO_GIO_DIR1 DM320_REG(0x0582)
220 #define IO_GIO_DIR2 DM320_REG(0x0584)
221 #define IO_GIO_INV0 DM320_REG(0x0586)
222 #define IO_GIO_INV1 DM320_REG(0x0588)
223 #define IO_GIO_INV2 DM320_REG(0x058A)
224 #define IO_GIO_BITSET0 DM320_REG(0x058C)
225 #define IO_GIO_BITSET1 DM320_REG(0x058E)
226 #define IO_GIO_BITSET2 DM320_REG(0x0590)
227 #define IO_GIO_BITCLR0 DM320_REG(0x0592)
228 #define IO_GIO_BITCLR1 DM320_REG(0x0594)
229 #define IO_GIO_BITCLR2 DM320_REG(0x0596)
230 #define IO_GIO_IRQPORT DM320_REG(0x0598)
231 #define IO_GIO_IRQEDGE DM320_REG(0x059A)
232 #define IO_GIO_CHAT0 DM320_REG(0x059C)
233 #define IO_GIO_CHAT1 DM320_REG(0x059E)
234 #define IO_GIO_CHAT2 DM320_REG(0x05A0)
235 #define IO_GIO_NCHAT DM320_REG(0x05A2)
236 #define IO_GIO_FSEL0 DM320_REG(0x05A4)
237 #define IO_GIO_FSEL1 DM320_REG(0x05A6)
238 #define IO_GIO_FSEL2 DM320_REG(0x05A8)
239 #define IO_GIO_FSEL3 DM320_REG(0x05AA)
240 #define IO_GIO_FSEL4 DM320_REG(0x05AC)
241 #define IO_GIO_CARD_SET DM320_REG(0x05AE)
242 #define IO_GIO_CARD_ST DM320_REG(0x05B0)
244 /* DSP Controller */
245 #define IO_DSPC_HPIB_CONTROL DM320_REG(0x0600)
246 #define IO_DSPC_HPIB_STATUS DM320_REG(0x0602)
248 /* OSD Controller */
249 #define IO_OSD_MODE DM320_REG(0x0680)
250 #define IO_OSD_VIDWINMD DM320_REG(0x0682)
251 #define IO_OSD_OSDWINMD0 DM320_REG(0x0684)
252 #define IO_OSD_OSDWINMD1 DM320_REG(0x0686)
253 #define IO_OSD_ATRMD DM320_REG(0x0688)
254 #define IO_OSD_RECTCUR DM320_REG(0x0688)
255 #define IO_OSD_RESERVED DM320_REG(0x068A)
256 #define IO_OSD_VIDWIN0OFST DM320_REG(0x068C)
257 #define IO_OSD_VIDWIN1OFST DM320_REG(0x068E)
258 #define IO_OSD_OSDWIN0OFST DM320_REG(0x0690)
259 #define IO_OSD_OSDWIN1OFST DM320_REG(0x0692)
260 #define IO_OSD_VIDWINADH DM320_REG(0x0694)
261 #define IO_OSD_VIDWIN0ADL DM320_REG(0x0696)
262 #define IO_OSD_VIDWIN1ADL DM320_REG(0x0698)
263 #define IO_OSD_OSDWINADH DM320_REG(0x069A)
264 #define IO_OSD_OSDWIN0ADL DM320_REG(0x069C)
265 #define IO_OSD_OSDWIN1ADL DM320_REG(0x069E)
266 #define IO_OSD_BASEPX DM320_REG(0x06A0)
267 #define IO_OSD_BASEPY DM320_REG(0x06A2)
268 #define IO_OSD_VIDWIN0XP DM320_REG(0x06A4)
269 #define IO_OSD_VIDWIN0YP DM320_REG(0x06A6)
270 #define IO_OSD_VIDWIN0XL DM320_REG(0x06A8)
271 #define IO_OSD_VIDWIN0YL DM320_REG(0x06AA)
272 #define IO_OSD_VIDWIN1XP DM320_REG(0x06AC)
273 #define IO_OSD_VIDWIN1YP DM320_REG(0x06AE)
274 #define IO_OSD_VIDWIN1XL DM320_REG(0x06B0)
275 #define IO_OSD_VIDWIN1YL DM320_REG(0x06B2)
277 #define IO_OSD_OSDWIN0XP DM320_REG(0x06B4)
278 #define IO_OSD_OSDWIN0YP DM320_REG(0x06B6)
279 #define IO_OSD_OSDWIN0XL DM320_REG(0x06B8)
280 #define IO_OSD_OSDWIN0YL DM320_REG(0x06BA)
281 #define IO_OSD_OSDWIN1XP DM320_REG(0x06BC)
282 #define IO_OSD_OSDWIN1YP DM320_REG(0x06BE)
283 #define IO_OSD_OSDWIN1XL DM320_REG(0x06C0)
284 #define IO_OSD_OSDWIN1YL DM320_REG(0x06C2)
285 #define IO_OSD_CURXP DM320_REG(0x06C4)
286 #define IO_OSD_CURYP DM320_REG(0x06C6)
287 #define IO_OSD_CURXL DM320_REG(0x06C8)
288 #define IO_OSD_CURYL DM320_REG(0x06CA)
290 #define IO_OSD_W0BMP01 DM320_REG(0x06D0)
291 #define IO_OSD_W0BMP23 DM320_REG(0x06D2)
292 #define IO_OSD_W0BMP45 DM320_REG(0x06D4)
293 #define IO_OSD_W0BMP67 DM320_REG(0x06D6)
294 #define IO_OSD_W0BMP89 DM320_REG(0x06D8)
295 #define IO_OSD_W0BMPAB DM320_REG(0x06DA)
296 #define IO_OSD_W0BMPCD DM320_REG(0x06DC)
297 #define IO_OSD_W0BMPEF DM320_REG(0x06DE)
299 #define IO_OSD_W1BMP01 DM320_REG(0x06E0)
300 #define IO_OSD_W1BMP23 DM320_REG(0x06E2)
301 #define IO_OSD_W1BMP45 DM320_REG(0x06E4)
302 #define IO_OSD_W1BMP67 DM320_REG(0x06E6)
303 #define IO_OSD_W1BMP89 DM320_REG(0x06E8)
304 #define IO_OSD_W1BMPAB DM320_REG(0x06EA)
305 #define IO_OSD_W1BMPCD DM320_REG(0x06EC)
306 #define IO_OSD_W1BMPEF DM320_REG(0x06EE)
308 #define IO_OSD_MISCCTL DM320_REG(0x06F4)
309 #define IO_OSD_CLUTRAMYCB DM320_REG(0x06F6)
310 #define IO_OSD_CLUTRAMCR DM320_REG(0x06F8)
312 #define IO_OSD_PPWIN0ADH DM320_REG(0x06FC)
313 #define IO_OSD_PPWIN0ADL DM320_REG(0x06FE)
316 /* CCD Controller */
317 #define IO_CCD_SYNCEN DM320_REG(0x0700)
318 #define IO_CCD_MODESET DM320_REG(0x0702)
319 #define IO_CCD_HDWIDTH DM320_REG(0x0704)
320 #define IO_CCD_VDWIDTH DM320_REG(0x0706)
321 #define IO_CCD_PPLN DM320_REG(0x0708)
322 #define IO_CCD_LPFR DM320_REG(0x070A)
323 #define IO_CCD_SPH DM320_REG(0x070C)
324 #define IO_CCD_NPH DM320_REG(0x070E)
325 #define IO_CCD_SLV0 DM320_REG(0x0710)
326 #define IO_CCD_SLV1 DM320_REG(0x0712)
327 #define IO_CCD_NLV DM320_REG(0x0714)
328 #define IO_CCD_CULH DM320_REG(0x0716)
329 #define IO_CCD_CULV DM320_REG(0x0718)
330 #define IO_CCD_HSIZE DM320_REG(0x071A)
331 #define IO_CCD_SDOFST DM320_REG(0x071C)
332 #define IO_CCD_STADRH DM320_REG(0x071E)
333 #define IO_CCD_STADRL DM320_REG(0x0720)
334 #define IO_CCD_CLAMP DM320_REG(0x0722)
335 #define IO_CCD_DCSUB DM320_REG(0x0724)
336 #define IO_CCD_COLPTN DM320_REG(0x0726)
337 #define IO_CCD_BLKCMP0 DM320_REG(0x0728)
338 #define IO_CCD_BLKCMP1 DM320_REG(0x072A)
339 #define IO_CCD_MEDFILT DM320_REG(0x072C)
340 #define IO_CCD_RYEGAIN DM320_REG(0x072E)
341 #define IO_CCD_GRCYGAIN DM320_REG(0x0730)
342 #define IO_CCD_GBGGAIN DM320_REG(0x0732)
343 #define IO_CCD_BMGGAIN DM320_REG(0x0734)
344 #define IO_CCD_OFFSET DM320_REG(0x0736)
345 #define IO_CCD_OUTCLP DM320_REG(0x0738)
346 #define IO_CCD_VDINT0 DM320_REG(0x073A)
347 #define IO_CCD_VDINT1 DM320_REG(0x073C)
348 #define IO_CCD_RSV0 DM320_REG(0x073E)
349 #define IO_CCD_GAMMAWD DM320_REG(0x0740)
350 #define IO_CCD_REC656IF DM320_REG(0x0742)
351 #define IO_CCD_CCDFG DM320_REG(0x0744)
352 #define IO_CCD_FMTCFG DM320_REG(0x0746)
353 #define IO_CCD_FMTSPH DM320_REG(0x0748)
354 #define IO_CCD_FMTLNH DM320_REG(0x074A)
355 #define IO_CCD_FMTSLV DM320_REG(0x074C)
356 #define IO_CCD_FMTSNV DM320_REG(0x074E)
357 #define IO_CCD_FMTOFST DM320_REG(0x0750)
358 #define IO_CCD_FMTRLEN DM320_REG(0x0752)
359 #define IO_CCD_FMTHCNT DM320_REG(0x0754)
360 #define IO_CCD_FMTPTNA DM320_REG(0x0756)
361 #define IO_CCD_FMTPTNB DM320_REG(0x0758)
363 /* NTSC/PAL Encoder */
364 #define IO_VID_ENC_VMOD DM320_REG(0x0800)
365 #define IO_VID_ENC_VDCTL DM320_REG(0x0802)
366 #define IO_VID_ENC_VDPRO DM320_REG(0x0804)
367 #define IO_VID_ENC_SYNCTL DM320_REG(0x0806)
368 #define IO_VID_ENC_HSPLS DM320_REG(0x0808)
369 #define IO_VID_ENC_VSPLS DM320_REG(0x080A)
370 #define IO_VID_ENC_HINT DM320_REG(0x080C)
371 #define IO_VID_ENC_HSTART DM320_REG(0x080E)
372 #define IO_VID_ENC_HVALID DM320_REG(0x0810)
373 #define IO_VID_ENC_VINT DM320_REG(0x0812)
374 #define IO_VID_ENC_VSTART DM320_REG(0x0814)
375 #define IO_VID_ENC_VVALID DM320_REG(0x0816)
376 #define IO_VID_ENC_HSDLY DM320_REG(0x0818)
377 #define IO_VID_ENC_VSDLY DM320_REG(0x081A)
378 #define IO_VID_ENC_YCCTL DM320_REG(0x081C)
379 #define IO_VID_ENC_RGBCTL DM320_REG(0x081E)
380 #define IO_VID_ENC_RGBCLP DM320_REG(0x0820)
381 #define IO_VID_ENC_LNECTL DM320_REG(0x0822)
382 #define IO_VID_ENC_CULLLNE DM320_REG(0x0824)
383 #define IO_VID_ENC_LCDOUT DM320_REG(0x0826)
384 #define IO_VID_ENC_BRTS DM320_REG(0x0828)
385 #define IO_VID_ENC_BRTW DM320_REG(0x082A)
386 #define IO_VID_ENC_ACCTL DM320_REG(0x082C)
387 #define IO_VID_ENC_PWMP DM320_REG(0x082E)
388 #define IO_VID_ENC_PWMW DM320_REG(0x0830)
389 #define IO_VID_ENC_DCLKCTL DM320_REG(0x0832)
390 #define IO_VID_ENC_DCLKPTN0 DM320_REG(0x0834)
391 #define IO_VID_ENC_DCLKPTN1 DM320_REG(0x0836)
392 #define IO_VID_ENC_DCLKPTN2 DM320_REG(0x0838)
393 #define IO_VID_ENC_DCLKPTN3 DM320_REG(0x083A)
394 #define IO_VID_ENC_DCLKPTN0A DM320_REG(0x083C)
395 #define IO_VID_ENC_DCLKPTN1A DM320_REG(0x083E)
396 #define IO_VID_ENC_DCLKPTN2A DM320_REG(0x0840)
397 #define IO_VID_ENC_DCLKPTN3A DM320_REG(0x0842)
398 #define IO_VID_ENC_DCLKHS DM320_REG(0x0844)
399 #define IO_VID_ENC_DCLKHSA DM320_REG(0x0846)
400 #define IO_VID_ENC_DCLKHR DM320_REG(0x0848)
401 #define IO_VID_ENC_DCLKVS DM320_REG(0x084A)
402 #define IO_VID_ENC_DCLKVR DM320_REG(0x084C)
403 #define IO_VID_ENC_CAPCTL DM320_REG(0x084E)
404 #define IO_VID_ENC_CAPDO DM320_REG(0x0850)
405 #define IO_VID_ENC_CAPDE DM320_REG(0x0852)
406 #define IO_VID_ENC_ATR0 DM320_REG(0x0854)
408 /* Clock Controller */
409 #define IO_CLK_PLLA DM320_REG(0x0880)
410 #define IO_CLK_PLLB DM320_REG(0x0882)
411 #define IO_CLK_SEL0 DM320_REG(0x0884)
412 #define IO_CLK_SEL1 DM320_REG(0x0886)
413 #define IO_CLK_SEL2 DM320_REG(0x0888)
414 #define IO_CLK_DIV0 DM320_REG(0x088A)
415 #define IO_CLK_DIV1 DM320_REG(0x088C)
416 #define IO_CLK_DIV2 DM320_REG(0x088E)
417 #define IO_CLK_DIV3 DM320_REG(0x0890)
418 #define IO_CLK_DIV4 DM320_REG(0x0892)
419 #define IO_CLK_BYP DM320_REG(0x0894)
420 #define IO_CLK_INV DM320_REG(0x0896)
421 #define IO_CLK_MOD0 DM320_REG(0x0898)
422 #define IO_CLK_MOD1 DM320_REG(0x089A)
423 #define IO_CLK_MOD2 DM320_REG(0x089C)
424 #define IO_CLK_LPCTL0 DM320_REG(0x089E)
425 #define IO_CLK_LPCTL1 DM320_REG(0x08A0)
426 #define IO_CLK_OSEL DM320_REG(0x08A2)
427 #define IO_CLK_O0DIV DM320_REG(0x08A4)
428 #define IO_CLK_O1DIV DM320_REG(0x08A6)
429 #define IO_CLK_O2DIV DM320_REG(0x08A8)
430 #define IO_CLK_PWM0C DM320_REG(0x08AA)
431 #define IO_CLK_PWM0H DM320_REG(0x08AC)
432 #define IO_CLK_PWM1C DM320_REG(0x08AE)
433 #define IO_CLK_PWM1H DM320_REG(0x08B0)
435 /* Bus Controller */
436 #define IO_BUSC_ECR DM320_REG(0x0900)
437 #define IO_BUSC_EBYTER DM320_REG(0x0902)
438 #define IO_BUSC_EBITR DM320_REG(0x0904)
439 #define IO_BUSC_REVR DM320_REG(0x0906)
441 /* SDRAM Controller */
442 #define IO_SDRAM_SDBUFD0L DM320_REG(0x0980)
443 #define IO_SDRAM_SDBUFD0H DM320_REG(0x0982)
444 #define IO_SDRAM_SDBUFD1L DM320_REG(0x0984)
445 #define IO_SDRAM_SDBUFD1H DM320_REG(0x0986)
446 #define IO_SDRAM_SDBUFD2L DM320_REG(0x0988)
447 #define IO_SDRAM_SDBUFD2H DM320_REG(0x098A)
448 #define IO_SDRAM_SDBUFD3L DM320_REG(0x098C)
449 #define IO_SDRAM_SDBUFD3H DM320_REG(0x098E)
450 #define IO_SDRAM_SDBUFD4L DM320_REG(0x0990)
451 #define IO_SDRAM_SDBUFD4H DM320_REG(0x0992)
452 #define IO_SDRAM_SDBUFD5L DM320_REG(0x0994)
453 #define IO_SDRAM_SDBUFD5H DM320_REG(0x0996)
454 #define IO_SDRAM_SDBUFD6L DM320_REG(0x0998)
455 #define IO_SDRAM_SDBUFD6H DM320_REG(0x099A)
456 #define IO_SDRAM_SDBUFD7L DM320_REG(0x099C)
457 #define IO_SDRAM_SDBUFD7H DM320_REG(0x099E)
458 #define IO_SDRAM_SDBUFAD1 DM320_REG(0x09A0)
459 #define IO_SDRAM_SDBUFAD2 DM320_REG(0x09A2)
460 #define IO_SDRAM_SDBUFCTL DM320_REG(0x09A4)
461 #define IO_SDRAM_SDMODE DM320_REG(0x09A6)
462 #define IO_SDRAM_REFCTL DM320_REG(0x09A8)
463 #define IO_SDRAM_SDPRTY1 DM320_REG(0x09AA)
464 #define IO_SDRAM_SDPRTY2 DM320_REG(0x09AC)
465 #define IO_SDRAM_SDPRTY3 DM320_REG(0x09AE)
466 #define IO_SDRAM_SDPRTY4 DM320_REG(0x09B0)
467 #define IO_SDRAM_SDPRTY5 DM320_REG(0x09B2)
468 #define IO_SDRAM_SDPRTY6 DM320_REG(0x09B4)
469 #define IO_SDRAM_SDPRTY7 DM320_REG(0x09B6)
470 #define IO_SDRAM_SDPRTY8 DM320_REG(0x09B8)
471 #define IO_SDRAM_SDPRTY9 DM320_REG(0x09BA)
472 #define IO_SDRAM_SDPRTY10 DM320_REG(0x09BC)
473 #define IO_SDRAM_SDPRTY11 DM320_REG(0x09BE)
474 #define IO_SDRAM_SDPRTY12 DM320_REG(0x09C0)
475 #define IO_SDRAM_RSV DM320_REG(0x09C2)
476 #define IO_SDRAM_SDPRTYON DM320_REG(0x09C4)
477 #define IO_SDRAM_SDDMASEL DM320_REG(0x09C6)
479 /* EMIF Controller */
480 #define IO_EMIF_CS0CTRL1 DM320_REG(0x0A00)
481 #define IO_EMIF_CS0CTRL2 DM320_REG(0x0A02)
482 #define IO_EMIF_CS0CTRL3 DM320_REG(0x0A04)
483 #define IO_EMIF_CS1CTRL1A DM320_REG(0x0A06)
484 #define IO_EMIF_CS1CTRL1B DM320_REG(0x0A08)
485 #define IO_EMIF_CS1CTRL2 DM320_REG(0x0A0A)
486 #define IO_EMIF_CS2CTRL1 DM320_REG(0x0A0C)
487 #define IO_EMIF_CS2CTRL2 DM320_REG(0x0A0E)
488 #define IO_EMIF_CS3CTRL1 DM320_REG(0x0A10)
489 #define IO_EMIF_CS3CTRL2 DM320_REG(0x0A12)
490 #define IO_EMIF_CS4CTRL1 DM320_REG(0x0A14)
491 #define IO_EMIF_CS4CTRL2 DM320_REG(0x0A16)
492 #define IO_EMIF_BUSCTRL DM320_REG(0x0A18)
493 #define IO_EMIF_BUSRLS DM320_REG(0x0A1A)
494 #define IO_EMIF_CFCTRL1 DM320_REG(0x0A1C)
495 #define IO_EMIF_CFCTRL2 DM320_REG(0x0A1E)
496 #define IO_EMIF_SMCTRL DM320_REG(0x0A20)
497 #define IO_EMIF_BUSINTEN DM320_REG(0x0A22)
498 #define IO_EMIF_BUSSTS DM320_REG(0x0A24)
499 #define IO_EMIF_BUSWAITMD DM320_REG(0x0A26)
500 #define IO_EMIF_ECC1CP DM320_REG(0x0A28)
501 #define IO_EMIF_ECC1LP DM320_REG(0x0A2A)
502 #define IO_EMIF_ECC2CP DM320_REG(0x0A2C)
503 #define IO_EMIF_ECC2LP DM320_REG(0x0A2E)
504 #define IO_EMIF_ECC3CP DM320_REG(0x0A30)
505 #define IO_EMIF_ECC3LP DM320_REG(0x0A32)
506 #define IO_EMIF_ECC4CP DM320_REG(0x0A34)
507 #define IO_EMIF_ECC4LP DM320_REG(0x0A36)
508 #define IO_EMIF_ECC5CP DM320_REG(0x0A38)
509 #define IO_EMIF_ECC5LP DM320_REG(0x0A3A)
510 #define IO_EMIF_ECC6CP DM320_REG(0x0A3C)
511 #define IO_EMIF_ECC6LP DM320_REG(0x0A3E)
512 #define IO_EMIF_ECC7CP DM320_REG(0x0A40)
513 #define IO_EMIF_ECC7LP DM320_REG(0x0A42)
514 #define IO_EMIF_ECC8CP DM320_REG(0x0A44)
515 #define IO_EMIF_ECC8LP DM320_REG(0x0A46)
516 #define IO_EMIF_ECCCLR DM320_REG(0x0A48)
517 #define IO_EMIF_PAGESZ DM320_REG(0x0A4A)
518 #define IO_EMIF_PRIORCTL DM320_REG(0x0A4C)
519 #define IO_EMIF_MGDSPDEST DM320_REG(0x0A4E)
520 #define IO_EMIF_MGDSPADDH DM320_REG(0x0A50)
521 #define IO_EMIF_MGDSPADDL DM320_REG(0x0A52)
522 #define IO_EMIF_AHBADDH DM320_REG(0x0A54)
523 #define IO_EMIF_AHBADDL DM320_REG(0x0A56)
524 #define IO_EMIF_MTCADDH DM320_REG(0x0A58)
525 #define IO_EMIF_MTCADDL DM320_REG(0x0A5A)
526 #define IO_EMIF_DMASIZE DM320_REG(0x0A5C)
527 #define IO_EMIF_DMAMTCSEL DM320_REG(0x0A5E)
528 #define IO_EMIF_DMACTL DM320_REG(0x0A60)
530 /* Preivew Engine */
531 #define IO_PREV_ENG_PVEN DM320_REG(0x0A80)
532 #define IO_PREV_ENG_PVSET1 DM320_REG(0x0A82)
533 #define IO_PREV_ENG_RADRH DM320_REG(0x0A84)
534 #define IO_PREV_ENG_RADRL DM320_REG(0x0A86)
535 #define IO_PREV_ENG_WADRH DM320_REG(0x0A88)
536 #define IO_PREV_ENG_WADRL DM320_REG(0x0A8A)
537 #define IO_PREV_ENG_HSTART DM320_REG(0x0A8C)
538 #define IO_PREV_ENG_HSIZE DM320_REG(0x0A8E)
539 #define IO_PREV_ENG_VSTART DM320_REG(0x0A90)
540 #define IO_PREV_ENG_VSIZE DM320_REG(0x0A92)
541 #define IO_PREV_ENG_PVSET2 DM320_REG(0x0A94)
542 #define IO_PREV_ENG_NFILT DM320_REG(0x0A96)
543 #define IO_PREV_ENG_DGAIN DM320_REG(0x0A98)
544 #define IO_PREV_ENG_WBGAIN0 DM320_REG(0x0A9A)
545 #define IO_PREV_ENG_WBGAIN1 DM320_REG(0x0A9C)
546 #define IO_PREV_ENG_SMTH DM320_REG(0x0A9E)
547 #define IO_PREV_ENG_HRSZ DM320_REG(0x0AA0)
548 #define IO_PREV_ENG_VRSZ DM320_REG(0x0AA2)
549 #define IO_PREV_ENG_BLOFST0 DM320_REG(0x0AA4)
550 #define IO_PREV_ENG_BLOFST1 DM320_REG(0x0AA6)
551 #define IO_PREV_ENG_MTXGAIN0 DM320_REG(0x0AA8)
552 #define IO_PREV_ENG_MTXGAIN1 DM320_REG(0x0AAA)
553 #define IO_PREV_ENG_MTXGAIN2 DM320_REG(0x0AAC)
554 #define IO_PREV_ENG_MTXGAIN3 DM320_REG(0x0AAE)
555 #define IO_PREV_ENG_MTXGAIN4 DM320_REG(0x0AB0)
556 #define IO_PREV_ENG_MTXGAIN5 DM320_REG(0x0AB2)
557 #define IO_PREV_ENG_MTXGAIN6 DM320_REG(0x0AB4)
558 #define IO_PREV_ENG_MTXGAIN7 DM320_REG(0x0AB6)
559 #define IO_PREV_ENG_MTXGAIN8 DM320_REG(0x0AB8)
560 #define IO_PREV_ENG_MTXOFST0 DM320_REG(0x0ABA)
561 #define IO_PREV_ENG_MTXOFST1 DM320_REG(0x0ABC)
562 #define IO_PREV_ENG_MTXOFST2 DM320_REG(0x0ABE)
563 #define IO_PREV_ENG_GAMTBYP DM320_REG(0x0AC0)
564 #define IO_PREV_ENG_CSC0 DM320_REG(0x0AC2)
565 #define IO_PREV_ENG_CSC1 DM320_REG(0x0AC4)
566 #define IO_PREV_ENG_CSC2 DM320_REG(0x0AC6)
567 #define IO_PREV_ENG_CSC3 DM320_REG(0x0AC8)
568 #define IO_PREV_ENG_CSC4 DM320_REG(0x0ACA)
569 #define IO_PREV_ENG_YOFST DM320_REG(0x0ACC)
570 #define IO_PREV_ENG_COFST DM320_REG(0x0ACE)
571 #define IO_PREV_ENG_CNTBRT DM320_REG(0x0AD0)
572 #define IO_PREV_ENG_CSUP0 DM320_REG(0x0AD2)
573 #define IO_PREV_ENG_CSUP1 DM320_REG(0x0AD4)
574 #define IO_PREV_ENG_SETUPY DM320_REG(0x0AD4)
575 #define IO_PREV_ENG_SETUPC DM320_REG(0x0AD8)
576 #define IO_PREV_ENG_TABLE_ADDR DM320_REG(0x0ADA)
577 #define IO_PREV_ENG_TABLE_DATA DM320_REG(0x0ADC)
578 #define IO_PREV_ENG_HG_CTL DM320_REG(0x0ADE)
579 #define IO_PREV_ENG_HG_R0_HSTART DM320_REG(0x0AE0)
580 #define IO_PREV_ENG_HG_R0_HSIZE DM320_REG(0x0AE2)
581 #define IO_PREV_ENG_HG_R0_VSTART DM320_REG(0x0AE4)
582 #define IO_PREV_ENG_HR_R0_VSIZE DM320_REG(0x0AE6)
583 #define IO_PREV_ENG_HG_R1_HSTART DM320_REG(0x0AE8)
584 #define IO_PREV_ENG_HG_R1_HSIZE DM320_REG(0x0AEA)
585 #define IO_PREV_ENG_HG_R1_VSTART DM320_REG(0x0AEC)
586 #define IO_PREV_ENG_HG_R1_VSIZE DM320_REG(0x0AEE)
587 #define IO_PREV_ENG_HG_R2_HSTART DM320_REG(0x0AF0)
588 #define IO_PREV_ENG_HG_R2_HSIZE DM320_REG(0x0AF2)
589 #define IO_PREV_ENG_HG_R2_VSTART DM320_REG(0x0AF4)
590 #define IO_PREV_ENG_HG_R2_VSIZE DM320_REG(0x0AF6)
591 #define IO_PREV_ENG_HG_R3_HSTART DM320_REG(0x0AF8)
592 #define IO_PREV_ENG_HG_R3_HSIZE DM320_REG(0x0AFA)
593 #define IO_PREV_ENG_HG_R3_VSTART DM320_REG(0x0AFC)
594 #define IO_PREV_ENG_HG_R3_VSIZE DM320_REG(0x0AFE)
595 #define IO_PREV_ENG_HG_ADDR DM320_REG(0x0B00)
596 #define IO_PREV_ENG_HG_DATA DM320_REG(0x0B02)
598 /* H3A Hardware */
599 #define IO_H3A_H3ACTRL DM320_REG(0x0B80)
600 #define IO_H3A_AFCTRL DM320_REG(0x0B82)
601 #define IO_H3A_AFPAX1 DM320_REG(0x0B84)
602 #define IO_H3A_AFPAX2 DM320_REG(0x0B86)
603 #define IO_H3A_AFPAX3 DM320_REG(0x0B88)
604 #define IO_H3A_AFPAX4 DM320_REG(0x0B8A)
605 #define IO_H3A_AFIRSH DM320_REG(0x0B8C)
606 #define IO_H3A_AFPAX5 DM320_REG(0x0B8E)
607 #define IO_H3A_AFSDRA1 DM320_REG(0x0B90)
608 #define IO_H3A_AFSDRA2 DM320_REG(0x0B92)
609 #define IO_H3A_AFSDRFLG DM320_REG(0x0B94)
610 #define IO_H3A_AFCOEFF10 DM320_REG(0x0B96)
611 #define IO_H3A_AFCOEFF11 DM320_REG(0x0B98)
612 #define IO_H3A_AFCOEFF12 DM320_REG(0x0B9A)
613 #define IO_H3A_AFCOEFF13 DM320_REG(0x0B9C)
614 #define IO_H3A_AFCOEFF14 DM320_REG(0x0B9E)
615 #define IO_H3A_AFCOEFF15 DM320_REG(0x0BA0)
616 #define IO_H3A_AFCOEFF16 DM320_REG(0x0BA2)
617 #define IO_H3A_AFCOEFF17 DM320_REG(0x0BA4)
618 #define IO_H3A_AFCOEFF18 DM320_REG(0x0BA6)
619 #define IO_H3A_AFCOEFF19 DM320_REG(0x0BA8)
620 #define IO_H3A_AFCOEFF110 DM320_REG(0x0BAA)
621 #define IO_H3A_AFCOEFF20 DM320_REG(0x0BAC)
622 #define IO_H3A_AFCOEFF21 DM320_REG(0x0BAE)
623 #define IO_H3A_AFCOEFF22 DM320_REG(0x0BB0)
624 #define IO_H3A_AFCOEFF23 DM320_REG(0x0BB2)
625 #define IO_H3A_AFCOEFF24 DM320_REG(0x0BB4)
626 #define IO_H3A_AFCOEFF25 DM320_REG(0x0BB6)
627 #define IO_H3A_AFCOEFF26 DM320_REG(0x0BB8)
628 #define IO_H3A_AFCOEFF27 DM320_REG(0x0BBA)
629 #define IO_H3A_AFCOEFF28 DM320_REG(0x0BBC)
630 #define IO_H3A_AFCOEFF29 DM320_REG(0x0BBE)
631 #define IO_H3A_AFCOEFF210 DM320_REG(0x0BC0)
632 #define IO_H3A_AEWCTRL DM320_REG(0x0BC2)
633 #define IO_H3A_AEWWIN1 DM320_REG(0x0BC4)
634 #define IO_H3A_AEWWIN2 DM320_REG(0x0BC6)
635 #define IO_H3A_AEWWIN3 DM320_REG(0x0BC8)
636 #define IO_H3A_AEWWIN4 DM320_REG(0x0BCA)
637 #define IO_H3A_AEWWIN5 DM320_REG(0x0BCC)
638 #define IO_H3A_AEWSDRA1 DM320_REG(0x0BCE)
639 #define IO_H3A_AEWSDRA2 DM320_REG(0x0BD0)
640 #define IO_H3A_AEWSDRFLG DM320_REG(0x0BD2)
642 /* Reserved 0x0C00 - 0x0CCFF */
644 /* Memory Stick Controller : */
645 #define IO_MEM_STICK_MODE DM320_REG(0x0C80)
646 #define IO_MEM_STICK_CMD DM320_REG(0x0C82)
647 #define IO_MEM_STICK_DATA DM320_REG(0x0C84)
648 #define IO_MEM_STICK_STATUS DM320_REG(0x0C86)
649 #define IO_MEM_STICK_SYS DM320_REG(0x0C88)
650 #define IO_MEM_STICK_ENDIAN DM320_REG(0x0C8A)
651 #define IO_MEM_STICK_INT_STATUS DM320_REG(0x0C8C)
652 #define IO_MEM_STICK_DMA_TRG DM320_REG(0x0C8E)
653 #define IO_MEM_STICK_DMA_MODE DM320_REG(0x0C90)
654 #define IO_MEM_STICK_SDRAM_ADDL DM320_REG(0x0C92)
655 #define IO_MEM_STICK_SDRAM_ADDH DM320_REG(0x0C94)
656 #define IO_MEM_STICK_DMA_STATUS DM320_REG(0x0C96)
658 /* ATM : WBB Need to find these Register values */
659 #define IO_ATM_ DM320_REG(0x0D00)
661 /* I2C */
662 #define IO_I2C_TXDATA DM320_REG(0x0D80)
663 #define IO_I2C_RXDATA DM320_REG(0x0D82)
664 #define IO_I2C_SCS DM320_REG(0x0D84)
666 /* VLYNQ */
667 #define VL_ID DM320_REG2(0x0300)
668 #define VL_CTRL DM320_REG2(0x0304)
669 #define VL_STAT DM320_REG2(0x0308)
670 #define VL_INTPRI DM320_REG2(0x030c)
671 #define VL_INTST DM320_REG2(0x0310)
672 #define VL_INTPND DM320_REG2(0x0314)
673 #define VL_INTPTR DM320_REG2(0x0318)
674 #define VL_TXMAP DM320_REG2(0x031c)
675 #define VL_RXMAPSZ1 DM320_REG2(0x0320)
676 #define VL_RXMAPOF1 DM320_REG2(0x0324)
677 #define VL_RXMAPSZ2 DM320_REG2(0x0328)
678 #define VL_RXMAPOF2 DM320_REG2(0x032c)
679 #define VL_RXMAPSZ3 DM320_REG2(0x0330)
680 #define VL_RXMAPOF3 DM320_REG2(0x0334)
681 #define VL_RXMAPSZ4 DM320_REG2(0x0338)
682 #define VL_RXMAPOF4 DM320_REG2(0x033c)
683 #define VL_CHIPVER DM320_REG2(0x0340)
684 #define VL_AUTONEG DM320_REG2(0x0344)
685 #define VL_MANNEG DM320_REG2(0x0348)
686 #define VL_NEGSTAT DM320_REG2(0x034c)
687 #define VL_ENDIAN DM320_REG2(0x035c)
688 #define VL_INTVEC30 DM320_REG2(0x0360)
689 #define VL_INTVEC74 DM320_REG2(0x0364)
690 #define VL_ID_R DM320_REG2(0x0380)
691 #define VL_CTRL_R DM320_REG2(0x0384)
692 #define VL_STAT_R DM320_REG2(0x0388)
693 #define VL_INTPRI_R DM320_REG2(0x038c)
694 #define VL_INTST_R DM320_REG2(0x0390)
695 #define VL_INTPND_R DM320_REG2(0x0394)
696 #define VL_INTPTR_R DM320_REG2(0x0398)
697 #define VL_TXMAP_R DM320_REG2(0x039c)
698 #define VL_RXMAPSZ1_R DM320_REG2(0x03a0)
699 #define VL_RXMAPOF1_R DM320_REG2(0x03a4)
700 #define VL_RXMAPSZ2_R DM320_REG2(0x03a8)
701 #define VL_RXMAPOF2_R DM320_REG2(0x03ac)
702 #define VL_RXMAPSZ3_R DM320_REG2(0x03b0)
703 #define VL_RXMAPOF3_R DM320_REG2(0x03b4)
704 #define VL_RXMAPSZ4_R DM320_REG2(0x03b8)
705 #define VL_RXMAPOF4_R DM320_REG2(0x03bc)
706 #define VL_CHIPVER_R DM320_REG2(0x03c0)
707 #define VL_AUTONEG_R DM320_REG2(0x03c4)
708 #define VL_MANNEG_R DM320_REG2(0x03c8)
709 #define VL_NEGSTAT_R DM320_REG2(0x03cc)
710 #define VL_ENDIAN_R DM320_REG2(0x03dc)
711 #define VL_INTVEC30_R DM320_REG2(0x03e0)
712 #define VL_INTVEC74_R DM320_REG2(0x03e4)
714 /* Coprocessor Interface */
715 #define COP_SDEM_ADDRH DM320_COP(0xe000)
716 #define COP_SDEM_ADDRL DM320_COP(0xe002)
717 #define COP_SDEM_LOFST DM320_COP(0xe004)
718 #define COP_BUF_ADDR DM320_COP(0xe006)
719 #define COP_BUF_LOFST DM320_COP(0xe008)
720 #define COP_DMA_XNUM DM320_COP(0xe00a)
721 #define COP_DMA_YNUM DM320_COP(0xe00c)
722 #define COP_DMA_CTRL DM320_COP(0xe00e)
723 #define COP_BUF_MUX0 DM320_COP(0xe010)
724 #define COP_BUF_MUX1 DM320_COP(0xe012)
725 #define COP_IMG_MODE DM320_COP(0xe014)
726 #define COP_CP_CLKC DM320_COP(0xe502)
729 /* Taken from linux/include/asm-arm/arch-itdm320/irqs.h
731 * Copyright (C) 1999 ARM Limited
732 * Copyright (C) 2004 Ingenient Technologies
736 * Interrupt numbers
738 #define IRQ_TIMER0 0
739 #define IRQ_TIMER1 1
740 #define IRQ_TIMER2 2
741 #define IRQ_TIMER3 3
742 #define IRQ_CCD_VD0 4
743 #define IRQ_CCD_VD1 5
744 #define IRQ_CCD_WEN 6
745 #define IRQ_VENC 7
746 #define IRQ_SERIAL0 8
747 #define IRQ_SERIAL1 9
748 #define IRQ_EXT_HOST 10
749 #define IRQ_DSPHINT 11
750 #define IRQ_UART0 12
751 #define IRQ_UART1 13
752 #define IRQ_USB_DMA 14
753 #define IRQ_USB_CORE 15
754 #define IRQ_VLYNQ 16
755 #define IRQ_MTC0 17
756 #define IRQ_MTC1 18
757 #define IRQ_SD_MMC 19
758 #define IRQ_SDIO_MS 20
759 #define IRQ_GIO0 21
760 #define IRQ_GIO1 22
761 #define IRQ_GIO2 23
762 #define IRQ_GIO3 24
763 #define IRQ_GIO4 25
764 #define IRQ_GIO5 26
765 #define IRQ_GIO6 27
766 #define IRQ_GIO7 28
767 #define IRQ_GIO8 29
768 #define IRQ_GIO9 30
769 #define IRQ_GIO10 31
770 #define IRQ_GIO11 32
771 #define IRQ_GIO12 33
772 #define IRQ_GIO13 34
773 #define IRQ_GIO14 35
774 #define IRQ_GIO15 36
775 #define IRQ_PREVIEW0 37
776 #define IRQ_PREVIEW1 38
777 #define IRQ_WATCHDOG 39
778 #define IRQ_I2C 40
779 #define IRQ_CLKC 41
781 /* Embedded Debugging Interrupts */
782 #define IRQ_ICE 42
783 #define IRQ_ARMCOM_RX 43
784 #define IRQ_ARMCOM_TX 44
786 #define IRQ_RESERVED 45
788 #define NR_IRQS 46
790 /* Taken from linux/include/asm-arm/arch-integrator/timex.h
792 * Copyright (C) 1999 ARM Limited
795 #define CONFIG_TIMER0_TMMD_STOP 0x0000
796 #define CONFIG_TIMER0_TMMD_ONE_SHOT 0x0001
797 #define CONFIG_TIMER0_TMMD_FREE_RUN 0x0002
799 #define CONFIG_TIMER1_TMMD_STOP 0x0000
800 #define CONFIG_TIMER1_TMMD_ONE_SHOT 0x0001
801 #define CONFIG_TIMER1_TMMD_FREE_RUN 0x0002
803 #define CONFIG_TIMER2_TMMD_STOP 0x0000
804 #define CONFIG_TIMER2_TMMD_ONE_SHOT 0x0001
805 #define CONFIG_TIMER2_TMMD_FREE_RUN 0x0002
806 #define CONFIG_TIMER2_TMMD_CCD_SHUTTER 0x0100
807 #define CONFIG_TIMER2_TMMD_CCD_STROBE 0x0200
808 #define CONFIG_TIMER2_TMMD_POLARITY 0x0400
809 #define CONFIG_TIMER2_TMMD_TRG_SELECT 0x0800
810 #define CONFIG_TIMER2_TMMD_TRG_READY 0x1000
811 #define CONFIG_TIMER2_TMMD_SIGNAL 0x2000
813 #define CONFIG_TIMER3_TMMD_STOP 0x0000
814 #define CONFIG_TIMER3_TMMD_ONE_SHOT 0x0001
815 #define CONFIG_TIMER3_TMMD_FREE_RUN 0x0002
816 #define CONFIG_TIMER3_TMMD_CCD_SHUTTER 0x0100
817 #define CONFIG_TIMER3_TMMD_CCD_STROBE 0x0200
818 #define CONFIG_TIMER3_TMMD_POLARITY 0x0400
819 #define CONFIG_TIMER3_TMMD_TRG_SELECT 0x0800
820 #define CONFIG_TIMER3_TMMD_TRG_READY 0x1000
821 #define CONFIG_TIMER3_TMMD_SIGNAL 0x2000
824 * IO_MODx bits
826 #define CLK_MOD0_HPIB (1 << 11)
827 #define CLK_MOD0_DSP (1 << 10)
828 #define CLK_MOD0_EXTHOST (1 << 9)
829 #define CLK_MOD0_SDRAMC (1 << 8)
830 #define CLK_MOD0_EMIF (1 << 7)
831 #define CLK_MOD0_INTC (1 << 6)
832 #define CLK_MOD0_AIM (1 << 5)
833 #define CLK_MOD0_E2ICE (1 << 4)
834 #define CLK_MOD0_ETM (1 << 3)
835 #define CLK_MOD0_AHB (1 << 2)
836 #define CLK_MOD0_BUSC (1 << 1)
837 #define CLK_MOD0_ARM (1 << 0)
839 #define CLK_MOD1_CPBUS (1 << 11)
840 #define CLK_MOD1_SEQ (1 << 10)
841 #define CLK_MOD1_DCT (1 << 9)
842 #define CLK_MOD1_IMGBUF (1 << 8)
843 #define CLK_MOD1_IMX (1 << 7)
844 #define CLK_MOD1_VLCD (1 << 6)
845 #define CLK_MOD1_DAC (1 << 5)
846 #define CLK_MOD1_VENC (1 << 4)
847 #define CLK_MOD1_OSD (1 << 3)
848 #define CLK_MOD1_PRV (1 << 2)
849 #define CLK_MOD1_H3A (1 << 1)
850 #define CLK_MOD1_CCDC (1 << 0)
852 #define CLK_MOD2_TEST (1 << 15)
853 #define CLK_MOD2_MS (1 << 14)
854 #define CLK_MOD2_VLYNQ (1 << 13)
855 #define CLK_MOD2_I2C (1 << 12)
856 #define CLK_MOD2_MMC (1 << 11)
857 #define CLK_MOD2_SIF1 (1 << 10)
858 #define CLK_MOD2_SIF0 (1 << 9)
859 #define CLK_MOD2_UART1 (1 << 8)
860 #define CLK_MOD2_UART0 (1 << 7)
861 #define CLK_MOD2_USB (1 << 6)
862 #define CLK_MOD2_GIO (1 << 5)
863 #define CLK_MOD2_CCDTMR1 (1 << 4)
864 #define CLK_MOD2_CCDTMR0 (1 << 3)
865 #define CLK_MOD2_TMR1 (1 << 2)
866 #define CLK_MOD2_TMR0 (1 << 1)
867 #define CLK_MOD2_WDT (1 << 0)
869 #define CLK_SEL1_OSD (1 << 12)
870 #define CLK_SEL1_CCD (1 << 8)
871 #define CLK_SEL1_VENCPLL (1 << 4)
872 #define CLK_SEL1_VENC(x) (x << 0)
874 #define CLK_OSEL_O2SEL(x) (x << 8)
875 #define CLK_OSEL_O1SEL(x) (x << 4)
876 #define CLK_OSEL_O0SEL(x) (x << 0)
878 #define CLK_BYP_AXL (1 << 12)
879 #define CLK_BYP_SDRAM (1 << 8)
880 #define CLK_BYP_DSP (1 << 4)
881 #define CLK_BYP_ARM (1 << 0)
884 * IO_EINTx bits
886 #define INTR_EINT0_USB1 (1 << 15)
887 #define INTR_EINT0_USB0 (1 << 14)
888 #define INTR_EINT0_UART1 (1 << 13)
889 #define INTR_EINT0_UART0 (1 << 12)
890 #define INTR_EINT0_IMGBUF (1 << 11)
891 #define INTR_EINT0_EXTHOST (1 << 10)
892 #define INTR_EINT0_SP1 (1 << 9)
893 #define INTR_EINT0_SP0 (1 << 8)
894 #define INTR_EINT0_VENC (1 << 7)
895 #define INTR_EINT0_CCDWEN (1 << 6)
896 #define INTR_EINT0_CCDVD1 (1 << 5)
897 #define INTR_EINT0_CCDVD0 (1 << 4)
898 #define INTR_EINT0_TMR3 (1 << 3)
899 #define INTR_EINT0_TMR2 (1 << 2)
900 #define INTR_EINT0_TMR1 (1 << 1)
901 #define INTR_EINT0_TMR0 (1 << 0)
903 #define INTR_EINT1_EXT10 (1 << 15)
904 #define INTR_EINT1_EXT9 (1 << 14)
905 #define INTR_EINT1_EXT8 (1 << 13)
906 #define INTR_EINT1_EXT7 (1 << 12)
907 #define INTR_EINT1_EXT6 (1 << 11)
908 #define INTR_EINT1_EXT5 (1 << 10)
909 #define INTR_EINT1_EXT4 (1 << 9)
910 #define INTR_EINT1_EXT3 (1 << 8)
911 #define INTR_EINT1_EXT2 (1 << 7)
912 #define INTR_EINT1_EXT1 (1 << 6)
913 #define INTR_EINT1_EXT0 (1 << 5)
914 #define INTR_EINT1_MMCSDMS1 (1 << 4)
915 #define INTR_EINT1_MMCSDMS0 (1 << 3)
916 #define INTR_EINT1_MTC1 (1 << 2)
917 #define INTR_EINT1_MTC0 (1 << 1)
918 #define INTR_EINT1_VLYNQ (1 << 0)
920 #define INTR_EINT2_RSVINT (1 << 13)
921 #define INTR_EINT2_ARMCOMTX (1 << 12)
922 #define INTR_EINT2_ARMCOMRX (1 << 11)
923 #define INTR_EINT2_E2ICE (1 << 10)
924 #define INTR_EINT2_INTRC (1 << 9)
925 #define INTR_EINT2_I2C (1 << 8)
926 #define INTR_EINT2_WDT (1 << 7)
927 #define INTR_EINT2_PREV1 (1 << 6)
928 #define INTR_EINT2_PREV0 (1 << 5)
929 #define INTR_EINT2_EXT15 (1 << 4)
930 #define INTR_EINT2_EXT14 (1 << 3)
931 #define INTR_EINT2_EXT13 (1 << 2)
932 #define INTR_EINT2_EXT12 (1 << 1)
933 #define INTR_EINT2_EXT11 (1 << 0)
936 * IO_IRQx bits
938 #define INTR_IRQ0_TMR0 INTR_EINT0_TMR0
939 #define INTR_IRQ0_TMR1 INTR_EINT0_TMR1
940 #define INTR_IRQ0_TMR2 INTR_EINT0_TMR2
941 #define INTR_IRQ0_TMR3 INTR_EINT0_TMR3
942 #define INTR_IRQ0_UART1 INTR_EINT0_UART1
943 #define INTR_IRQ0_CCDVD1 INTR_EINT0_CCDVD1
944 #define INTR_IRQ0_IMGBUF INTR_EINT0_IMGBUF
946 #define INTR_IRQ1_EXT0 INTR_EINT1_EXT0
947 #define INTR_IRQ1_EXT2 INTR_EINT1_EXT2
948 #define INTR_IRQ1_EXT7 INTR_EINT1_EXT7
949 #define INTR_IRQ1_MTC0 INTR_EINT1_MTC0
952 * HPIBCTL bits
954 #define HPIBCTL_DBIO (1 << 10)
955 #define HPIBCTL_DHOLD (1 << 9)
956 #define HPIBCTL_DRST (1 << 8)
957 #define HPIBCTL_DINT0 (1 << 7)
958 #define HPIBCTL_EXCHG (1 << 5)
959 #define HPIBCTL_HPNMI (1 << 3)
960 #define HPIBCTL_HPIEN (1 << 0)
963 * Video Encoder bits
965 #define VENC_VMOD_VDMD(x) (x << 12)
966 #define VENC_VMOD_ITLC (1 << 10)
967 #define VENC_VMOD_CBTYP (1 << 9)
968 #define VENC_VMOD_CBMD (1 << 8)
969 #define VENC_VMOD_NTPLS(x) (x << 6)
970 #define VENC_VMOD_SLAVE (1 << 5)
971 #define VENC_VMOD_VMD (1 << 4)
972 #define VENC_VMOD_BLNK (1 << 3)
973 #define VENC_VMOD_DACPD (1 << 2)
974 #define VENC_VMOD_VIE (1 << 1)
975 #define VENC_VMOD_VENC (1 << 0)
977 #define VENC_VDCTL_VCLKP (1 << 14)
978 #define VENC_VDCTL_VCLKE (1 << 13)
979 #define VENC_VDCTL_VCLKZ (1 << 12)
980 #define VENC_VDCTL_DOMD(x) (x << 4)
981 #define VENC_VDCTL_YCDC (1 << 2)
982 #define VENC_VDCTL_INPTRU (1 << 1)
983 #define VENC_VDCTL_YCDIR (1 << 0)
985 #define VENC_VDPRO_PFLTY(x) (x << 12)
986 #define VENC_VDPRO_PFLTR (1 << 11)
987 #define VENC_VDPRO_YCDLY(x) (x << 8)
988 #define VENC_VDPRO_RGBMAT (1 << 7)
989 #define VENC_VDPRO_ATRGB (1 << 6)
990 #define VENC_VDPRO_ATYCC (1 << 5)
991 #define VENC_VDPRO_ATCOM (1 << 4)
992 #define VENC_VDPRO_STUP (1 << 3)
993 #define VENC_VDPRO_CRCUT (1 << 2)
994 #define VENC_VDPRO_CUPS (1 << 1)
995 #define VENC_VDPRO_YUPS (1 << 0)
997 #define VENC_SYNCTL_EXFEN (1 << 12)
998 #define VENC_SYNCTL_EXFIV (1 << 11)
999 #define VENC_SYNCTL_EXSYNC (1 << 10)
1000 #define VENC_SYNCTL_EXVIV (1 << 9)
1001 #define VENC_SYNCTL_EXHIV (1 << 8)
1002 #define VENC_SYNCTL_CSP (1 << 7)
1003 #define VENC_SYNCTL_CSE (1 << 6)
1004 #define VENC_SYNCTL_SYSW (1 << 5)
1005 #define VENC_SYNCTL_VSYNCS (1 << 4)
1006 #define VENC_SYNCTL_VPL (1 << 3)
1007 #define VENC_SYNCTL_HPL (1 << 2)
1008 #define VENC_SYNCTL_SYE (1 << 1)
1009 #define VENC_SYNCTL_SYDIR (1 << 0)
1011 #define VENC_RGBCTL_IRONM (1 << 11)
1012 #define VENC_RGBCTL_DFLTR (1 << 10)
1013 #define VENC_RGBCTL_DFLTS(x) (x << 8)
1014 #define VENC_RGBCTL_RGBEF(x) (x << 4)
1015 #define VENC_RGBCTL_RGBOF(x) (x << 0)
1017 #define VENC_RGBCLP_UCLIP(x) (x << 8)
1018 #define VENC_RGBCLP_OFST(x) (x << 0)
1020 #define VENC_LCDOUT_FIDS (1 << 8)
1021 #define VENC_LCDOUT_FIDP (1 << 7)
1022 #define VENC_LCDOUT_PWMP (1 << 6)
1023 #define VENC_LCDOUT_PWME (1 << 5)
1024 #define VENC_LCDOUT_ACE (1 << 4)
1025 #define VENC_LCDOUT_BRP (1 << 3)
1026 #define VENC_LCDOUT_BRE (1 << 2)
1027 #define VENC_LCDOUT_OEP (1 << 1)
1028 #define VENC_LCDOUT_OEE (1 << 0)
1030 #define VENC_DCLKCTL_DOFST(x) (x << 12)
1031 #define VENC_DCLKCTL_DCKEC (1 << 11)
1032 #define VENC_DCLKCTL_DCKME (1 << 10)
1033 #define VENC_DCLKCTL_DCKOH (1 << 9)
1034 #define VENC_DCLKCTL_DCKIH (1 << 8)
1035 #define VENC_DCLKCTL_DCKPW(x) (x << 0)
1037 /* Timer frequency */
1038 /* timer is based on PCLK and minimum division is 2 */
1039 #define TIMER_FREQ (27000000)
1041 #endif