OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i960/] [rxgen960/] [include/] [bsp.h] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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: bsp.h,v 1.2 2001-09-27 11:59:59 chris Exp $
15
 */
16
 
17
#ifndef __PMC901_h
18
#define __PMC901_h
19
 
20
#ifdef __cplusplus
21
extern "C" {
22
#endif
23
 
24
#include <rtems.h>
25
#include <iosupp.h>
26
#include <console.h>
27
#include <clockdrv.h>
28
 
29
/*
30
 *  confdefs.h overrides for this BSP:
31
 *   - number of termios serial ports (defaults to 1)
32
 *   - Interrupt stack space is not minimum if defined.
33
 */
34
 
35
/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
36
#define CONFIGURE_INTERRUPT_STACK_MEMORY  (8 * 1024)
37
 
38
/*
39
 *  Define the time limits for RTEMS Test Suite test durations.
40
 *  Long test and short test duration limits are provided.  These
41
 *  values are in seconds and need to be converted to ticks for the
42
 *  application.
43
 *
44
 */
45
 
46
#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
47
#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
48
 
49
/*
50
 *  Define the interrupt mechanism for Time Test 27
51
 *
52
 *  NOTE: Following are for i960CA and are board independent
53
 *
54
 */
55
 
56
#define MUST_WAIT_FOR_INTERRUPT 0
57
 
58
#define Install_tm27_vector( handler ) set_vector( (handler), 6, 1 )
59
 
60
#define Cause_tm27_intr()  i960_cause_intr( 0x62 )
61
 
62
#define Clear_tm27_intr()  i960_clear_intr( 6 )
63
 
64
#define Lower_tm27_intr()
65
 
66
/*
67
 *  Simple spin delay in microsecond units for device drivers.
68
 *  This is very dependent on the clock speed of the target.
69
 */
70
 
71
#define delay( microseconds ) \
72
  { register rtems_unsigned32 _delay=(microseconds); \
73
    register rtems_unsigned32 _tmp = 0; /* initialized to avoid warning */ \
74
    asm volatile( "0: \
75
                     remo      3,31,%0 ; \
76
                     cmpo      0,%0 ; \
77
                     subo      1,%1,%1 ; \
78
                     cmpobne.t 0,%1,0b " \
79
                  : "=d" (_tmp), "=d" (_delay) \
80
                  : "0"  (_tmp), "1"  (_delay) ); \
81
  }
82
 
83
/* Constants */
84
 
85
#define RAM_START 0xfed00000
86
#define RAM_END   0xfef00000 /* this should actually be 16MB, most likely */
87
 
88
/* NINDY console I/O requests:
89
 *   CO sends a single character to stdout,
90
 *   CI reads one.
91
 */
92
 
93
#define NINDY_INPUT   0
94
#define NINDY_OUTPUT  1
95
 
96
/*
97
 *  get_prcb
98
 *
99
 *  Returns the PRCB pointer.
100
 */
101
 
102
static inline i960_PRCB *get_prcb( void )
103
{
104
  register i960_PRCB *_prcb = 0;
105
 
106
  asm volatile( "calls 5; \
107
                 mov   g0,%0" \
108
                 : "=d" (_prcb) \
109
                 : "0" (_prcb) );
110
  return ( _prcb );
111
}
112
 
113
/*
114
#ifdef C961_INIT
115
#undef BSP_EXTERN
116
#define BSP_EXTERN
117
#else
118
#undef BSP_EXTERN
119
#define BSP_EXTERN extern
120
#endif
121
*/
122
 
123
#undef BSP_EXTERN
124
#define BSP_EXTERN
125
 
126
/* miscellaneous stuff assumed to exist */
127
 
128
extern rtems_configuration_table BSP_Configuration;
129
 
130
BSP_EXTERN i960_PRCB          *Prcb;
131
BSP_EXTERN i960_control_table *Ctl_tbl;
132
 
133
/*
134
 *  Device Driver Table Entries
135
 */
136
 
137
/*
138
 * NOTE: Use the standard Console driver entry
139
 */
140
 
141
/*
142
 * NOTE: Use the standard Clock driver entry
143
 */
144
 
145
/*
146
 * How many libio files we want
147
 */
148
 
149
#define BSP_LIBIO_MAX_FDS       20
150
 
151
/* functions */
152
 
153
void bsp_cleanup( void );
154
 
155
i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int );
156
i960_isr_entry set_tmr_vector( rtems_isr_entry, unsigned int, unsigned int );
157
 
158
#ifdef __cplusplus
159
}
160
#endif
161
 
162
#else
163
#error "Did not get any definitions from here!"
164
#endif
165
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.