source: rtems/c/src/lib/libbsp/i960/cvme961/include/bsp.h @ 9f70652b

4.104.114.84.95
Last change on this file since 9f70652b was 9f70652b, checked in by Joel Sherrill <joel.sherrill@…>, on 06/08/01 at 13:47:09

2001-05-26 Ralf Corsepius <corsepiu@…>

  • configure.in: Add bspopts.h.
  • include/.cvsignore: Add bspopts.h*, stamp-h*.
  • include/Makefile.am: Use *_HEADERS instead of *H_FILES.
  • include/bsp.h: Include bspopts.h.
  • Property mode set to 100644
File size: 3.3 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains some definitions specific to the
4 *  Cyclone CVME960 and CVME961 boards.  These boards are the
5 *  same except the 960 uses SRAM and the 961 DRAM.
6 *
7 *  COPYRIGHT (c) 1989-1999.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#ifndef __CVME961_h
18#define __CVME961_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <bspopts.h>
25
26#include <rtems.h>
27#include <libcpu/i960CA.h>
28#include <iosupp.h>
29#include <console.h>
30#include <clockdrv.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 *  Define the time limits for RTEMS Test Suite test durations.
43 *  Long test and short test duration limits are provided.  These
44 *  values are in seconds and need to be converted to ticks for the
45 *  application.
46 *
47 */
48
49#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
50#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
51
52/*
53 *  Define the interrupt mechanism for Time Test 27
54 *
55 *  NOTE: Following are for i960CA and are board independent
56 *
57 */
58
59#define MUST_WAIT_FOR_INTERRUPT 0
60
61#define Install_tm27_vector( handler ) set_vector( (handler), 6, 1 )
62
63#define Cause_tm27_intr()  i960_cause_intr( 0x62 )
64
65#define Clear_tm27_intr()  i960_clear_intr( 6 )
66
67#define Lower_tm27_intr()
68
69/*
70 *  Simple spin delay in microsecond units for device drivers.
71 *  This is very dependent on the clock speed of the target.
72 */
73
74#define delay( microseconds ) \
75  { register rtems_unsigned32 _delay=(microseconds); \
76    register rtems_unsigned32 _tmp = 0; /* initialized to avoid warning */ \
77    asm volatile( "0: \
78                     remo      3,31,%0 ; \
79                     cmpo      0,%0 ; \
80                     subo      1,%1,%1 ; \
81                     cmpobne.t 0,%1,0b " \
82                  : "=d" (_tmp), "=d" (_delay) \
83                  : "0"  (_tmp), "1"  (_delay) ); \
84  }
85
86/* Constants */
87
88#define RAM_START 0
89#define RAM_END   0x100000
90
91/* NINDY console I/O requests:
92 *   CO sends a single character to stdout,
93 *   CI reads one.
94 */
95
96#define NINDY_INPUT   0
97#define NINDY_OUTPUT  1
98
99/*
100 *  get_prcb
101 *
102 *  Returns the PRCB pointer.
103 */
104
105static inline i960ca_PRCB *get_prcb( void )
106{
107  register i960ca_PRCB *_prcb = 0;
108
109  asm volatile( "calls 5; \
110                 mov   g0,%0" \
111                 : "=d" (_prcb) \
112                 : "0" (_prcb) );
113  return ( _prcb );
114}
115
116#ifdef C961_INIT
117#undef BSP_EXTERN
118#define BSP_EXTERN
119#else
120#undef BSP_EXTERN
121#define BSP_EXTERN extern
122#endif
123
124/* miscellaneous stuff assumed to exist */
125
126extern rtems_configuration_table BSP_Configuration;
127
128BSP_EXTERN i960ca_PRCB           *Prcb;
129BSP_EXTERN i960ca_control_table  *Ctl_tbl;
130
131/*
132 *  Device Driver Table Entries
133 */
134
135/*
136 * NOTE: Use the standard Console driver entry
137 */
138 
139/*
140 * NOTE: Use the standard Clock driver entry
141 */
142
143/* functions */
144
145void bsp_cleanup( void );
146
147i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int );
148
149#ifdef __cplusplus
150}
151#endif
152
153#endif
154/* end of include file */
Note: See TracBrowser for help on using the repository browser.