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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [mips64orion/] [p4000/] [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 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.OARcorp.com/rtems/license.html.
13
 *
14
 *  $Id: bsp.h,v 1.2 2001-09-27 12:00:24 chris Exp $
15
 */
16
/* @(#)bsp.h       03/15/96     1.1 */
17
 
18
#ifndef __P4000_BSP_h
19
#define __P4000_BSP_h
20
 
21
#ifdef __cplusplus
22
extern "C" {
23
#endif
24
 
25
#include <rtems.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
extern void WriteDisplay( char * string );
39
 
40
/*
41
 *  Define the time limits for RTEMS Test Suite test durations.
42
 *  Long test and short test duration limits are provided.  These
43
 *  values are in seconds and need to be converted to ticks for the
44
 *  application.
45
 *
46
 */
47
 
48
#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
49
#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
50
 
51
/*
52
 *  Stuff for Time Test 27
53
 */
54
 
55
#define MUST_WAIT_FOR_INTERRUPT 0
56
 
57
#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
58
 
59
#define Cause_tm27_intr()
60
 
61
#define Clear_tm27_intr()
62
 
63
#define Lower_tm27_intr()
64
 
65
extern unsigned32 mips_get_timer( void );
66
 
67
#define CPU_CLOCK_RATE_MHZ     (50)
68
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
69
 
70
/*
71
 *  Simple spin delay in microsecond units for device drivers.
72
 *  This is very dependent on the clock speed of the target.
73
 *
74
 *  NOTE: This macro generates a warning like "integer constant out
75
 *        of range" which is safe to ignore.  In 64 bit mode, unsigned32
76
 *        types are actually 64 bits long so that comparisons between
77
 *        unsigned32 types and pointers are valid.  The warning is caused
78
 *        by code in the delay macro that is necessary for 64 bit mode.
79
 */
80
 
81
#define delay( microseconds ) \
82
  { \
83
     unsigned32 _end_clock = mips_get_timer() + microseconds * CLOCKS_PER_MICROSECOND; \
84
     _end_clock %= 0x100000000;  /* make sure result is 32 bits */ \
85
     \
86
     /* handle timer overflow, if necessary */ \
87
     while ( _end_clock < mips_get_timer() );  \
88
     \
89
     while ( _end_clock > mips_get_timer() ); \
90
  }
91
 
92
/* Constants */
93
 
94
#define RAM_START 0
95
#define RAM_END   0x100000
96
 
97
/* miscellaneous stuff assumed to exist */
98
 
99
extern rtems_configuration_table BSP_Configuration;
100
 
101
/*
102
 *  Device Driver Table Entries
103
 */
104
 
105
/*
106
 * NOTE: Use the standard Console driver entry
107
 */
108
 
109
/*
110
 * NOTE: Use the standard Clock driver entry
111
 */
112
 
113
/* miscellaneous stuff assumed to exist */
114
 
115
mips_isr_entry set_vector(                      /* returns old vector */
116
  rtems_isr_entry     handler,                  /* isr routine        */
117
  rtems_vector_number vector,                   /* vector number      */
118
  int                 type                      /* RTEMS or RAW intr  */
119
);
120
 
121
#ifdef __cplusplus
122
}
123
#endif
124
 
125
#endif
126
/* end of include file */

powered by: WebSVN 2.1.0

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