OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [arm/] [arm9/] [innovator/] [v2_0/] [include/] [innovator.h] - Blame information for rev 773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
#ifndef CYGONCE_INNOVATOR_H
2
#define CYGONCE_INNOVATOR_H
3
 
4
//=============================================================================
5
//
6
//      innovator.h
7
//
8
//      Platform specific support (register layout, etc)
9
//
10
//=============================================================================
11
//####ECOSGPLCOPYRIGHTBEGIN####
12
// -------------------------------------------
13
// This file is part of eCos, the Embedded Configurable Operating System.
14
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15
//
16
// eCos is free software; you can redistribute it and/or modify it under
17
// the terms of the GNU General Public License as published by the Free
18
// Software Foundation; either version 2 or (at your option) any later version.
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
21
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23
// for more details.
24
//
25
// You should have received a copy of the GNU General Public License along
26
// with eCos; if not, write to the Free Software Foundation, Inc.,
27
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28
//
29
// As a special exception, if other files instantiate templates or use macros
30
// or inline functions from this file, or you compile this file and link it
31
// with other works to produce a work based on this file, this file does not
32
// by itself cause the resulting work to be covered by the GNU General Public
33
// License. However the source code for this file must still be made available
34
// in accordance with section (3) of the GNU General Public License.
35
//
36
// This exception does not invalidate any other reasons why a work based on
37
// this file might be covered by the GNU General Public License.
38
//
39
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
40
// at http://sources.redhat.com/ecos/ecos-license/
41
// -------------------------------------------
42
//####ECOSGPLCOPYRIGHTEND####
43
//=============================================================================
44
//#####DESCRIPTIONBEGIN####
45
//
46
// Author(s):    Patrick Doyle <wpd@delcomsys.com>
47
// Contributors: Patrick Doyle <wpd@delcomsys.com>
48
// Date:         2002-12-01
49
// Purpose:      Innovator platform specific support definitions
50
// Description: 
51
// Usage:        #include <cyg/hal/innovator.h>
52
//
53
//####DESCRIPTIONEND####
54
//
55
//=============================================================================
56
 
57
#include <pkgconf/hal_arm_arm9_innovator.h>
58
 
59
// Memory mapping
60
#define FLASH_CS0_BASE     0x00000000
61
#define FLASH_CS1_BASE     0x04000000
62
#define FLASH_CS2_BASE     0x08000000
63
#define FLASH_CS3_BASE     0x0C000000
64
#define SDRAM_BASE         0x10000000
65
#define INTERNAL_SRAM_BASE 0x20000000
66
 
67
// Most of this should be moved to a separate omap.h or omap_1510.h file
68
// CLKM Registers
69
#define CLKM_BASE         0xFFFECE00
70
#define _CLKM_ARM_CKCTL   0x00
71
#define _CLKM_ARM_IDLECT1 0x04
72
#define _CLKM_ARM_IDLECT2 0x08
73
#define _CLKM_ARM_EWUPCT  0x0C
74
#define _CLKM_ARM_RSTCT1  0x10
75
#define _CLKM_ARM_RSTCT2  0x14
76
#define _CLKM_ARM_SYSST   0x18
77
 
78
#define CLKM_ARM_CKCTL   (volatile short *)(CLKM_BASE + _CLKM_ARM_CKCTL)
79
#define CLKM_ARM_IDLECT1 (volatile short *)(CLKM_BASE + _CLKM_ARM_IDLECT1)
80
#define CLKM_ARM_IDLECT2 (volatile short *)(CLKM_BASE + _CLKM_ARM_IDLECT2)
81
#define CLKM_ARM_EWUPCT  (volatile short *)(CLKM_BASE + _CLKM_ARM_EWUPCT)
82
#define CLKM_ARM_RSTCT1  (volatile short *)(CLKM_BASE + _CLKM_ARM_RSTCT1)
83
#define CLKM_ARM_RSTCT2  (volatile short *)(CLKM_BASE + _CLKM_ARM_RSTCT2)
84
#define CLKM_ARM_SYSST   (volatile short *)(CLKM_BASE + _CLKM_ARM_SYSST)
85
 
86
// Watchdog Registers
87
#define WATCHDOG_BASE 0xFFFEC800
88
#define _WD_CNTL_TIMER 0x00
89
#define _WD_LOAD_TIM   0x04
90
#define _WD_READ_TIM   0x04
91
#define _WD_TIMER_MODE 0x08
92
 
