source: rtems/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h @ 7de58239

4.104.114.84.95
Last change on this file since 7de58239 was 7de58239, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 1, 2002 at 4:45:18 PM

2001-02-01 Greg Menke <gregory.menke@…>

  • Update of BSP to address problems restarting, provide more information during boot, and better handle ROM vs RAM images.
  • README, include/bsp.h, start/regs.S, start/start.S, startup/bspstart.c, startup/linkcmds, timer/timer.c: Updated
  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains some definitions specific to a board
4 *  based upon the generic capabilities of a Mongoose-V.
5 *
6 *  COPYRIGHT (c) 1989-2001.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#ifndef __GENERIC_MONGOOSE_V_h
17#define __GENERIC_MONGOOSE_V_h
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <bspopts.h>
24
25#include <rtems.h>
26#include <iosupp.h>
27#include <console.h>
28#include <clockdrv.h>
29#include <libcpu/mongoose-v.h>
30
31
32#ifndef CPU_CLOCK_RATE
33#define CLOCK_RATE      12000000
34#endif
35
36#define CPU_CLOCK_RATE_HZ       CLOCK_RATE
37#define CPU_CLOCK_RATE_MHZ      (CLOCK_RATE/1000000)
38
39
40/*
41 * Useful defines set here so we can avoid duplicating them all over
42 * creation.
43 *
44 */
45
46
47
48/*
49 * assertSoftwareInt defined in vectorisrs.c the prototype is here so
50 * userspace code can get to it directly.
51 *  */
52
53extern void assertSoftwareInterrupt(unsigned32);
54
55
56
57
58
59/*
60 *  Define the time limits for RTEMS Test Suite test durations.
61 *  Long test and short test duration limits are provided.  These
62 *  values are in seconds and need to be converted to ticks for the
63 *  application.
64 *
65 */
66
67#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
68#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
69
70/*
71 *  Define the interrupt mechanism for Time Test 27
72 *
73 *  NOTE: Following are for XXX and are board independent
74 *
75 */
76
77
78#define CLOCK_VECTOR    MONGOOSEV_IRQ_TIMER1
79
80
81#define MUST_WAIT_FOR_INTERRUPT 1
82
83#if 1
84
85#define Install_tm27_vector( handler ) \
86    (void) set_vector( handler, MONGOOSEV_IRQ_SOFTWARE_1, 1 );
87
88
89
90#define Cause_tm27_intr()   assertSoftwareInterrupt(0);
91
92#define Clear_tm27_intr() 
93#define Lower_tm27_intr()
94
95#else
96
97#define Install_tm27_vector( handler ) \
98    (void) set_vector( handler, MONGOOSEV_IRQ_TIMER1, 1 );
99
100#define Cause_tm27_intr() \
101  do { \
102    ; \
103  } while(0)
104
105#define Clear_tm27_intr()
106#define Lower_tm27_intr()
107
108#endif
109
110/* Constants */
111
112/* miscellaneous stuff assumed to exist */
113
114extern rtems_configuration_table BSP_Configuration;
115
116/*
117 *  Device Driver Table Entries
118 */
119
120/*
121 * NOTE: Use the standard Console driver entry
122 */
123 
124/*
125 * NOTE: Use the standard Clock driver entry
126 */
127
128/* functions */
129
130void bsp_cleanup( void );
131
132rtems_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
133   
134#ifdef __cplusplus
135}
136#endif
137
138#endif
139
140/* end of include file */
Note: See TracBrowser for help on using the repository browser.