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

4.104.114.84.95
Last change on this file since d95820d was d95820d, checked in by Joel Sherrill <joel.sherrill@…>, on 12/06/00 at 15:40:51

2000-12-06 Joel Sherrill <joel@…>

  • include/bsp.h: Removed incorrect error case.
  • Property mode set to 100644
File size: 3.5 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 <libcpu/i960RP.h>
26#include <iosupp.h>
27#include <console.h>
28#include <clockdrv.h>
29
30/*
31 *  confdefs.h overrides for this BSP:
32 *   - number of termios serial ports (defaults to 1)
33 *   - Interrupt stack space is not minimum if defined.
34 */
35
36/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
37#define CONFIGURE_INTERRUPT_STACK_MEMORY  (8 * 1024)
38
39/*
40 *  Define the time limits for RTEMS Test Suite test durations.
41 *  Long test and short test duration limits are provided.  These
42 *  values are in seconds and need to be converted to ticks for the
43 *  application.
44 *
45 */
46
47#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
48#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
49
50/*
51 *  Define the interrupt mechanism for Time Test 27
52 *
53 *  NOTE: Following are for i960CA and are board independent
54 *
55 */
56
57#define MUST_WAIT_FOR_INTERRUPT 0
58
59#define Install_tm27_vector( handler ) set_vector( (handler), 6, 1 )
60
61#define Cause_tm27_intr()  i960_cause_intr( 0x62 )
62
63#define Clear_tm27_intr()  i960_clear_intr( 6 )
64
65#define Lower_tm27_intr()
66
67/*
68 *  Simple spin delay in microsecond units for device drivers.
69 *  This is very dependent on the clock speed of the target.
70 */
71
72#define delay( microseconds ) \
73  { register rtems_unsigned32 _delay=(microseconds); \
74    register rtems_unsigned32 _tmp = 0; /* initialized to avoid warning */ \
75    asm volatile( "0: \
76                     remo      3,31,%0 ; \
77                     cmpo      0,%0 ; \
78                     subo      1,%1,%1 ; \
79                     cmpobne.t 0,%1,0b " \
80                  : "=d" (_tmp), "=d" (_delay) \
81                  : "0"  (_tmp), "1"  (_delay) ); \
82  }
83
84/* Constants */
85
86#define RAM_START 0xfed00000
87#define RAM_END   0xfef00000 /* this should actually be 16MB, most likely */
88
89/* NINDY console I/O requests:
90 *   CO sends a single character to stdout,
91 *   CI reads one.
92 */
93
94#define NINDY_INPUT   0
95#define NINDY_OUTPUT  1
96
97/*
98 *  get_prcb
99 *
100 *  Returns the PRCB pointer.
101 */
102
103static inline i960_PRCB *get_prcb( void )
104{
105  register i960_PRCB *_prcb = 0;
106
107  asm volatile( "calls 5; \
108                 mov   g0,%0" \
109                 : "=d" (_prcb) \
110                 : "0" (_prcb) );
111  return ( _prcb );
112}
113
114/*
115#ifdef C961_INIT
116#undef BSP_EXTERN
117#define BSP_EXTERN
118#else
119#undef BSP_EXTERN
120#define BSP_EXTERN extern
121#endif
122*/
123
124#undef BSP_EXTERN
125#define BSP_EXTERN
126
127/* miscellaneous stuff assumed to exist */
128
129extern rtems_configuration_table BSP_Configuration;
130
131BSP_EXTERN i960_PRCB          *Prcb;
132BSP_EXTERN i960_control_table *Ctl_tbl;
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#endif
164/* end of include file */
Note: See TracBrowser for help on using the repository browser.