93
#define WATCHDOG_CNTL_TIMER (volatile short *)(WATCHDOG_BASE + _WD_CNTL_TIMER)
94
#define WATCHDOG_LOAD_TIM   (volatile short *)(WATCHDOG_BASE + _WD_LOAD_TIM)
95
#define WATCHDOG_READ_TIM   (volatile short *)(WATCHDOG_BASE + _WD_READ_TIM)
96
#define WATCHDOG_TIMER_MODE (volatile short *)(WATCHDOG_BASE + _WD_TIMER_MODE)
97
 
98
/* Nothing below this line has been scrubbed yet */
99
/* DPLL Registers */
100
#define DPLL1_BASE    0xFFFECF00
101
#define DPLL2_BASE    0xFFFED000
102
#define DPLL3_BASE    0xFFFED100
103
 
104
#define _DPLL_CTL_REG 0x00
105
 
106
#define DPLL1_CTL_REG (volatile short *)(DPLL1_BASE + _DPLL_CTL_REG)
107
#define DPLL2_CTL_REG (volatile short *)(DPLL2_BASE + _DPLL_CTL_REG)
108
#define DPLL3_CTL_REG (volatile short *)(DPLL3_BASE + _DPLL_CTL_REG)
109
 
110
#define FPGA_BASE     0x08000000    /* CS2_BASE */
111
#define CONFIG_BASE   0xFFFE1000
112
#define TC_BASE       0xFFFECC00
113
 
114
/* FPGA Registers */
115
#define FPGA_PWR_CTRL_REG      (*(volatile char     *)(FPGA_BASE     + 0x05))
116
 
117
/* Configuration Registers */
118
#define CONFIG_FUNC_MUX_CTRL_0 (*(volatile unsigned *)(CONFIG_BASE   + 0x00))
119
#define CONFIG_FUNC_MUX_CTRL_1 (*(volatile unsigned *)(CONFIG_BASE   + 0x04))
120
#define CONFIG_FUNC_MUX_CTRL_2 (*(volatile unsigned *)(CONFIG_BASE   + 0x08))
121
 
122
/* Traffic Controller Registers */
123
#define TC_IMIF_PRIO           (*(volatile unsigned *)(TC_BASE       + 0x00))
124
#define TC_EMIFS_PRIO_REG      (*(volatile unsigned *)(TC_BASE       + 0x04))
125
#define TC_EMIFF_PRIO_REG      (*(volatile unsigned *)(TC_BASE       + 0x08))
126
#define TC_EMIFS_CONFIG_REG    (*(volatile unsigned *)(TC_BASE       + 0x0C))
127
#define TC_EMIFS_CS0_CONFIG    (*(volatile unsigned *)(TC_BASE       + 0x10))
128
#define TC_EMIFS_CS1_CONFIG    (*(volatile unsigned *)(TC_BASE       + 0x14))
129
#define TC_EMIFS_CS2_CONFIG    (*(volatile unsigned *)(TC_BASE       + 0x18))
130
#define TC_EMIFS_CS3_CONFIG    (*(volatile unsigned *)(TC_BASE       + 0x1C))
131
#define TC_EMIFF_SDRAM_CONFIG  (*(volatile unsigned *)(TC_BASE       + 0x20))
132
#define TC_EMIFF_MRS           (*(volatile unsigned *)(TC_BASE       + 0x24))
133
#define TC_TIMEOUT1            (*(volatile unsigned *)(TC_BASE       + 0x28))
134
#define TC_TIMEOUT2            (*(volatile unsigned *)(TC_BASE       + 0x2C))
135
#define TC_TIMEOUT3            (*(volatile unsigned *)(TC_BASE       + 0x30))
136
#define TC_ENDIANISM           (*(volatile unsigned *)(TC_BASE       + 0x34))
137
 
138
/* Believe it or not, these actually make the code more readable in a few
139
 * places.
140
 */
