source: rtems/c/src/lib/libbsp/m68k/mvme147/include/bsp.h @ 28fa54d9

4.104.114.84.95
Last change on this file since 28fa54d9 was 28fa54d9, checked in by Joel Sherrill <joel.sherrill@…>, on 05/24/96 at 20:34:49

added Motorola MVME147 BSP submitted by Dominique le Campion
(Dominique.LECAMPION@…), for Telecom Bretagne and
T.N.I. (Brest, France)

  • Property mode set to 100644
File size: 5.4 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all MVME147 board IO definitions.
4 *
5 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
6 *  On-Line Applications Research Corporation (OAR).
7 *  All rights assigned to U.S. Government, 1994.
8 *
9 *  This material may be reproduced by or for the U.S. Government pursuant
10 *  to the copyright license under the clause at DFARS 252.227-7013.  This
11 *  notice must appear in all copies of this file and its derivatives.
12 *
13 *  MVME147 port for TNI - Telecom Bretagne
14 *  by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
15 *  May 1996
16 *
17 *  $Id$
18 */
19
20#ifndef __MVME147_h
21#define __MVME147_h
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <rtems.h>
28#include <clockdrv.h>
29#include <console.h>
30#include <iosupp.h>
31
32/* Constants */
33
34#define RAM_START 0x00005000
35#define RAM_END   0x00400000
36
37  /* MVME 147 Peripheral controller chip
38     see MVME147/D1, 3.4 */
39
40struct pcc_map {
41  /* 32 bit registers */
42  rtems_unsigned32 dma_table_address;            /* 0xfffe1000 */
43  rtems_unsigned32 dma_data_address;             /* 0xfffe1004 */
44  rtems_unsigned32 dma_bytecount;                /* 0xfffe1008 */
45  rtems_unsigned32 dma_data_holding;             /* 0xfffe100c */
46
47  /* 16 bit registers */
48  rtems_unsigned16 timer1_preload;               /* 0xfffe1010 */
49  rtems_unsigned16 timer1_count;                 /* 0xfffe1012 */
50  rtems_unsigned16 timer2_preload;               /* 0xfffe1014 */
51  rtems_unsigned16 timer2_count;                 /* 0xfffe1016 */
52
53  /* 8 bit registers */
54  rtems_unsigned8 timer1_int_control;            /* 0xfffe1018 */
55  rtems_unsigned8 timer1_control;                /* 0xfffe1019 */
56  rtems_unsigned8 timer2_int_control;            /* 0xfffe101a */
57  rtems_unsigned8 timer2_control;                /* 0xfffe101b */
58
59  rtems_unsigned8 acfail_int_control;            /* 0xfffe101c */
60  rtems_unsigned8 watchdog_control;              /* 0xfffe101d */
61
62  rtems_unsigned8 printer_int_control;           /* 0xfffe101e */
63  rtems_unsigned8 printer_control;               /* 0xfffe102f */
64
65  rtems_unsigned8 dma_int_control;               /* 0xfffe1020 */
66  rtems_unsigned8 dma_control;                   /* 0xfffe1021 */
67  rtems_unsigned8 bus_error_int_control;         /* 0xfffe1022 */
68  rtems_unsigned8 dma_status;                    /* 0xfffe1023 */
69  rtems_unsigned8 abort_int_control;             /* 0xfffe1024 */
70  rtems_unsigned8 table_address_function_code;   /* 0xfffe1025 */
71  rtems_unsigned8 serial_port_int_control;       /* 0xfffe1026 */
72  rtems_unsigned8 general_purpose_control;       /* 0xfffe1027 */
73  rtems_unsigned8 lan_int_control;               /* 0xfffe1028 */
74  rtems_unsigned8 general_purpose_status;        /* 0xfffe1029 */
75  rtems_unsigned8 scsi_port_int_control;         /* 0xfffe102a */
76  rtems_unsigned8 slave_base_address;            /* 0xfffe102b */
77  rtems_unsigned8 software_int_1_control;        /* 0xfffe102c */
78  rtems_unsigned8 int_base_vector;               /* 0xfffe102d */
79  rtems_unsigned8 software_int_2_control;        /* 0xfffe102e */
80  rtems_unsigned8 revision_level;                /* 0xfffe102f */
81};
82
83#define pcc      ((volatile struct pcc_map * const) 0xfffe1000)
84
85#define z8530 0xfffe3001
86
87
88/* interrupt vectors - see MVME146/D1 4.14 */
89#define PCC_BASE_VECTOR        0x40 /* First user int */
90#define SCC_VECTOR             PCC_BASE_VECTOR+3
91#define TIMER_1_VECTOR         PCC_BASE_VECTOR+8
92#define TIMER_2_VECTOR         PCC_BASE_VECTOR+9 
93#define SOFT_1_VECTOR          PCC_BASE_VECTOR+10
94#define SOFT_2_VECTOR          PCC_BASE_VECTOR+11
95
96#define USE_CHANNEL_A   1                /* 1 = use channel A for console */
97#define USE_CHANNEL_B   0                /* 1 = use channel B for console */
98
99#if (USE_CHANNEL_A == 1)
100#define CONSOLE_CONTROL  0xfffe3002
101#define CONSOLE_DATA     0xfffe3003
102#elif (USE_CHANNEL_B == 1)
103#define CONSOLE_CONTROL  0xfffe3000
104#define CONSOLE_DATA     0xfffe3001
105#endif
106
107
108
109#define FOREVER       1                  /* infinite loop */
110
111#ifdef M147_INIT
112#undef EXTERN
113#define EXTERN
114#else
115#undef EXTERN
116#define EXTERN extern
117#endif
118
119/*
120 *  Define the time limits for RTEMS Test Suite test durations.
121 *  Long test and short test duration limits are provided.  These
122 *  values are in seconds and need to be converted to ticks for the
123 *  application.
124 *
125 */
126
127#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
128#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
129
130/*
131 *  Define the interrupt mechanism for Time Test 27
132 *
133 *  NOTE: Use the MPCSR vector for the MVME147
134 */
135
136#define MUST_WAIT_FOR_INTERRUPT 0
137
138#define Install_tm27_vector( handler ) set_vector( (handler), \
139                                                   SOFT_1_VECTOR, 1 )
140
141#define Cause_tm27_intr()  pcc->software_int_1_control = 0x0c
142  /* generate level 4 sotware int. */
143
144#define Clear_tm27_intr()  pcc->software_int_1_control = 0x00
145
146#define Lower_tm27_intr()
147
148
149/* miscellaneous stuff assumed to exist */
150
151extern rtems_configuration_table BSP_Configuration;
152
153extern m68k_isr_entry M68Kvec[];   /* vector table address */
154
155/*
156 *  Device Driver Table Entries
157 */
158
159/*
160 * NOTE: Use the standard Console driver entry
161 */
162 
163/*
164 * NOTE: Use the standard Clock driver entry
165 */
166
167/*
168 * How many libio files we want
169 */
170
171#define BSP_LIBIO_MAX_FDS       20
172
173/* functions */
174
175void bsp_cleanup( void );
176
177m68k_isr_entry set_vector(
178  rtems_isr_entry     handler,
179  rtems_vector_number vector,
180  int                 type
181);
182
183#ifdef __cplusplus
184}
185#endif
186
187#endif
188/* end of include file */
189
Note: See TracBrowser for help on using the repository browser.