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

4.104.114.84.95
Last change on this file since dc90de4 was 1fc35374, checked in by Joel Sherrill <joel.sherrill@…>, on 10/12/01 at 21:07:45

2001-10-12 Joel Sherrill <joel@…>

  • clock/ckinit.c, console/console.c, include/bsp.h, startup/bspstart.c, startup/exit.c, startup/setvec.c, timer/timer.c, timer/timerisr.S: Fixed typo.
  • 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 *
9 *  The license and distribution terms for this file may in
10 *  the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#ifndef __PMC901_h
17#define __PMC901_h
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <bspopts.h>
24
25#include <rtems.h>
26#include <libcpu/i960RP.h>
27#include <iosupp.h>
28#include <console.h>
29#include <clockdrv.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  (8 * 1024)
39
40/*
41 *  Define the time limits for RTEMS Test Suite test durations.
42 *  Long test and short test duration limits are provided.  These
43 *  values are in seconds and need to be converted to ticks for the
44 *  application.
45 *
46 */
47
48#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
49#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
50
51/*
52 *  Define the interrupt mechanism for Time Test 27
53 *
54 *  NOTE: Following are for i960CA and are board independent
55 *
56 */
57
58#define MUST_WAIT_FOR_INTERRUPT 0
59
60#define Install_tm27_vector( handler ) set_vector( (handler), 6, 1 )
61
62#define Cause_tm27_intr()  i960_cause_intr( 0x62 )
63
64#define Clear_tm27_intr()  i960_clear_intr( 6 )
65
66#define Lower_tm27_intr()
67
68/*
69 *  Simple spin delay in microsecond units for device drivers.
70 *  This is very dependent on the clock speed of the target.
71 */
72
73#define rtems_bsp_delay( microseconds ) \
74  { register rtems_unsigned32 _delay=(microseconds); \
75    register rtems_unsigned32 _tmp = 0; /* initialized to avoid warning */ \
76    asm volatile( "0: \
77                     remo      3,31,%0 ; \
78                     cmpo      0,%0 ; \
79                     subo      1,%1,%1 ; \
80                     cmpobne.t 0,%1,0b " \
81                  : "=d" (_tmp), "=d" (_delay) \
82                  : "0"  (_tmp), "1"  (_delay) ); \
83  }
84
85/* Constants */
86
87#define RAM_START 0xfed00000
88#define RAM_END   0xfef00000 /* this should actually be 16MB, most likely */
89
90/* NINDY console I/O requests:
91 *   CO sends a single character to stdout,
92 *   CI reads one.
93 */
94
95#define NINDY_INPUT   0
96#define NINDY_OUTPUT  1
97
98/*
99 *  get_prcb
100 *
101 *  Returns the PRCB pointer.
102 */
103
104static inline i960_PRCB *get_prcb( void )
105{
106  register i960_PRCB *_prcb = 0;
107
108  asm volatile( "calls 5; \
109                 mov   g0,%0" \
110                 : "=d" (_prcb) \
111                 : "0" (_prcb) );
112  return ( _prcb );
113}
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
125#undef BSP_EXTERN
126#define BSP_EXTERN
127
128/* miscellaneous stuff assumed to exist */
129
130extern rtems_configuration_table BSP_Configuration;
131
132BSP_EXTERN i960_PRCB          *Prcb;
133BSP_EXTERN i960_control_table *Ctl_tbl;
134
135/*
136 *  Device Driver Table Entries
137 */
138
139/*
140 * NOTE: Use the standard Console driver entry
141 */
142 
143/*
144 * NOTE: Use the standard Clock driver entry
145 */
146
147/*
148 * How many libio files we want
149 */
150
151#define BSP_LIBIO_MAX_FDS       20
152
153/* functions */
154
155void bsp_cleanup( void );
156
157i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int );
158i960_isr_entry set_tmr_vector( rtems_isr_entry, unsigned int, unsigned int );
159
160#ifdef __cplusplus
161}
162#endif
163
164#endif
165/* end of include file */
Note: See TracBrowser for help on using the repository browser.