141
#ifndef BIT_00
142
#define BIT_00 0x00000001
143
#define BIT_01 0x00000002
144
#define BIT_02 0x00000004
145
#define BIT_03 0x00000008
146
#define BIT_04 0x00000010
147
#define BIT_05 0x00000020
148
#define BIT_06 0x00000040
149
#define BIT_07 0x00000080
150
#define BIT_08 0x00000100
151
#define BIT_09 0x00000200
152
#define BIT_10 0x00000400
153
#define BIT_11 0x00000800
154
#define BIT_12 0x00001000
155
#define BIT_13 0x00002000
156
#define BIT_14 0x00004000
157
#define BIT_15 0x00008000
158
#define BIT_16 0x00010000
159
#define BIT_17 0x00020000
160
#define BIT_18 0x00040000
161
#define BIT_19 0x00080000
162
#define BIT_20 0x00100000
163
#define BIT_21 0x00200000
164
#define BIT_22 0x00400000
165
#define BIT_23 0x00800000
166
#define BIT_24 0x01000000
167
#define BIT_25 0x02000000
168
#define BIT_26 0x04000000
169
#define BIT_27 0x08000000
170
#define BIT_28 0x10000000
171
#define BIT_29 0x20000000
172
#define BIT_30 0x40000000
173
#define BIT_31 0x80000000
174
#endif
175
 
176
// We are using this
177
#define INNOVATOR_FLASH_VIRT_BASE 0x10000000
178
//  #define INNOVATOR_FLASH_PHYS_BASE 0x00000000
179
#define INNOVATOR_SDRAM_PHYS_BASE 0x10000000
180
 
181
#if 0
182
#define INNOVATOR_BASE         INNOVATOR_REGS_PHYS_BASE
183
 
184
//-----------------------------------------------------------------------------
185
// Boot control
186
// Note: this register is actually write-bit-to-clear-it
187
#define INNOVATOR_BOOT_CR      (INNOVATOR_BASE + 0x0000)
188
 
189
#define INNOVATOR_BOOT_CR_BM   0x00000001
190
#define INNOVATOR_BOOT_CR_HM   0x00000002
191
#define INNOVATOR_BOOT_CR_RE   0x00000004
192
 
193
//-----------------------------------------------------------------------------
194
// DPSRAM config
195
#define INNOVATOR_DPSRAM_BASE  (INNOVATOR_BASE + 0x0030)
196
#define _DPSRAM0_SR            0x0000
197
#define _DPSRAM0_LCR           0x0004
198
#define _DPSRAM1_SR            0x0008
199
#define _DPSRAM1_LCR           0x000c
200
 
201
#define _DPSRAM0_LCR_INIT      0x00000000
202
#define _DPSRAM1_LCR_INIT      0x00000000
203
 
204
//-----------------------------------------------------------------------------
205
// IO controller
206
#define INNOVATOR_IOCR_BASE    (INNOVATOR_BASE + 0x0040)
207
#define _IOCR_SDRAM            0x0000
208
#define _IOCR_EBI              0x0004
209
#define _IOCR_UART             0x0008
210
#define _IOCR_TRACE            0x000c
211
 
212
#define _IOCR_OC_PCI           0x00000008
213
#define _IOCR_OC_FAST          0x00000004
214
#define _IOCR_OC_SLOW          0x00000000
215
#define _IOCR_IO_STRIPE        0x00000002
216
#define _IOCR_LOCK             0x00000001
217
 
218
#define INNOVATOR_IOCR_SDRAM_INIT (_IOCR_OC_FAST | _IOCR_IO_STRIPE | _IOCR_LOCK)
219
#define INNOVATOR_IOCR_EBI_INIT   (_IOCR_OC_SLOW | _IOCR_IO_STRIPE | _IOCR_LOCK)
220
#define INNOVATOR_IOCR_UART_INIT  (_IOCR_OC_SLOW | _IOCR_IO_STRIPE | _IOCR_LOCK)
221
 
222
 
223
//-----------------------------------------------------------------------------
224
// Memory mapping
225
#define INNOVATOR_MMAP_BASE    (INNOVATOR_BASE + 0x0080)
226
#define _MMAP_REGISTERS        0x0000
227
#define _MMAP_SRAM0            0x0010
228
#define _MMAP_SRAM1            0x0014
229
#define _MMAP_DPSRAM0          0x0020
230
#define _MMAP_DPSRAM1          0x0024
231
#define _MMAP_SDRAM0           0x0030
232
#define _MMAP_SDRAM1           0x0034
233
#define _MMAP_EBI0             0x0040
234
#define _MMAP_EBI1             0x0044
235
#define _MMAP_EBI2             0x0048
236
#define _MMAP_EBI3             0x004c
237
#define _MMAP_PLD0             0x0050
238
#define _MMAP_PLD1             0x0054
239
#define _MMAP_PLD2             0x0058
240
#define _MMAP_PLD3             0x005c
241
 
