source: rtems/c/src/lib/libbsp/i960/cvme961/include/bsp.h @ 8cc4a27

4.104.114.84.95
Last change on this file since 8cc4a27 was 8cc4a27, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/22/04 at 13:33:37

2004-04-22 Ralf Corsepius <ralf_corsepius@…>

  • include/bsp.h: Split out tmtest27 support.
  • include/tm27.h: New.
  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*  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.rtems.com/license/LICENSE.
13 *
14 *  $Id$
15 */
16
17#ifndef __CVME961_h
18#define __CVME961_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <bspopts.h>
25
26#include <rtems.h>
27#include <libcpu/i960CA.h>
28#include <rtems/iosupp.h>
29#include <rtems/console.h>
30#include <rtems/clockdrv.h>
31
32/*
33 *  confdefs.h overrides for this BSP:
34 *   - number of termios serial ports (defaults to 1)
35 *   - Interrupt stack space is not minimum if defined.
36 */
37
38/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
39#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
40
41/*
42 *  Simple spin delay in microsecond units for device drivers.
43 *  This is very dependent on the clock speed of the target.
44 */
45
46#define rtems_bsp_delay( microseconds ) \
47  { register uint32_t         _delay=(microseconds); \
48    register uint32_t         _tmp = 0; /* initialized to avoid warning */ \
49    asm volatile( "0: \
50                     remo      3,31,%0 ; \
51                     cmpo      0,%0 ; \
52                     subo      1,%1,%1 ; \
53                     cmpobne.t 0,%1,0b " \
54                  : "=d" (_tmp), "=d" (_delay) \
55                  : "0"  (_tmp), "1"  (_delay) ); \
56  }
57
58/* Constants */
59
60#define RAM_START 0
61#define RAM_END   0x100000
62
63/* NINDY console I/O requests:
64 *   CO sends a single character to stdout,
65 *   CI reads one.
66 */
67
68#define NINDY_INPUT   0
69#define NINDY_OUTPUT  1
70
71/*
72 *  get_prcb
73 *
74 *  Returns the PRCB pointer.
75 */
76
77static inline i960ca_PRCB *get_prcb( void )
78{
79  register i960ca_PRCB *_prcb = 0;
80
81  asm volatile( "calls 5; \
82                 mov   g0,%0" \
83                 : "=d" (_prcb) \
84                 : "0" (_prcb) );
85  return ( _prcb );
86}
87
88#ifdef C961_INIT
89#undef BSP_EXTERN
90#define BSP_EXTERN
91#else
92#undef BSP_EXTERN
93#define BSP_EXTERN extern
94#endif
95
96/* miscellaneous stuff assumed to exist */
97
98extern rtems_configuration_table BSP_Configuration;
99
100BSP_EXTERN i960ca_PRCB           *Prcb;
101BSP_EXTERN i960ca_control_table  *Ctl_tbl;
102
103/*
104 *  Device Driver Table Entries
105 */
106
107/*
108 * NOTE: Use the standard Console driver entry
109 */
110
111/*
112 * NOTE: Use the standard Clock driver entry
113 */
114
115/* functions */
116
117void bsp_cleanup( void );
118
119i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int );
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif
126/* end of include file */
Note: See TracBrowser for help on using the repository browser.