OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [m68k/] [mvme147/] [include/] [bsp.h] - Blame information for rev 173

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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