242
#define _MMAP_SIZE_16K   (13<<7)
243
#define _MMAP_SIZE_64K   (15<<7)
244
#define _MMAP_SIZE_128K  (16<<7)
245
#define _MMAP_SIZE_1M    (19<<7)
246
#define _MMAP_SIZE_4M    (21<<7)
247
#define _MMAP_SIZE_16M   (23<<7)
248
#define _MMAP_SIZE_32M   (24<<7)
249
#define _MMAP_SIZE_64M   (25<<7)
250
 
251
#define _MMAP_PREFETCH         0x00000000
252
#define _MMAP_NOPREFETCH       0x00000002
253
 
254
#define _MMAP_ENABLE           0x00000001
255
#define _MMAP_DISABLE          0x00000000
256
 
257
#define _MMAP_REGISTERS_INIT   (INNOVATOR_REGS_PHYS_BASE  + 0x00000000 | _MMAP_SIZE_16K  | _MMAP_NOPREFETCH | _MMAP_ENABLE)
258
#define _MMAP_SRAM0_INIT       (INNOVATOR_SRAM_PHYS_BASE  + 0x00000000 | _MMAP_SIZE_128K | _MMAP_PREFETCH   | _MMAP_ENABLE)
259
#define _MMAP_SRAM1_INIT       (INNOVATOR_SRAM_PHYS_BASE  + 0x00020000 | _MMAP_SIZE_128K | _MMAP_PREFETCH   | _MMAP_ENABLE)
260
#define _MMAP_DPSRAM0_INIT     (INNOVATOR_SRAM_PHYS_BASE  + 0x00040000 | _MMAP_SIZE_64K  | _MMAP_PREFETCH   | _MMAP_ENABLE)
261
#define _MMAP_DPSRAM1_INIT     (INNOVATOR_SRAM_PHYS_BASE  + 0x00050000 | _MMAP_SIZE_64K  | _MMAP_PREFETCH   | _MMAP_ENABLE)
262
#define _MMAP_SDRAM0_INIT      (INNOVATOR_SDRAM_PHYS_BASE + 0x00000000 | _MMAP_SIZE_64M  | _MMAP_PREFETCH   | _MMAP_ENABLE)
263
#define _MMAP_SDRAM1_INIT      (INNOVATOR_SDRAM_PHYS_BASE + 0x04000000 | _MMAP_SIZE_64M  | _MMAP_PREFETCH   | _MMAP_ENABLE)
264
#define _MMAP_EBI0_INIT        (INNOVATOR_FLASH_PHYS_BASE + 0x00000000 | _MMAP_SIZE_4M   | _MMAP_PREFETCH   | _MMAP_ENABLE)
265
#define _MMAP_EBI1_INIT        (INNOVATOR_FLASH_PHYS_BASE + 0x00400000 | _MMAP_SIZE_4M   | _MMAP_PREFETCH   | _MMAP_ENABLE)
266
#define _MMAP_EBI2_INIT        (INNOVATOR_FLASH_PHYS_BASE + 0x00800000 | _MMAP_SIZE_4M   | _MMAP_PREFETCH   | _MMAP_ENABLE)
267
#define _MMAP_EBI3_INIT        (INNOVATOR_FLASH_PHYS_BASE + 0x00c00000 | _MMAP_SIZE_4M   | _MMAP_PREFETCH   | _MMAP_ENABLE)
268
#define _MMAP_PLD0_INIT        (INNOVATOR_PLD_PHYS_BASE   + 0x00000000 | _MMAP_SIZE_16K | _MMAP_NOPREFETCH | _MMAP_ENABLE)
269
//#define _MMAP_PLD1_INIT        (INNOVATOR_PLD_PHYS_BASE   + 0x00004000 | _MMAP_SIZE_16K | _MMAP_NOPREFETCH | _MMAP_ENABLE)
270
#define _MMAP_PLD1_INIT        (0x0f000000 | _MMAP_SIZE_16K | _MMAP_NOPREFETCH | _MMAP_ENABLE)
271
#define _MMAP_PLD2_INIT        (INNOVATOR_PLD_PHYS_BASE   + 0x00008000 | _MMAP_SIZE_16K | _MMAP_NOPREFETCH | _MMAP_ENABLE)
272
#define _MMAP_PLD3_INIT        (INNOVATOR_PLD_PHYS_BASE   + 0x0000c000 | _MMAP_SIZE_16K | _MMAP_NOPREFETCH | _MMAP_ENABLE)
273
 
