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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [powerpc/] [score603e/] [include/] [gen2.h] - Blame information for rev 30

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

Line No. Rev Author Line
1 30 unneback
/*  Gen2.h
2
 *
3
 *  This include file contains all Generation 2 board addreses
4
 *
5
 *  COPYRIGHT (c) 1989-1997.
6
 *  On-Line Applications Research Corporation (OAR).
7
 *  Copyright assigned to U.S. Government, 1994.
8
 *
9
 *  The license and distribution terms for this file may in
10
 *  the file LICENSE in this distribution or at
11
 *  http://www.OARcorp.com/rtems/license.html.
12
 *
13
 *  $Id:
14
 */
15
 
16
#ifndef __SCORE_GENERATION_2_h
17
#define __SCORE_GENERATION_2_h
18
 
19
#ifdef __cplusplus
20
extern "C" {
21
#endif
22
 
23
#include <rtems.h>
24
 
25
/*
26
 * ISA/PCI I/O space.
27
 */
28
#define SCORE603E_VME_JUMPER_ADDR      0x00e20000       
29
#define SCORE603E_FLASH_BASE_ADDR      0x04000000
30
#define SCORE603E_ISA_PCI_IO_BASE      0x80000000
31
#define SCORE603E_TIMER_PORT_C         0xfd000000       
32
#define SCORE603E_TIMER_INT_ACK        0xfd000000       
33
#define SCORE603E_TIMER_PORT_B         0xfd000008
34
#define SCORE603E_TIMER_PORT_A         0xfd000004
35
 
36
#define SCORE603E_BOARD_CTRL_REG       ((volatile rtems_unsigned8 *)0xfd00002c)
37
#define SCORE603E_BRD_FLASH_DISABLE_MASK     0x40
38
 
39
#define SCORE603E_85C30_CTRL_0         ((volatile rtems_unsigned8 *)0xfe200020)
40
#define SCORE603E_85C30_DATA_0         ((volatile rtems_unsigned8 *)0xfe200024)
41
#define SCORE603E_85C30_CTRL_1         ((volatile rtems_unsigned8 *)0xfe200028)
42
#define SCORE603E_85C30_DATA_1         ((volatile rtems_unsigned8 *)0xfe20002c)
43
#define SCORE603E_85C30_CTRL_2         ((volatile rtems_unsigned8 *)0xfe200000)
44
#define SCORE603E_85C30_DATA_2         ((volatile rtems_unsigned8 *)0xfe200004)
45
#define SCORE603E_85C30_CTRL_3         ((volatile rtems_unsigned8 *)0xfe200008)
46
#define SCORE603E_85C30_DATA_3         ((volatile rtems_unsigned8 *)0xfe20000c)
47
 
48
/*
49
 * PSC8 - PMC Card
50
 */
51
#define SCORE603E_PCI_CONFIGURATION_BASE   0x80800000
52
#define SCORE603E_PMC_BASE                 SCORE603E_PCI_CONFIGURATION_BASE
53
#define SCORE603E_PCI_PMC_DEVICE_BASE      0x80808000
54
 
55
#define SCORE603E_PCI_REGISTER_BASE        0xfc000000
56
 
57
#define SCORE603E_PCI_DEVICE_ADDRESS( _offset) \
58
         ((volatile rtems_unsigned32 *)( SCORE603E_PCI_PMC_DEVICE_BASE + _offset ))
59
 
60
 
61
#define SCORE603E_PMC_SERIAL_ADDRESS( _offset )    \
62
        ((volatile rtems_unsigned8 *)(SCORE603E_PCI_REGISTER_BASE + _offset))
63
 
64
/*
65
 * PMC serial channels - (4-7: 232 and 8-11: 422)
66
 */
67
#define SCORE603E_85C30_CTRL_4        SCORE603E_PMC_SERIAL_ADDRESS(0x200020) 
68
#define SCORE603E_85C30_DATA_4        SCORE603E_PMC_SERIAL_ADDRESS(0x200024) 
69
#define SCORE603E_85C30_CTRL_5        SCORE603E_PMC_SERIAL_ADDRESS(0x200028) 
70
#define SCORE603E_85C30_DATA_5        SCORE603E_PMC_SERIAL_ADDRESS(0x20002c) 
71
#define SCORE603E_85C30_CTRL_6        SCORE603E_PMC_SERIAL_ADDRESS(0x200030) 
72
#define SCORE603E_85C30_DATA_6        SCORE603E_PMC_SERIAL_ADDRESS(0x200034) 
73
#define SCORE603E_85C30_CTRL_7        SCORE603E_PMC_SERIAL_ADDRESS(0x200038) 
74
#define SCORE603E_85C30_DATA_7        SCORE603E_PMC_SERIAL_ADDRESS(0x20003c) 
75
#define SCORE603E_85C30_CTRL_8        SCORE603E_PMC_SERIAL_ADDRESS(0x200000) 
76
#define SCORE603E_85C30_DATA_8        SCORE603E_PMC_SERIAL_ADDRESS(0x200004) 
77
#define SCORE603E_85C30_CTRL_9        SCORE603E_PMC_SERIAL_ADDRESS(0x200008) 
78
#define SCORE603E_85C30_DATA_9        SCORE603E_PMC_SERIAL_ADDRESS(0x20000c) 
79
#define SCORE603E_85C30_CTRL_10       SCORE603E_PMC_SERIAL_ADDRESS(0x200010) 
80
#define SCORE603E_85C30_DATA_10       SCORE603E_PMC_SERIAL_ADDRESS(0x200014) 
81
#define SCORE603E_85C30_CTRL_11       SCORE603E_PMC_SERIAL_ADDRESS(0x200018) 
82
#define SCORE603E_85C30_DATA_11       SCORE603E_PMC_SERIAL_ADDRESS(0x20001c) 
83
 
84
#define SCORE603E_PCI_IO_CFG_ADDR      0x80000cf8
85
#define SCORE603E_PCI_IO_CFG_DATA      0x80000cfc
86
 
87
#define SCORE603E_UNIVERSE_BASE        0x80030000
88
#define SCORE603E_IO_VME_UNIVERSE_BASE 0x80007000
89
#define SCORE603E_PCI_MEM_BASE         0xc0000000       
90
#define SCORE603E_NVRAM_BASE           0xfd100000
91
#define SCORE603E_RTC_ADDRESS          ((volatile unsigned char *)0xfd180000)
92
#define SCORE603E_JP1_JP2_PROM_BASE    0xfff00000
93
#define SCORE603E_NOT_JP1_2_FLASH_BASE 0xff800000
94
 
95
 
96
#if (SCORE603E_USE_SDS) | (SCORE603E_USE_OPEN_FIRMWARE) | (SCORE603E_USE_NONE)
97
#define SCORE603E_VME_A16_OFFSET       0x04000000
98
#elif (SCORE603E_USE_DINK)
99
#define SCORE603E_VME_A16_OFFSET       0x11000000
100
#define SCORE603E_VME_A24_OFFSET       0x10000000
101
#define SCORE603E_VME_A24_BASE         (SCORE603E_PCI_MEM_BASE+SCORE603E_VME_A24_OFFSET)
102
#else
103
#error "SCORE603E gen2.h -- what ROM monitor are you using"
104
#endif
105
 
106
#define SCORE603E_VME_A16_BASE         (SCORE603E_PCI_MEM_BASE+SCORE603E_VME_A16_OFFSET)
107
 
108
/*
109
 *  Definations for the ICM 1770 RTC chip
110
 */
111
    /*
112
     * These values are programed into a register and must not be changed.
113
     */
114
#define ICM1770_CRYSTAL_FREQ_32K      0x00
115
#define ICM1770_CRYSTAL_FREQ_1M       0x01
116
#define ICM1770_CRYSTAL_FREQ_2M       0x02
117
#define ICM1770_CRYSTAL_FREQ_4M       0x03
118
 
119
#define SCORE_RTC_FREQUENCY           ICM1770_CRYSTAL_FREQ_32K 
120
 
121
/*
122
 *  Z85C30 Definations for the 423 interface.
123
 */
124
#define SCORE603E_85C30_0_CLOCK     14745600  /* 10,000,000 ?10->14.5 */
125
#define SCORE603E_85C30_0_CLOCK_X       16 
126
 
127
/*
128
 *  Z85C30 Definations for the 422 interface.
129
 */
130
#define SCORE603E_85C30_1_CLOCK     16000000  /* 10,000,000 ?10->14.5 */
131
#define SCORE603E_85C30_1_CLOCK_X       16    
132
 
133
/*
134
 *  Z85C30 Definations for the PMC serial chips
135
 */
136
#define SCORE603E_85C30_PMC_CLOCK     16000000  /* 10,000,000 ?10->14.5 */
137
#define SCORE603E_85C30_PMC_CLOCK_X       16    
138
 
139
#define SCORE603E_85C30_2_CLOCK       SCORE603E_85C30_PMC_CLOCK
140
#define SCORE603E_85C30_3_CLOCK       SCORE603E_85C30_PMC_CLOCK
141
#define SCORE603E_85C30_4_CLOCK       SCORE603E_85C30_PMC_CLOCK
142
#define SCORE603E_85C30_5_CLOCK       SCORE603E_85C30_PMC_CLOCK
143
#define SCORE603E_85C30_2_CLOCK_X     SCORE603E_85C30_PMC_CLOCK_X
144
#define SCORE603E_85C30_3_CLOCK_X     SCORE603E_85C30_PMC_CLOCK_X
145
#define SCORE603E_85C30_4_CLOCK_X     SCORE603E_85C30_PMC_CLOCK_X
146
#define SCORE603E_85C30_5_CLOCK_X     SCORE603E_85C30_PMC_CLOCK_X
147
 
148
 
149
#define SCORE603E_UNIVERSE_CHIP_ID     0x000010E3
150
 
151
/*
152
 * FPGA Interupt Address Definations.
153
 */
154
#define SCORE603E_FPGA_VECT_DATA    ((volatile rtems_unsigned16 *)0xfd000040)
155
#define SCORE603E_FPGA_BIT1_15_0    ((volatile rtems_unsigned16 *)0xfd000044)
156
#define SCORE603E_FPGA_MASK_DATA    ((volatile rtems_unsigned16 *)0xfd000048)
157
#define SCORE603E_FPGA_IRQ_INPUT    ((volatile rtems_unsigned16 *)0xfd00004c)
158
 
159
/*
160
 * The PMC status word is at the PMC base address
161
 */
162
#define SCORE603E_PMC_STATUS_ADDRESS  (SCORE603E_PMC_SERIAL_ADDRESS (0))
163
#define Is_PMC_85C30_4_IRQ( _status ) (_status & 0x80)    /* SCC 422-1 */
164
#define Is_PMC_85C30_2_IRQ( _status ) (_status & 0x40)    /* SCC 232-1 */
165
#define Is_PMC_85C30_5_IRQ( _status ) (_status & 0x20)    /* SCC 422-2 */
166
#define Is_PMC_85C30_3_IRQ( _status ) (_status & 0x08)    /* SCC 232-2 */
167
 
168
#define SCORE603E_PMC_CONTROL_ADDRESS    SCORE603E_PMC_SERIAL_ADDRESS(0x100000)
169
#define SCORE603E_PMC_SCC_232_LOOPBACK (_word) (_word|0x20)
170
 
171
#define PMC_SET_232_LOOPBACK(_word)   (_word | 0x02)   
172
#define PMC_CLEAR_232_LOOPBACK(_word) (_word & 0xfd)   
173
#define PMC_SET_422_LOOPBACK(_word)   (_word | 0x01)   
174
#define PMC_CLEAR_422_LOOPBACK(_word) (_word & 0xfe) 
175
 
176
 
177
/*
178
 *  Score603e Interupt Definations.
179
 */
180
 
181
/*
182
 * First Score Unique IRQ
183
 */
184
#define Score_IRQ_First ( PPC_IRQ_LAST +  1 )
185
 
186
/*
187
 * The Following Are part of a Score603e FPGA.
188
 */
189
#define SCORE603E_IRQ00   ( Score_IRQ_First +  0 )
190
#define SCORE603E_IRQ01   ( Score_IRQ_First +  1 )
191
#define SCORE603E_IRQ02   ( Score_IRQ_First +  2 )
192
#define SCORE603E_IRQ03   ( Score_IRQ_First +  3 )
193
#define SCORE603E_IRQ04   ( Score_IRQ_First +  4 )
194
#define SCORE603E_IRQ05   ( Score_IRQ_First +  5 )
195
#define SCORE603E_IRQ06   ( Score_IRQ_First +  6 )
196
#define SCORE603E_IRQ07   ( Score_IRQ_First +  7 )
197
#define SCORE603E_IRQ08   ( Score_IRQ_First +  8 )
198
#define SCORE603E_IRQ09   ( Score_IRQ_First +  9 )
199
#define SCORE603E_IRQ10   ( Score_IRQ_First + 10 )
200
#define SCORE603E_IRQ11   ( Score_IRQ_First + 11 )
201
#define SCORE603E_IRQ12   ( Score_IRQ_First + 12 )
202
#define SCORE603E_IRQ13   ( Score_IRQ_First + 13 )
203
#define SCORE603E_IRQ14   ( Score_IRQ_First + 14 )
204
#define SCORE603E_IRQ15   ( Score_IRQ_First + 15 )
205
 
206
#define SCORE603E_TIMER1_IRQ           SCORE603E_IRQ00    
207
#define SCORE603E_TIMER2_IRQ           SCORE603E_IRQ01    
208
#define SCORE603E_TIMER3_IRQ           SCORE603E_IRQ02    
209
#define SCORE603E_85C30_1_IRQ          SCORE603E_IRQ03    
210
#define SCORE603E_85C30_0_IRQ          SCORE603E_IRQ04    
211
#define SCORE603E_RTC_IRQ              SCORE603E_IRQ05    
212
#define SCORE603E_PCI_IRQ_0            SCORE603E_IRQ06    
213
#define SCORE603E_PCI_IRQ_1            SCORE603E_IRQ07    
214
#define SCORE603E_PCI_IRQ_2            SCORE603E_IRQ08    
215
#define SCORE603E_PCI_IRQ_3            SCORE603E_IRQ09     
216
#define SCORE603E_UNIVERSE_IRQ         SCORE603E_IRQ10      
217
#define SCORE603E_1553_IRQ             SCORE603E_IRQ11    
218
#define SCORE603E_MAIL_BOX_IRQ_0       SCORE603E_IRQ12    
219
#define SCORE603E_MAIL_BOX_IRQ_1       SCORE603E_IRQ13    
220
#define SCORE603E_MAIL_BOX_IRQ_2       SCORE603E_IRQ14    
221
#define SCORE603E_MAIL_BOX_IRQ_3       SCORE603E_IRQ15    
222
 
223
/*
224
 * The Score FPGA maps all interrupts comming from the PMC card to
225
 * the FPGA interrupt SCORE603E_PCI_IRQ_0 the PMC status word must be
226
 * read to indicate which interrupt was chained to the FPGA.
227
 */
228
#define SCORE603E_IRQ16   ( Score_IRQ_First + 16 )
229
#define SCORE603E_IRQ17   ( Score_IRQ_First + 17 )
230
#define SCORE603E_IRQ18   ( Score_IRQ_First + 18 )
231
#define SCORE603E_IRQ19   ( Score_IRQ_First + 19 )
232
 
233
/*
234
 * IRQ'a read from the PMC card
235
 */
236
#define SCORE603E_85C30_4_IRQ          SCORE603E_IRQ16    /* SCC 422-1 */
237
#define SCORE603E_85C30_2_IRQ          SCORE603E_IRQ17    /* SCC 232-1 */
238
#define SCORE603E_85C30_5_IRQ          SCORE603E_IRQ18    /* SCC 422-2 */
239
#define SCORE603E_85C30_3_IRQ          SCORE603E_IRQ19    /* SCC 232-2 */
240
 
241
#define MAX_BOARD_IRQS                 SCORE603E_IRQ19
242
 
243
 
244
/*
245
 *  BSP_TIMER_AVG_OVERHEAD and BSP_TIMER_LEAST_VALID for the shared timer
246
 *  driver.
247
 */
248
 
249
#define BSP_TIMER_AVG_OVERHEAD   4  /* It typically takes xx clicks        */
250
                                    /*     to start/stop the timer.        */
251
#define BSP_TIMER_LEAST_VALID    1  /* Don't trust a value lower than this */
252
 
253
/*
254
 *  Convert decrement value to tenths of microsecnds (used by
255
 *  shared timer driver).
256
 *
257
 *    + CPU has a 66.67 Mhz bus,
258
 *    + There are 4 bus cycles per click
259
 *    + We return value in 1/10 microsecond units.
260
 *   Modified following equation to integer equation to remove
261
 *   floating point math.
262
 *   (int) ((float)(_value) / ((66.67 * 0.1) / 4.0))
263
 */
264
 
265
#define BSP_Convert_decrementer( _value ) \
266
  (int) (((_value) * 4000) / 6667)
267
 
268
#endif
269
 
270
#ifdef __cplusplus
271
}
272
#endif
273
 
274
 
275
 
276
 

powered by: WebSVN 2.1.0

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