source: rtems/c/src/lib/libbsp/mips/hurricane/include/bsp.h @ c1a96804

4.104.114.84.95
Last change on this file since c1a96804 was c1a96804, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/17/06 at 10:34:12

Misc. cosmetics.

  • Property mode set to 100644
File size: 2.9 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-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 _BSP_H
18#define _BSP_H
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <bspopts.h>
25
26#include <rtems.h>
27#include <rtems/iosupp.h>
28#include <rtems/console.h>
29#include <rtems/clockdrv.h>
30#include <libcpu/rm5231.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
41extern void WriteDisplay( char * string );
42
43/*
44 *  Define the time limits for RTEMS Test Suite test durations.
45 *  Long test and short test duration limits are provided.  These
46 *  values are in seconds and need to be converted to ticks for the
47 *  application.
48 *
49 */
50
51#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
52#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
53
54/*
55 *  Stuff for Time Test 27
56 */
57
58#define MUST_WAIT_FOR_INTERRUPT 0
59
60#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
61
62#define Cause_tm27_intr()
63
64#define Clear_tm27_intr()
65
66#define Lower_tm27_intr()
67
68extern uint32_t mips_get_timer( void );
69
70#define CPU_CLOCK_RATE_MHZ     (200)
71#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
72
73/*
74 *  Simple spin delay in microsecond units for device drivers.
75 *  This is very dependent on the clock speed of the target.
76 *
77 *  NOTE: This macro generates a warning like "integer constant out
78 *        of range" which is safe to ignore.  In 64 bit mode, unsigned32
79 *        types are actually 64 bits long so that comparisons between
80 *        unsigned32 types and pointers are valid.  The warning is caused
81 *        by code in the delay macro that is necessary for 64 bit mode.
82 */
83
84#define rtems_bsp_delay( microseconds ) \
85  { \
86     unsigned32 _end_clock = \
87          mips_get_timer() + microseconds * CLOCKS_PER_MICROSECOND; \
88     _end_clock %= 0x100000000;  /* make sure result is 32 bits */ \
89     \
90     /* handle timer overflow, if necessary */ \
91     while ( _end_clock < mips_get_timer() );  \
92     \
93     while ( _end_clock > mips_get_timer() ); \
94  }
95
96/* Constants */
97
98#define RAM_START 0
99#define RAM_END   0x100000
100
101/* miscellaneous stuff assumed to exist */
102
103extern rtems_configuration_table BSP_Configuration;
104
105/*
106 *  Device Driver Table Entries
107 */
108
109/*
110 * NOTE: Use the standard Console driver entry
111 */
112 
113/*
114 * NOTE: Use the standard Clock driver entry
115 */
116
117/* miscellaneous stuff assumed to exist */
118
119rtems_isr_entry set_vector(
120  rtems_isr_entry, rtems_vector_number, int );
121
122#ifdef __cplusplus
123}
124#endif
125
126#endif  /* __HURRICANE_BSP_h */
Note: See TracBrowser for help on using the repository browser.