1 |
30 |
unneback |
/* Gen1.h
|
2 |
|
|
*
|
3 |
|
|
* This include file contains all Generation 1 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_1_h
|
17 |
|
|
#define __SCORE_GENERATION_1_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 0x01000000
|
30 |
|
|
#define SCORE603E_ISA_PCI_IO_BASE 0x80000000
|
31 |
|
|
#define SCORE603E_TIMER_PORT_C 0x80000278
|
32 |
|
|
#define SCORE603E_TIMER_INT_ACK 0x8000027a
|
33 |
|
|
#define SCORE603E_TIMER_PORT_B 0x8000027b
|
34 |
|
|
#define SCORE603E_TIMER_PORT_A 0x8000027c
|
35 |
|
|
#define SCORE603E_85C30_CTRL_1 ((volatile rtems_unsigned8 *)0x800002f8)
|
36 |
|
|
#define SCORE603E_85C30_INT_ACK ((volatile rtems_unsigned8 *)0x800002fa)
|
37 |
|
|
#define SCORE603E_85C30_CTRL_0 ((volatile rtems_unsigned8 *)0x800002fb)
|
38 |
|
|
#define SCORE603E_85C30_DATA_1 ((volatile rtems_unsigned8 *)0x800002fc)
|
39 |
|
|
#define SCORE603E_85C30_DATA_0 ((volatile rtems_unsigned8 *)0x800002ff)
|
40 |
|
|
#define SCORE603E_85C30_CTRL_3 ((volatile rtems_unsigned8 *)0x800003f8)
|
41 |
|
|
#define SCORE603E_85C30_CTRL_2 ((volatile rtems_unsigned8 *)0x800003fb)
|
42 |
|
|
#define SCORE603E_85C30_DATA_3 ((volatile rtems_unsigned8 *)0x800003fc)
|
43 |
|
|
#define SCORE603E_85C30_DATA_2 ((volatile rtems_unsigned8 *)0x800003ff)
|
44 |
|
|
#define SCORE603E_PCI_IO_CFG_ADDR 0x80000cf8
|
45 |
|
|
#define SCORE603E_PCI_IO_CFG_DATA 0x80000cfc
|
46 |
|
|
|
47 |
|
|
#define SCORE603E_UNIVERSE_BASE 0x80030000
|
48 |
|
|
#define SCORE603E_IO_VME_UNIVERSE_BASE 0x80007000
|
49 |
|
|
#define SCORE603E_PCI_MEM_BASE 0xc0000000
|
50 |
|
|
#define SCORE603E_NVRAM_BASE 0xc00f0000
|
51 |
|
|
#define SCORE603E_RTC_ADDRESS ((volatile unsigned char *)0xc00f1ff8)
|
52 |
|
|
#define SCORE603E_JP1_JP2_PROM_BASE 0xfff00000
|
53 |
|
|
#define SCORE603E_NOT_JP1_2_FLASH_BASE 0xff800000
|
54 |
|
|
|
55 |
|
|
#define SCORE603E_VME_A16_OFFSET 0x04000000
|
56 |
|
|
#define SCORE603E_VME_A16_BASE (SCORE603E_PCI_MEM_BASE+SCORE603E_VME_A16_OFFSET)
|
57 |
|
|
|
58 |
|
|
#define SCORE603E_BOARD_CTRL_REG ((volatile rtems_unsigned32*)0x80000800)
|
59 |
|
|
#define SCORE603E_BRD_FLASH_DISABLE_MASK 0x02000000
|
60 |
|
|
|
61 |
|
|
/*
|
62 |
|
|
* Z85C30 Definations for the 232 interface.
|
63 |
|
|
*/
|
64 |
|
|
#define SCORE603E_85C30_0_CLOCK 10000000 /* 10,000,000 */
|
65 |
|
|
#define SCORE603E_85C30_0_CLOCK_X 16
|
66 |
|
|
|
67 |
|
|
/*
|
68 |
|
|
* Z85C30 Definations for the 422 interface.
|
69 |
|
|
*/
|
70 |
|
|
#define SCORE603E_85C30_1_CLOCK 10000000 /* 10,000,000 */
|
71 |
|
|
#define SCORE603E_85C30_1_CLOCK_X 16
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
#define SCORE603E_UNIVERSE_CHIP_ID 0x000010E3
|
75 |
|
|
|
76 |
|
|
/*
|
77 |
|
|
* Score603e Interupt Definations.
|
78 |
|
|
*/
|
79 |
|
|
|
80 |
|
|
/*
|
81 |
|
|
* First Score Unique IRQ
|
82 |
|
|
*/
|
83 |
|
|
#define Score_IRQ_First ( PPC_IRQ_LAST + 1 )
|
84 |
|
|
|
85 |
|
|
/*
|
86 |
|
|
* 82378ZB IRQ definations.
|
87 |
|
|
*/
|
88 |
|
|
#define SCORE603E_IRQ00_82378ZB ( Score_IRQ_First + 0 )
|
89 |
|
|
#define SCORE603E_IRQ01_82378ZB ( Score_IRQ_First + 1 )
|
90 |
|
|
#define SCORE603E_IRQ02_82378ZB ( Score_IRQ_First + 2 )
|
91 |
|
|
#define SCORE603E_IRQ03_82378ZB ( Score_IRQ_First + 3 )
|
92 |
|
|
#define SCORE603E_IRQ04_82378ZB ( Score_IRQ_First + 4 )
|
93 |
|
|
#define SCORE603E_IRQ05_82378ZB ( Score_IRQ_First + 5 )
|
94 |
|
|
#define SCORE603E_IRQ06_82378ZB ( Score_IRQ_First + 6 )
|
95 |
|
|
#define SCORE603E_IRQ07_82378ZB ( Score_IRQ_First + 7 )
|
96 |
|
|
#define SCORE603E_IRQ08_82378ZB ( Score_IRQ_First + 8 )
|
97 |
|
|
#define SCORE603E_IRQ09_82378ZB ( Score_IRQ_First + 9 )
|
98 |
|
|
#define SCORE603E_IRQ10_82378ZB ( Score_IRQ_First + 10 )
|
99 |
|
|
#define SCORE603E_IRQ11_82378ZB ( Score_IRQ_First + 11 )
|
100 |
|
|
#define SCORE603E_IRQ12_82378ZB ( Score_IRQ_First + 12 )
|
101 |
|
|
#define SCORE603E_IRQ13_82378ZB ( Score_IRQ_First + 13 )
|
102 |
|
|
#define SCORE603E_IRQ14_82378ZB ( Score_IRQ_First + 14 )
|
103 |
|
|
#define SCORE603E_IRQ15_82378ZB ( Score_IRQ_First + 15 )
|
104 |
|
|
|
105 |
|
|
#define MAX_BOARD_IRQS SCORE603E_IRQ15_82378ZB
|
106 |
|
|
|
107 |
|
|
#define SCORE603E_85C30_1_IRQ SCORE603E_IRQ03_82378ZB
|
108 |
|
|
#define SCORE603E_85C30_0_IRQ SCORE603E_IRQ04_82378ZB
|
109 |
|
|
#define SCORE603E_UNIVERSE_IRQ SCORE603E_IRQ12_82378ZB
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
#define Write_82378ZB( _offset, _data ) { \
|
113 |
|
|
volatile rtems_unsigned8 *addr; \
|
114 |
|
|
addr = (volatile rtems_unsigned8 *)(SCORE603E_ISA_PCI_IO_BASE + _offset);\
|
115 |
|
|
*addr = _data; }
|
116 |
|
|
|
117 |
|
|
#define Read_82378ZB( _offset, _data ) { \
|
118 |
|
|
volatile rtems_unsigned8 *addr; \
|
119 |
|
|
addr = (volatile rtems_unsigned8 *)(SCORE603E_ISA_PCI_IO_BASE + _offset);\
|
120 |
|
|
_data = *addr; }
|
121 |
|
|
|
122 |
|
|
|
123 |
|
|
/*
|
124 |
|
|
* BSP_TIMER_AVG_OVERHEAD and BSP_TIMER_LEAST_VALID for the shared timer
|
125 |
|
|
* driver.
|
126 |
|
|
*/
|
127 |
|
|
|
128 |
|
|
#define BSP_TIMER_AVG_OVERHEAD 4 /* It typically takes xx clicks */
|
129 |
|
|
/* to start/stop the timer. */
|
130 |
|
|
#define BSP_TIMER_LEAST_VALID 1 /* Don't trust a value lower than this */
|
131 |
|
|
|
132 |
|
|
/*
|
133 |
|
|
* Convert decrement value to tenths of microsecnds (used by
|
134 |
|
|
* shared timer driver).
|
135 |
|
|
*
|
136 |
|
|
* + CPU has a 66.67 Mhz bus,
|
137 |
|
|
* + There are 4 bus cycles per click
|
138 |
|
|
* + We return value in 1/10 microsecond units.
|
139 |
|
|
* Modified following equation to integer equation to remove
|
140 |
|
|
* floating point math.
|
141 |
|
|
* (int) ((float)(_value) / ((66.67 * 0.1) / 4.0))
|
142 |
|
|
*/
|
143 |
|
|
|
144 |
|
|
#define BSP_Convert_decrementer( _value ) \
|
145 |
|
|
(int) (((_value) * 4000) / 6667)
|
146 |
|
|
|
147 |
|
|
#ifdef __cplusplus
|
148 |
|
|
}
|
149 |
|
|
#endif
|
150 |
|
|
|
151 |
|
|
#endif
|
152 |
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
|
|
|