source: rtems/c/src/lib/libbsp/m68k/mvme162/include/bsp.h @ 674be421

4.104.114.84.95
Last change on this file since 674be421 was 674be421, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/17/06 at 10:11:37

Remove eof include file

  • Property mode set to 100644
File size: 5.0 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all MVME162fx board IO definitions.
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
13 *  EISCAT Scientific Association. M.Savitski
14 *
15 *  This material is a part of the MVME162 Board Support Package
16 *  for the RTEMS executive. Its licensing policies are those of the
17 *  RTEMS above.
18 *
19 *  $Id$
20 */
21
22#ifndef _BSP_H
23#define _BSP_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#include <bspopts.h>
30
31#include <rtems.h>
32#include <rtems/clockdrv.h>
33#include <rtems/console.h>
34#include <rtems/iosupp.h>
35
36/*
37 *  confdefs.h overrides for this BSP:
38 *   - number of termios serial ports (defaults to 1)
39 *   - Interrupt stack space is not minimum if defined.
40 */
41
42/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
43#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
44
45#include <mvme16x_hw.h>
46
47/*----------------------------------------------------------------*/
48
49typedef volatile struct {
50
51  unsigned char     chipID;
52  unsigned char     chipREV;
53  unsigned char     gen_control;
54  unsigned char     vector_base;
55
56  unsigned long     timer_cmp_1;
57  unsigned long     timer_cnt_1;
58  unsigned long     timer_cmp_2;
59  unsigned long     timer_cnt_2;
60
61  unsigned char     LSB_prescaler_count;
62  unsigned char     prescaler_clock_adjust;
63  unsigned char     time_ctl_2;
64  unsigned char     time_ctl_1;
65
66  unsigned char     time_int_ctl_4;
67  unsigned char     time_int_ctl_3;
68  unsigned char     time_int_ctl_2;
69  unsigned char     time_int_ctl_1;
70
71  unsigned char     dram_err_int_ctl;
72  unsigned char     SCC_int_ctl;
73  unsigned char     time_ctl_4;
74  unsigned char     time_ctl_3;
75
76  unsigned short    DRAM_space_base;
77  unsigned short    SRAM_space_base;
78
79  unsigned char     DRAM_size;
80  unsigned char     DRAM_SRAM_opt;
81  unsigned char     SRAM_size;
82  unsigned char     reserved;
83
84  unsigned char     LANC_error;
85  unsigned char     reserved1;
86  unsigned char     LANC_int_ctl;
87  unsigned char     LANC_berr_ctl;
88
89  unsigned char     SCSI_error;
90  unsigned char     general_inputs;
91  unsigned char     MVME_162_version;
92  unsigned char     SCSI_int_ctl;
93
94  unsigned long     timer_cmp_3;
95  unsigned long     timer_cnt_3;
96  unsigned long     timer_cmp_4;
97  unsigned long     timer_cnt_4;
98
99  unsigned char     bus_clk;
100  unsigned char     PROM_acc_time_ctl;
101  unsigned char     FLASH_acc_time_ctl;
102  unsigned char     ABORT_int_ctl;
103
104  unsigned char     RESET_ctl;
105  unsigned char     watchdog_timer_ctl;
106  unsigned char     acc_watchdog_time_base_sel;
107  unsigned char     reserved2;
108
109  unsigned char     DRAM_ctl;
110  unsigned char     reserved4;
111  unsigned char     MPU_status;
112  unsigned char     reserved3;
113
114  unsigned long     prescaler_count;
115
116} mcchip_regs;
117
118#define mcchip      ((mcchip_regs * const) 0xFFF42000)
119
120/*----------------------------------------------------------------*/
121
122/*
123 * SCC Z8523(0) defines and macros
124 * -------------------------------
125 * Prototypes for the low-level serial io are also included here,
126 * because such stuff is bsp-specific (yet). The function bodies
127 * are in console.c
128 *
129 * NOTE from Eric Vaitl <evaitl@viasat.com>:
130 *
131 * I dropped RTEMS into a 162FX today (the MVME162-513). The 162FX has a
132 * bug in the MC2 chip (revision 1) such that the SCC data register is
133 * not accessible, it has to be accessed indirectly through the SCC
134 * control register.
135 */
136
137enum {portB, portA};
138
139rtems_boolean char_ready(int port, char *ch);
140char char_wait(int port);
141void char_put(int port, char ch);
142
143#define TX_BUFFER_EMPTY   0x04
144#define RX_DATA_AVAILABLE 0x01
145#define SCC_VECTOR        0x40
146
147typedef volatile struct {
148  unsigned char pad1;
149  volatile unsigned char          csr;
150  unsigned char pad2;
151  volatile unsigned char          buf;
152} scc_regs;
153
154#define scc       ((scc_regs * const) 0xFFF45000)
155
156#define ZWRITE0(port, v)  (scc[port].csr = (unsigned char)(v))
157#define ZREAD0(port)  (scc[port].csr)
158
159#define ZREAD(port, n)  (ZWRITE0(port, n), (scc[port].csr))
160#define ZREADD(port)  (scc[port].csr=0x08, scc[port].csr )
161
162#define ZWRITE(port, n, v) (ZWRITE0(port, n), ZWRITE0(port, v))
163#define ZWRITED(port, v)  (scc[port].csr = 0x08, \
164                           scc[port].csr = (unsigned char)(v))
165/*----------------------------------------------------------------*/
166
167#ifdef M162_INIT
168#undef EXTERN
169#define EXTERN
170#else
171#undef EXTERN
172#define EXTERN extern
173#endif
174
175/*
176 *  Device Driver Table Entries
177 */
178
179/*
180 * NOTE: Use the standard Console driver entry
181 */
182
183/*
184 * NOTE: Use the standard Clock driver entry
185 */
186
187/* miscellaneous stuff assumed to exist */
188
189extern rtems_configuration_table BSP_Configuration;
190
191extern m68k_isr_entry M68Kvec[];   /* vector table address */
192
193/* functions */
194
195void bsp_cleanup( void );
196
197m68k_isr_entry set_vector(
198  rtems_isr_entry     handler,
199  rtems_vector_number vector,
200  int                 type
201);
202
203#ifdef __cplusplus
204}
205#endif
206
207#endif
Note: See TracBrowser for help on using the repository browser.