source: rtems/c/src/lib/libbsp/i960/rxgen960/include/bsp.h @ 702c5f5

4.104.114.84.95
Last change on this file since 702c5f5 was 702c5f5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/27/99 at 15:29:18

The rxgen960 BSP and i960 RPM support was submitted by Mark Bronson
<mark@…> of RAMIX.

  • Property mode set to 100644
File size: 3.4 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains some definitions specific to the
4 *  Ramix PMC901 board
5 *
6 *  COPYRIGHT (c) 1989-1997.
7 *  On-Line Applications Research Corporation (OAR).
8 *  Copyright assigned to U.S. Government, 1994.
9 *
10 *  The license and distribution terms for this file may in
11 *  the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#ifndef __PMC901_h
18#define __PMC901_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems.h>
25#include <iosupp.h>
26#include <console.h>
27#include <clockdrv.h>
28
29/*
30 *  Define the time limits for RTEMS Test Suite test durations.
31 *  Long test and short test duration limits are provided.  These
32 *  values are in seconds and need to be converted to ticks for the
33 *  application.
34 *
35 */
36
37#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
38#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
39
40/*
41 *  Define the interrupt mechanism for Time Test 27
42 *
43 *  NOTE: Following are for i960CA and are board independent
44 *
45 */
46
47#define MUST_WAIT_FOR_INTERRUPT 0
48
49#define Install_tm27_vector( handler ) set_vector( (handler), 6, 1 )
50
51#define Cause_tm27_intr()  i960_cause_intr( 0x62 )
52
53#define Clear_tm27_intr()  i960_clear_intr( 6 )
54
55#define Lower_tm27_intr()
56
57/*
58 *  Simple spin delay in microsecond units for device drivers.
59 *  This is very dependent on the clock speed of the target.
60 */
61
62#define delay( microseconds ) \
63  { register rtems_unsigned32 _delay=(microseconds); \
64    register rtems_unsigned32 _tmp = 0; /* initialized to avoid warning */ \
65    asm volatile( "0: \
66                     remo      3,31,%0 ; \
67                     cmpo      0,%0 ; \
68                     subo      1,%1,%1 ; \
69                     cmpobne.t 0,%1,0b " \
70                  : "=d" (_tmp), "=d" (_delay) \
71                  : "0"  (_tmp), "1"  (_delay) ); \
72  }
73
74/* Constants */
75
76#define RAM_START 0xfed00000
77#define RAM_END   0xfef00000 /* this should actually be 16MB, most likely */
78
79/* NINDY console I/O requests:
80 *   CO sends a single character to stdout,
81 *   CI reads one.
82 */
83
84#define NINDY_INPUT   0
85#define NINDY_OUTPUT  1
86
87/*
88 *  get_prcb
89 *
90 *  Returns the PRCB pointer.
91 */
92
93static inline PRCB *get_prcb( void )
94{
95  register PRCB *_prcb = 0;
96
97  asm volatile( "calls 5; \
98                 mov   g0,%0" \
99                 : "=d" (_prcb) \
100                 : "0" (_prcb) );
101  return ( _prcb );
102}
103
104/*
105#ifdef C961_INIT
106#undef BSP_EXTERN
107#define BSP_EXTERN
108#else
109#undef BSP_EXTERN
110#define BSP_EXTERN extern
111#endif
112*/
113
114#undef BSP_EXTERN
115#define BSP_EXTERN
116
117/* miscellaneous stuff assumed to exist */
118
119extern rtems_configuration_table BSP_Configuration;
120
121BSP_EXTERN PRCB          *Prcb;
122BSP_EXTERN CNTL_TBL      *Ctl_tbl;
123
124/*
125#if defined(i960ca)
126BSP_EXTERN i960ca_control_table *Ctl_tbl;
127#elif defined(i960rp)
128BSP_EXTERN i960rp_control_table *Ctl_tbl;
129#else
130#error "invalid processor selection!"
131#endif
132*/
133
134/*
135 *  Device Driver Table Entries
136 */
137
138/*
139 * NOTE: Use the standard Console driver entry
140 */
141 
142/*
143 * NOTE: Use the standard Clock driver entry
144 */
145
146/*
147 * How many libio files we want
148 */
149
150#define BSP_LIBIO_MAX_FDS       20
151
152/* functions */
153
154void bsp_cleanup( void );
155
156i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int );
157i960_isr_entry set_tmr_vector( rtems_isr_entry, unsigned int, unsigned int );
158
159#ifdef __cplusplus
160}
161#endif
162
163#else
164#error "Did not get any definitions from here!"
165#endif
166/* end of include file */
Note: See TracBrowser for help on using the repository browser.