274
 
275
 
276
 
277
 
278
//-----------------------------------------------------------------------------
279
// Timers
280
#define INNOVATOR_TIMER0_CR              (INNOVATOR_BASE+0x0200)
281
#define INNOVATOR_TIMER0_PRE             (INNOVATOR_BASE+0x0210)
282
#define INNOVATOR_TIMER0_LIMIT           (INNOVATOR_BASE+0x0220)
283
#define INNOVATOR_TIMER0_READ            (INNOVATOR_BASE+0x0230)
284
 
285
#define INNOVATOR_TIMER1_CR              (INNOVATOR_BASE+0x0240)
286
#define INNOVATOR_TIMER1_PRE             (INNOVATOR_BASE+0x0250)
287
#define INNOVATOR_TIMER1_LIMIT           (INNOVATOR_BASE+0x0260)
288
#define INNOVATOR_TIMER1_READ            (INNOVATOR_BASE+0x0270)
289
 
290
#define INNOVATOR_TIMER_CR_MODE_HEARBEAT 0x00000000
291
#define INNOVATOR_TIMER_CR_MODE_ONE_SHOT 0x00000001
292
#define INNOVATOR_TIMER_CR_IE            0x00000004
293
#define INNOVATOR_TIMER_CR_CI            0x00000008
294
#define INNOVATOR_TIMER_CR_S             0x00000010
295
 
296
//-----------------------------------------------------------------------------
297
// Serial
298
#define INNOVATOR_UART0_BASE            (INNOVATOR_BASE+0x0280)
299
#define _UART_RSR              0x0000
300
#define _UART_RDS              0x0004
301
#define _UART_RD               0x0008
302
#define _UART_TSR              0x000c
303
#define _UART_TD               0x0010
304
#define _UART_FCR              0x0014
305
#define _UART_IES              0x0018
306
#define _UART_IEC              0x001c
307
#define _UART_ISR              0x0020
308
#define _UART_IID              0x0024
309
#define _UART_MC               0x0028
310
#define _UART_MCR              0x002c
311
#define _UART_MSR              0x0030
312
#define _UART_DIV_LO           0x0034
313
#define _UART_DIV_HI           0x0038
314
 
315
#define _UART_RSR_RX_LEVEL     0x0000001f
316
 
317
#define _UART_TSR_TXI          0x00000080
318
 
319
#define _UART_FCR_TC           0x00000001
320
#define _UART_FCR_RC           0x00000002
321
#define _UART_FCR_TX_THR_15    0x0000001c
322
#define _UART_FCR_RX_THR_1     0x00000000
323
 
324
#define _UART_INTS_RE          0x00000001
325
#define _UART_INTS_RI          _UART_INTS_RE
326
#define _UART_INTS_TE          0x00000002
327
#define _UART_INTS_TI          _UART_INTS_TE
328
#define _UART_INTS_TIE         0x00000004
329
#define _UART_INTS_TII         _UART_INTS_TIE
330
#define _UART_INTS_ME          0x00000008
331
#define _UART_INTS_MI          _UART_INTS_ME
332
 
333
 
334
#define _UART_MC_8BIT          0x00000003
335
#define _UART_MC_1STOP         0x00000000
336
#define _UART_MC_PARITY_NONE   0x00000000
337
 
338
//-----------------------------------------------------------------------------
339
// Clock controller
340
#define INNOVATOR_CLK_BASE     (INNOVATOR_BASE + 0x0300)
341
#define _CLK_PLL1_NCNT         0x0000
342
#define _CLK_PLL1_MCNT         0x0004
343
#define _CLK_PLL1_KCNT         0x0008
344
#define _CLK_PLL1_CTRL         0x000c
345
#define _CLK_PLL2_NCNT         0x0010
346
#define _CLK_PLL2_MCNT         0x0014
347
#define _CLK_PLL2_KCNT         0x0018
348
#define _CLK_PLL2_CTRL         0x001c
349
#define _CLK_DERIVE            0x0020
350
#define _CLK_STATUS            0x0024
351
#define _CLK_AHB1_COUNT        0x0028
352
 
353
#define _CLK_PLL1_CTRL_P    0x00000001
354
#define _CLK_PLL2_CTRL_P    0x00000001
355
 
