source: rtems/c/src/lib/libbsp/mips64orion/p4000/include/bsp.h @ 60b791ad

4.104.114.84.95
Last change on this file since 60b791ad was 60b791ad, checked in by Joel Sherrill <joel.sherrill@…>, on 02/17/98 at 23:46:28

updated copyright to 1998

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all board IO definitions.
4 *
5 *  XXX : put yours in here
6 *
7 *  COPYRIGHT (c) 1989-1998.
8 *  On-Line Applications Research Corporation (OAR).
9 *  Copyright assigned to U.S. Government, 1994.
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.OARcorp.com/rtems/license.html.
14 *
15 *  $Id$
16 */
17/* @(#)bsp.h       03/15/96     1.1 */
18
19#ifndef __P4000_BSP_h
20#define __P4000_BSP_h
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <rtems.h>
27#include <console.h>
28#include <clockdrv.h>
29
30extern void WriteDisplay( char * string );
31
32/*
33 *  Define the time limits for RTEMS Test Suite test durations.
34 *  Long test and short test duration limits are provided.  These
35 *  values are in seconds and need to be converted to ticks for the
36 *  application.
37 *
38 */
39
40#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
41#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
42
43/*
44 *  Stuff for Time Test 27
45 */
46
47#define MUST_WAIT_FOR_INTERRUPT 0
48
49#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
50
51#define Cause_tm27_intr()
52
53#define Clear_tm27_intr()
54
55#define Lower_tm27_intr()
56
57extern unsigned32 mips_get_timer( void );
58
59#define CPU_CLOCK_RATE_MHZ     (50)
60#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
61
62/*
63 *  Simple spin delay in microsecond units for device drivers.
64 *  This is very dependent on the clock speed of the target.
65 *
66 *  NOTE: This macro generates a warning like "integer constant out
67 *        of range" which is safe to ignore.  In 64 bit mode, unsigned32
68 *        types are actually 64 bits long so that comparisons between
69 *        unsigned32 types and pointers are valid.  The warning is caused
70 *        by code in the delay macro that is necessary for 64 bit mode.
71 */
72
73#define delay( microseconds ) \
74  { \
75     unsigned32 _end_clock = mips_get_timer() + microseconds * CLOCKS_PER_MICROSECOND; \
76     _end_clock %= 0x100000000;  /* make sure result is 32 bits */ \
77     \
78     /* handle timer overflow, if necessary */ \
79     while ( _end_clock < mips_get_timer() );  \
80     \
81     while ( _end_clock > mips_get_timer() ); \
82  }
83
84/* Constants */
85
86#define RAM_START 0
87#define RAM_END   0x100000
88
89/* miscellaneous stuff assumed to exist */
90
91extern rtems_configuration_table BSP_Configuration;
92
93/*
94 *  Device Driver Table Entries
95 */
96
97/*
98 * NOTE: Use the standard Console driver entry
99 */
100 
101/*
102 * NOTE: Use the standard Clock driver entry
103 */
104
105/*
106 * How many libio files we want
107 */
108
109#define BSP_LIBIO_MAX_FDS       20
110
111/* miscellaneous stuff assumed to exist */
112
113int bsp_start(
114  int   argc,
115  char **argv,
116  char **environp
117);
118
119void bsp_cleanup( void );
120
121mips_isr_entry set_vector(                      /* returns old vector */
122  rtems_isr_entry     handler,                  /* isr routine        */
123  rtems_vector_number vector,                   /* vector number      */
124  int                 type                      /* RTEMS or RAW intr  */
125);
126
127#ifdef __cplusplus
128}
129#endif
130
131#endif
132/* end of include file */
Note: See TracBrowser for help on using the repository browser.