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

4.104.114.84.95
Last change on this file since e35761b was e35761b, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/22/04 at 15:25:55

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

  • include/bsp.h: Split out tmtest27 support.
  • include/tm27.h: New.
  • Property mode set to 100644
File size: 3.8 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all DMV152 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 *  $Id$
13 */
14
15#ifndef __DMV152_h
16#define __DMV152_h
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include <bspopts.h>
23
24#include <rtems.h>
25#include <rtems/console.h>
26#include <rtems/clockdrv.h>
27#include <rtems/iosupp.h>
28#include <rtems/vmeintr.h>
29#include <rtems/zilog/z8530.h>
30#include <rtems/zilog/z8536.h>
31
32/*
33 *  confdefs.h overrides for this BSP:
34 *   - number of termios serial ports (defaults to 1)
35 *   - Interrupt stack space is not minimum if defined.
36 */
37
38/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
39#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
40
41/*
42 *  confdefs.h overrides for this BSP:
43 *   - termios serial ports (defaults to 1)
44 *   - Interrupt stack space is not minimum if defined.
45 */
46
47#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
48/* #define CONFIGURE_INTERRUPT_STACK_MEMORY  (TBD * 1024) */
49
50/*
51 *  Simple spin delay in microsecond units for device drivers.
52 *  This is very dependent on the clock speed of the target.
53 */
54
55#define rtems_bsp_delay( microseconds ) \
56  { register uint32_t         _delay=(microseconds); \
57    register uint32_t         _tmp=123; \
58    asm volatile( "0: \
59                     nbcd      %0 ; \
60                     nbcd      %0 ; \
61                     dbf       %1,0b" \
62                  : "=d" (_tmp), "=d" (_delay) \
63                  : "0"  (_tmp), "1"  (_delay) ); \
64  }
65
66/* macros */
67
68#undef Z8x36_STATE0
69#undef Z8x36_WRITE
70#undef Z8x36_READ
71
72#define Z8x36_STATE0 ( z8536 ) \
73  { char *garbage; \
74    (garbage) = *(VOL8(z8536+0x7)) \
75  }
76
77#define Z8x36_WRITE( z8536, reg, data ) \
78   *(VOL8(z8536+0x7)) = (reg); \
79   *(VOL8(z8536+0x7)) = (data)
80
81#define Z8x36_READ( z8536, reg, data ) \
82   *(VOL8(z8536+0x7)) = (reg); \
83   (data) = *(VOL8(z8536+0x7))
84
85/*
86 *  ACC Register Addresses
87 */
88
89#define ACC_BASE    0x0D000000
90
91#define ACC_STAT0   ((volatile uint8_t*) (ACC_BASE + 0x00))
92#define ACC_STAT1   ((volatile uint8_t*) (ACC_BASE + 0x01))
93#define ACC_GENCTL  ((volatile uint8_t*) (ACC_BASE + 0x02))
94#define ACC_VINT    ((volatile uint8_t*) (ACC_BASE + 0x03))
95#define ACC_VREQ    ((volatile uint8_t*) (ACC_BASE + 0x04))
96#define ACC_VARB    ((volatile uint8_t*) (ACC_BASE + 0x05))
97#define ACC_ID      ((volatile uint8_t*) (ACC_BASE + 0x06))
98#define ACC_CTL2    ((volatile uint8_t*) (ACC_BASE + 0x07))
99#define ACC_7IS     ((volatile uint8_t*) (ACC_BASE + 0x08))
100#define ACC_LIS     ((volatile uint8_t*) (ACC_BASE + 0x09))
101#define ACC_7IE     ((volatile uint8_t*) (ACC_BASE + 0x0A))
102#define ACC_LIE     ((volatile uint8_t*) (ACC_BASE + 0x0B))
103#define ACC_VIE     ((volatile uint8_t*) (ACC_BASE + 0x0C))
104#define ACC_IC10    ((volatile uint8_t*) (ACC_BASE + 0x0D))
105#define ACC_IC32    ((volatile uint8_t*) (ACC_BASE + 0x0E))
106#define ACC_IC54    ((volatile uint8_t*) (ACC_BASE + 0x0F))
107
108/* constants */
109
110#define TIMER 0x0c000000
111#define TIMER_VECTOR 0x4D
112
113#define CONSOLE_CONTROL_A  0x0C800005
114#define CONSOLE_DATA_A     0x0C800007
115#define CONSOLE_CONTROL_B  0x0C800001
116#define CONSOLE_DATA_B     0x0C800003
117
118/* Structures */
119
120   /* none */
121
122/* miscellaneous stuff assumed to exist */
123
124extern rtems_configuration_table BSP_Configuration;
125
126extern m68k_isr_entry M68Kvec[];   /* vector table address */
127
128/*
129 *  Device Driver Table Entries
130 */
131
132/*
133 * NOTE: Use the standard Console driver entry
134 */
135
136/*
137 * NOTE: Use the standard Clock driver entry
138 */
139
140/* functions */
141
142void bsp_cleanup( void );
143
144m68k_isr_entry set_vector(
145  rtems_isr_entry     handler,
146  rtems_vector_number vector,
147  int                 type
148);
149
150#ifdef __cplusplus
151}
152#endif
153
154#endif
155/* end of include file */
Note: See TracBrowser for help on using the repository browser.