source: rtems/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h @ 3344730a

4.104.114.84.95
Last change on this file since 3344730a was 3344730a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/21/04 at 16:21:25

2004-04-21 Ralf Corsepius <ralf_corsepius@…>

PR 613/bsps

  • include/bsp.h: Remove MAX_LONG_TEST_DURATION.
  • Property mode set to 100644
File size: 7.5 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all MVME147 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 *  MVME147 port for TNI - Telecom Bretagne
13 *  by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
14 *  May 1996
15 *
16 *  $Id$
17 */
18
19#ifndef __MVME147_h
20#define __MVME147_h
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <bspopts.h>
27
28#include <rtems.h>
29#include <rtems/clockdrv.h>
30#include <rtems/console.h>
31#include <rtems/iosupp.h>
32
33/*
34 *  confdefs.h overrides for this BSP:
35 *   - number of termios serial ports (defaults to 1)
36 *   - Interrupt stack space is not minimum if defined.
37 */
38
39/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
40#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
41
42/* Constants */
43
44#define RAM_START 0x00007000
45#define RAM_END   0x003e0000
46#define DRAM_END  0x00400000
47  /* We leave 128k for the shared memory */
48
49  /* MVME 147 Peripheral controller chip
50     see MVME147/D1, 3.4 */
51
52struct pcc_map {
53  /* 32 bit registers */
54  uint32_t         dma_table_address;            /* 0xfffe1000 */
55  uint32_t         dma_data_address;             /* 0xfffe1004 */
56  uint32_t         dma_bytecount;                /* 0xfffe1008 */
57  uint32_t         dma_data_holding;             /* 0xfffe100c */
58
59  /* 16 bit registers */
60  uint16_t         timer1_preload;               /* 0xfffe1010 */
61  uint16_t         timer1_count;                 /* 0xfffe1012 */
62  uint16_t         timer2_preload;               /* 0xfffe1014 */
63  uint16_t         timer2_count;                 /* 0xfffe1016 */
64
65  /* 8 bit registers */
66  uint8_t         timer1_int_control;            /* 0xfffe1018 */
67  uint8_t         timer1_control;                /* 0xfffe1019 */
68  uint8_t         timer2_int_control;            /* 0xfffe101a */
69  uint8_t         timer2_control;                /* 0xfffe101b */
70
71  uint8_t         acfail_int_control;            /* 0xfffe101c */
72  uint8_t         watchdog_control;              /* 0xfffe101d */
73
74  uint8_t         printer_int_control;           /* 0xfffe101e */
75  uint8_t         printer_control;               /* 0xfffe102f */
76
77  uint8_t         dma_int_control;               /* 0xfffe1020 */
78  uint8_t         dma_control;                   /* 0xfffe1021 */
79  uint8_t         bus_error_int_control;         /* 0xfffe1022 */
80  uint8_t         dma_status;                    /* 0xfffe1023 */
81  uint8_t         abort_int_control;             /* 0xfffe1024 */
82  uint8_t         table_address_function_code;   /* 0xfffe1025 */
83  uint8_t         serial_port_int_control;       /* 0xfffe1026 */
84  uint8_t         general_purpose_control;       /* 0xfffe1027 */
85  uint8_t         lan_int_control;               /* 0xfffe1028 */
86  uint8_t         general_purpose_status;        /* 0xfffe1029 */
87  uint8_t         scsi_port_int_control;         /* 0xfffe102a */
88  uint8_t         slave_base_address;            /* 0xfffe102b */
89  uint8_t         software_int_1_control;        /* 0xfffe102c */
90  uint8_t         int_base_vector;               /* 0xfffe102d */
91  uint8_t         software_int_2_control;        /* 0xfffe102e */
92  uint8_t         revision_level;                /* 0xfffe102f */
93};
94
95#define pcc      ((volatile struct pcc_map * const) 0xfffe1000)
96
97/* VME chip configuration registers */
98
99struct vme_lcsr_map {
100  uint8_t         unused_1;
101  uint8_t         system_controller;             /* 0xfffe2001 */
102  uint8_t         unused_2;
103  uint8_t         vme_bus_requester;             /* 0xfffe2003 */
104  uint8_t         unused_3;
105  uint8_t         master_configuration;          /* 0xfffe2005 */
106  uint8_t         unused_4;
107  uint8_t         slave_configuration;           /* 0xfffe2007 */
108  uint8_t         unused_5;
109  uint8_t         timer_configuration;           /* 0xfffe2009 */
110  uint8_t         unused_6;
111  uint8_t         slave_address_modifier;        /* 0xfffe200b */
112  uint8_t         unused_7;
113  uint8_t         master_address_modifier;       /* 0xfffe200d */
114  uint8_t         unused_8;
115  uint8_t         interrupt_handler_mask;        /* 0xfffe200f */
116  uint8_t         unused_9;
117  uint8_t         utility_interrupt_mask;        /* 0xfffe2011 */
118  uint8_t         unused_10;
119  uint8_t         utility_interrupt_vector;      /* 0xfffe2013 */
120  uint8_t         unused_11;
121  uint8_t         interrupt_request;             /* 0xfffe2015 */
122  uint8_t         unused_12;
123  uint8_t         vme_bus_status_id;             /* 0xfffe2017 */
124  uint8_t         unused_13;
125  uint8_t         bus_error_status;              /* 0xfffe2019 */
126  uint8_t         unused_14;
127  uint8_t         gcsr_base_address;             /* 0xfffe201b */
128};
129
130#define vme_lcsr      ((volatile struct vme_lcsr_map * const) 0xfffe2000)
131
132struct vme_gcsr_map {
133  uint8_t         unused_1;
134  uint8_t         global_0;                      /* 0xfffe2021 */
135  uint8_t         unused_2;
136  uint8_t         global_1;                      /* 0xfffe2023 */
137  uint8_t         unused_3;
138  uint8_t         board_identification;          /* 0xfffe2025 */
139  uint8_t         unused_4;
140  uint8_t         general_purpose_0;             /* 0xfffe2027 */
141  uint8_t         unused_5;
142  uint8_t         general_purpose_1;             /* 0xfffe2029 */
143  uint8_t         unused_6;
144  uint8_t         general_purpose_2;             /* 0xfffe202b */
145  uint8_t         unused_7;
146  uint8_t         general_purpose_3;             /* 0xfffe202d */
147  uint8_t         unused_8;
148  uint8_t         general_purpose_4;             /* 0xfffe202f */
149};
150
151#define vme_gcsr      ((volatile struct vme_gcsr_map * const) 0xfffe2020)
152
153#define z8530 0xfffe3001
154
155/* interrupt vectors - see MVME147/D1 4.14 */
156#define PCC_BASE_VECTOR        0x40 /* First user int */
157#define SCC_VECTOR             PCC_BASE_VECTOR+3
158#define TIMER_1_VECTOR         PCC_BASE_VECTOR+8
159#define TIMER_2_VECTOR         PCC_BASE_VECTOR+9
160#define SOFT_1_VECTOR          PCC_BASE_VECTOR+10
161#define SOFT_2_VECTOR          PCC_BASE_VECTOR+11
162
163#define VME_BASE_VECTOR        0x50
164#define VME_SIGLP_VECTOR       VME_BASE_VECTOR+1
165
166#define USE_CHANNEL_A   1                /* 1 = use channel A for console */
167#define USE_CHANNEL_B   0                /* 1 = use channel B for console */
168
169#if (USE_CHANNEL_A == 1)
170#define CONSOLE_CONTROL  0xfffe3002
171#define CONSOLE_DATA     0xfffe3003
172#elif (USE_CHANNEL_B == 1)
173#define CONSOLE_CONTROL  0xfffe3000
174#define CONSOLE_DATA     0xfffe3001
175#endif
176
177#define FOREVER       1                  /* infinite loop */
178
179#ifdef M147_INIT
180#undef EXTERN
181#define EXTERN
182#else
183#undef EXTERN
184#define EXTERN extern
185#endif
186
187/*
188 *  Define the interrupt mechanism for Time Test 27
189 *
190 *  NOTE: Use the MPCSR vector for the MVME147
191 */
192
193#define MUST_WAIT_FOR_INTERRUPT 0
194
195#define Install_tm27_vector( handler ) set_vector( (handler), \
196                                                   SOFT_1_VECTOR, 1 )
197
198#define Cause_tm27_intr()  pcc->software_int_1_control = 0x0c
199  /* generate level 4 sotware int. */
200
201#define Clear_tm27_intr()  pcc->software_int_1_control = 0x00
202
203#define Lower_tm27_intr()
204
205/* miscellaneous stuff assumed to exist */
206
207extern rtems_configuration_table BSP_Configuration;
208
209extern m68k_isr_entry M68Kvec[];   /* vector table address */
210
211/*
212 *  Device Driver Table Entries
213 */
214
215/*
216 * NOTE: Use the standard Console driver entry
217 */
218
219/*
220 * NOTE: Use the standard Clock driver entry
221 */
222
223/* functions */
224
225void bsp_cleanup( void );
226
227m68k_isr_entry set_vector(
228  rtems_isr_entry     handler,
229  rtems_vector_number vector,
230  int                 type
231);
232
233#ifdef __cplusplus
234}
235#endif
236
237#endif
238/* end of include file */
Note: See TracBrowser for help on using the repository browser.