356
#define _CLK_DERIVE_BP1     (1<<12)
357
#define _CLK_DERIVE_BP2     (1<<13)
358
 
359
#define _CLK_STATUS_L1       0x00000001
360
#define _CLK_STATUS_L2       0x00000002
361
#define _CLK_STATUS_C1       0x00000004
362
#define _CLK_STATUS_C2       0x00000008
363
 
364
// Settings from Altera example code. Note that this differs from the
365
// magic values described in the manual. I think the values are
366
// supposed to disable the PLLs, making the core run at 25MHz and
367
// peripherals at 12.5MHz
368
#define _CLK_PLL1_CTRL_INIT    0x00001064
369
#define _CLK_PLL2_CTRL_INIT    0x00001064
370
#define _CLK_DERIVE_INIT       0x00003010
371
 
372
//-----------------------------------------------------------------------------
373
// Expansion Bus Interface
374
#define INNOVATOR_EBI_CR       (INNOVATOR_BASE + 0x0380)
375
 
376
#define INNOVATOR_EBI_CR_EO    0x00000008
377
 
378
#define INNOVATOR_EBI_CR_INIT  (INNOVATOR_EBI_CR_EO)
379
 
380
//-----------------------------------------------------------------------------
381
// SDRAM controller
382
#define INNOVATOR_SDRAM_BASE   (INNOVATOR_BASE + 0x0400)
383
#define _SDRAM_TIMING1         0x0000
384
#define _SDRAM_TIMING2         0x0004
385
#define _SDRAM_CONFIG          0x0008
386
#define _SDRAM_REFRESH         0x000c
387
#define _SDRAM_ADDR            0x0010
388
#define _SDRAM_INIT            0x001c
389
#define _SDRAM_MODE0           0x0020
390
#define _SDRAM_MODE1           0x0024
391
#define INNOVATOR_SDRAM_WIDTH  (INNOVATOR_BASE + 0x007c)
392
 
393
 
394
#define _SDRAM_WIDTH_W        0x00000002
395
#define _SDRAM_WIDTH_LK       0x00000001
396
 
397
#if 0
398
// Max delays
399
#define _SDRAM_TIMING1_INIT    0x00009124
400
// CAS-2, 8 words burst, 3 clock refresh
401
#define _SDRAM_TIMING2_INIT    0x00000788
402
// SDR
403
#define _SDRAM_CONFIG_INIT     0x00000000
404
// Refresh period of 15us - at a clock of 75MHz that's 1125 cycles
405
#define _SDRAM_REFRESH_INIT    1125
406
// Rows (12) & columns (10)
407
#define _SDRAM_ADDR_INIT       0x0000ca80
408
// SDRAM mode (from Micron MT48LC16M8A2 manual)
409
//  M0-2: burst length     = 3 (8 words)
410
//  M3  : burst type       = 0 (sequential vs interleaved)
411
//  M4-6: CAS latency      = 2
412
//  M7-8: operating mode   = 0
413
//  M9  : write burst mode = 0 (writes are also in burst)
414
#define _SDRAM_MODE0_INIT      ((2<<4)|3)
415
// Unused (for DDR)
416
#define _SDRAM_MODE1_INIT      0x00000000
417
#endif
418
 
419
#define _SDRAM_INIT_EN      0x00008000
420
#define _SDRAM_INIT_PR      0x00004000
421
#define _SDRAM_INIT_LM      0x00002000
422
#define _SDRAM_INIT_LEM     0x00001000
423
#define _SDRAM_INIT_RF      0x00000800
424
#define _SDRAM_INIT_BS      0x00000400
425
#define _SDRAM_INIT_SR      0x00000200
426
 
427
//-----------------------------------------------------------------------------
428
// Watchdog controller
429
#define INNOVATOR_WDOG_CR               (INNOVATOR_BASE+0x0a00)
430
#define INNOVATOR_WDOG_COUNT            (INNOVATOR_BASE+0x0a04)
431
#define INNOVATOR_WDOG_RELOAD           (INNOVATOR_BASE+0x0a08)
432
 
