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

Last change on this file since c8f3e82 was c8f3e82, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:44:14

2003-09-04 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: URL for license changed.
  • 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.rtems.com/license/LICENSE.
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#ifdef RXGEN960_INIT
116#undef BSP_EXTERN
117#define BSP_EXTERN
118#else
119#undef BSP_EXTERN
120#define BSP_EXTERN extern
121#endif
122
123/* miscellaneous stuff assumed to exist */
124
125extern rtems_configuration_table BSP_Configuration;
126
127BSP_EXTERN i960_PRCB          *Prcb;
128BSP_EXTERN i960_control_table *Ctl_tbl;
129
130/*
131 *  Device Driver Table Entries
132 */
133
134/*
135 * NOTE: Use the standard Console driver entry
136 */
137 
138/*
139 * NOTE: Use the standard Clock driver entry
140 */
141
142/*
143 * How many libio files we want
144 */
145
146#define BSP_LIBIO_MAX_FDS       20
147
148/* functions */
149
150void bsp_cleanup( void );
151
152i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int );
153i960_isr_entry set_tmr_vector( rtems_isr_entry, unsigned int, unsigned int );
154
155#ifdef __cplusplus
156}
157#endif
158
159#endif
160/* end of include file */
Note: See TracBrowser for help on using the repository browser.