source: rtems/c/src/lib/libbsp/m68k/dmv152/include/bsp.h @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 11, 1995 at 7:35:39 PM

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 4.8 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all DMV152 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 *  $Id$
14 */
15
16#ifndef __DMV152_h
17#define __DMV152_h
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems.h>
24#include <console.h>
25#include <clockdrv.h>
26#include <iosupp.h>
27#include <vmeintr.h>
28#include <z8530.h>
29#include <z8536.h>
30
31/*
32 *  Define the time limits for RTEMS Test Suite test durations.
33 *  Long test and short test duration limits are provided.  These
34 *  values are in seconds and need to be converted to ticks for the
35 *  application.
36 *
37 */
38
39#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
40#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
41
42/*
43 *  Define the interrupt mechanism for Time Test 27
44 */
45
46/* use a VMEbus interrupt */
47
48#define MUST_WAIT_FOR_INTERRUPT 1
49
50#define Install_tm27_vector( handler ) \
51  { \
52    set_vector( (handler), 0x50, 1 );  \
53    (*(volatile rtems_unsigned32 *)0x0d800024) = 0x50; /* set IVECT reg */ \
54    (*(volatile rtems_unsigned8  *)0x0d00000c) = 0x40; /* set VIE reg */ \
55  }
56
57#define Cause_tm27_intr()  \
58  (*(volatile rtems_unsigned8 *)0x0d000003) = 0x0f  /* set VINT */
59
60#define Clear_tm27_intr()  /* no operation necessary */
61
62#define Lower_tm27_intr()
63
64/*
65 *  Simple spin delay in microsecond units for device drivers.
66 *  This is very dependent on the clock speed of the target.
67 */
68
69#define delay( microseconds ) \
70  { register rtems_unsigned32 _delay=(microseconds); \
71    register rtems_unsigned32 _tmp=123; \
72    asm volatile( "0: \
73                     nbcd      %0 ; \
74                     nbcd      %0 ; \
75                     dbf       %1,0b" \
76                  : "=d" (_tmp), "=d" (_delay) \
77                  : "0"  (_tmp), "1"  (_delay) ); \
78  }
79
80/* macros */
81
82#undef Z8x36_STATE0
83#undef Z8x36_WRITE
84#undef Z8x36_READ
85
86#define Z8x36_STATE0 ( z8536 ) \
87  { char *garbage; \
88    (garbage) = *(VOL8(z8536+0x7)) \
89  }
90
91#define Z8x36_WRITE( z8536, reg, data ) \
92   *(VOL8(z8536+0x7)) = (reg); \
93   *(VOL8(z8536+0x7)) = (data)
94
95#define Z8x36_READ( z8536, reg, data ) \
96   *(VOL8(z8536+0x7)) = (reg); \
97   (data) = *(VOL8(z8536+0x7))
98
99/*
100 *  ACC Register Addresses
101 */
102
103#define ACC_BASE    0x0D000000
104
105#define ACC_STAT0   ((volatile rtems_unsigned8 *) (ACC_BASE + 0x00))
106#define ACC_STAT1   ((volatile rtems_unsigned8 *) (ACC_BASE + 0x01))
107#define ACC_GENCTL  ((volatile rtems_unsigned8 *) (ACC_BASE + 0x02))
108#define ACC_VINT    ((volatile rtems_unsigned8 *) (ACC_BASE + 0x03))
109#define ACC_VREQ    ((volatile rtems_unsigned8 *) (ACC_BASE + 0x04))
110#define ACC_VARB    ((volatile rtems_unsigned8 *) (ACC_BASE + 0x05))
111#define ACC_ID      ((volatile rtems_unsigned8 *) (ACC_BASE + 0x06))
112#define ACC_CTL2    ((volatile rtems_unsigned8 *) (ACC_BASE + 0x07))
113#define ACC_7IS     ((volatile rtems_unsigned8 *) (ACC_BASE + 0x08))
114#define ACC_LIS     ((volatile rtems_unsigned8 *) (ACC_BASE + 0x09))
115#define ACC_7IE     ((volatile rtems_unsigned8 *) (ACC_BASE + 0x0A))
116#define ACC_LIE     ((volatile rtems_unsigned8 *) (ACC_BASE + 0x0B))
117#define ACC_VIE     ((volatile rtems_unsigned8 *) (ACC_BASE + 0x0C))
118#define ACC_IC10    ((volatile rtems_unsigned8 *) (ACC_BASE + 0x0D))
119#define ACC_IC32    ((volatile rtems_unsigned8 *) (ACC_BASE + 0x0E))
120#define ACC_IC54    ((volatile rtems_unsigned8 *) (ACC_BASE + 0x0F))
121
122/* constants */
123
124#define RAM_START 0
125#define RAM_END   0x100000
126
127#define USE_CHANNEL_A   0                /* 1 = use channel A for console */
128#define USE_CHANNEL_B   1                /* 1 = use channel B for console */
129
130#define TIMER 0x0c000000
131#define TIMER_VECTOR 0x4D
132
133#if (USE_CHANNEL_A == 1)
134#define CONSOLE_CONTROL  0x0C800007
135#define CONSOLE_DATA     0x0C800005
136#elif (USE_CHANNEL_B == 1)
137#define CONSOLE_CONTROL  0x0C800001
138#define CONSOLE_DATA     0x0C800003
139#endif
140
141/* Structures */
142
143#ifdef D152_INIT
144#undef EXTERN
145#define EXTERN
146#else
147#undef EXTERN
148#define EXTERN extern
149#endif
150
151/* miscellaneous stuff assumed to exist */
152
153extern rtems_configuration_table BSP_Configuration;
154
155extern m68k_isr_entry M68Kvec[];   /* vector table address */
156
157/*
158 *  Device Driver Table Entries
159 */
160
161/*
162 * NOTE: Use the standard Console driver entry
163 */
164 
165/*
166 * NOTE: Use the standard Clock driver entry
167 */
168
169/*
170 * How many libio files we want
171 */
172
173#define BSP_LIBIO_MAX_FDS       20
174
175/* functions */
176
177void bsp_cleanup( void );
178
179m68k_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 */
Note: See TracBrowser for help on using the repository browser.