433
//-----------------------------------------------------------------------------
434
// Interrupt controller
435
#define INNOVATOR_INT_MASK_SET          (INNOVATOR_BASE+0x0c00)
436
#define INNOVATOR_INT_MASK_CLEAR        (INNOVATOR_BASE+0x0c04)
437
#define INNOVATOR_INT_SOURCE_STATUS     (INNOVATOR_BASE+0x0c08)
438
#define INNOVATOR_INT_REQUEST_STATUS    (INNOVATOR_BASE+0x0c0c)
439
#define INNOVATOR_INT_ID                (INNOVATOR_BASE+0x0c10)
440
#define INNOVATOR_INT_PLD_PRIORITY      (INNOVATOR_BASE+0x0c14)
441
#define INNOVATOR_INT_INT_MODE          (INNOVATOR_BASE+0x0c18)
442
#define INNOVATOR_INT_PRIORITY_0        (INNOVATOR_BASE+0x0c80)
443
#define INNOVATOR_INT_PRIORITY_1        (INNOVATOR_BASE+0x0c84)
444
#define INNOVATOR_INT_PRIORITY_2        (INNOVATOR_BASE+0x0c88)
445
#define INNOVATOR_INT_PRIORITY_3        (INNOVATOR_BASE+0x0c8c)
446
#define INNOVATOR_INT_PRIORITY_4        (INNOVATOR_BASE+0x0c90)
447
#define INNOVATOR_INT_PRIORITY_5        (INNOVATOR_BASE+0x0c94)
448
#define INNOVATOR_INT_PRIORITY_6        (INNOVATOR_BASE+0x0c98)
449
#define INNOVATOR_INT_PRIORITY_7        (INNOVATOR_BASE+0x0c9c)
450
#define INNOVATOR_INT_PRIORITY_8        (INNOVATOR_BASE+0x0ca0)
451
#define INNOVATOR_INT_PRIORITY_9        (INNOVATOR_BASE+0x0ca4)
452
#define INNOVATOR_INT_PRIORITY_10       (INNOVATOR_BASE+0x0ca8)
453
#define INNOVATOR_INT_PRIORITY_11       (INNOVATOR_BASE+0x0cac)
454
#define INNOVATOR_INT_PRIORITY_12       (INNOVATOR_BASE+0x0cb0)
455
#define INNOVATOR_INT_PRIORITY_13       (INNOVATOR_BASE+0x0cb4)
456
#define INNOVATOR_INT_PRIORITY_14       (INNOVATOR_BASE+0x0cb8)
457
#define INNOVATOR_INT_PRIORITY_15       (INNOVATOR_BASE+0x0cbc)
458
#define INNOVATOR_INT_PRIORITY_16       (INNOVATOR_BASE+0x0cc0)
459
 
460
#define INNOVATOR_INT_SOURCE_P0         0x00000001
461
#define INNOVATOR_INT_SOURCE_P1         0x00000002
462
#define INNOVATOR_INT_SOURCE_P2         0x00000004
463
#define INNOVATOR_INT_SOURCE_P3         0x00000008
464
#define INNOVATOR_INT_SOURCE_P4         0x00000010
465
#define INNOVATOR_INT_SOURCE_P5         0x00000020
466
#define INNOVATOR_INT_SOURCE_IP         0x00000040
467
#define INNOVATOR_INT_SOURCE_UA         0x00000080
468
#define INNOVATOR_INT_SOURCE_T0         0x00000100
469
#define INNOVATOR_INT_SOURCE_T1         0x00000200
470
#define INNOVATOR_INT_SOURCE_PS         0x00000400
471
#define INNOVATOR_INT_SOURCE_EE         0x00000800
472
#define INNOVATOR_INT_SOURCE_PE         0x00001000
473
#define INNOVATOR_INT_SOURCE_AE         0x00002000
474
#define INNOVATOR_INT_SOURCE_CT         0x00004000
475
#define INNOVATOR_INT_SOURCE_CR         0x00008000
476
#define INNOVATOR_INT_SOURCE_FC         0x00010000
477
 
478
#define INNOVATOR_INT_PRIORITY_FIQ      0x00000040
479
#define INNOVATOR_INT_PRIORITY_LVL_mask 0x0000003f
480
 
481
//-----------------------------------------------------------------------------
482
// PLD
483
#define INNOVATOR_PLD_BASE     INNOVATOR_PLD_PHYS_BASE
484
 
485
#define INNOVATOR_PLD_LEDS     (INNOVATOR_PLD_BASE + 0x0100)
486
 
487
 
488
#endif
489
#endif // CYGONCE_INNOVATOR_H
490
//-----------------------------------------------------------------------------
491
// end of innovator.h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.