OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i960/] [cvme961/] [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
 *  Cyclone CVME960 and CVME961 boards.  These boards are the
5
 *  same except the 960 uses SRAM and the 961 DRAM.
6
 *
7
 *  COPYRIGHT (c) 1989-1999.
8
 *  On-Line Applications Research Corporation (OAR).
9
 *
10
 *  The license and distribution terms for this file may be
11
 *  found in 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:56 chris Exp $
15
 */
16
 
17
#ifndef __CVME961_h
18
#define __CVME961_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  (4 * 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 0
86
#define RAM_END   0x100000
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 i960ca_PRCB *get_prcb( void )
103
{
104
  register i960ca_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
#ifdef C961_INIT
114
#undef BSP_EXTERN
115
#define BSP_EXTERN
116
#else
117
#undef BSP_EXTERN
118
#define BSP_EXTERN extern
119
#endif
120
 
121
/* miscellaneous stuff assumed to exist */
122
 
123
extern rtems_configuration_table BSP_Configuration;
124
 
125
BSP_EXTERN i960ca_PRCB           *Prcb;
126
BSP_EXTERN i960ca_control_table  *Ctl_tbl;
127
 
128
/*
129
 *  Device Driver Table Entries
130
 */
131
 
132
/*
133
 * NOTE: Use the standard Console driver entry
134
 */
135
 
136
/*
137
 * NOTE: Use the standard Clock driver entry
138
 */
139
 
140
/* functions */
141
 
142
void bsp_cleanup( void );
143
 
144
i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int );
145
 
146
#ifdef __cplusplus
147
}
148
#endif
149
 
150
#endif
151
/* end of include file */

powered by: WebSVN 2.1.0

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