source: rtems/c/src/lib/libbsp/mips/jmr3904/include/bsp.h @ a6f969b3

4.104.114.84.95
Last change on this file since a6f969b3 was a6f969b3, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 4, 2003 at 6:52:12 PM

2003-09-04 Joel Sherrill <joel@…>

  • console/console-io.c, include/bsp.h, startup/bspclean.c, startup/bspstart.c, timer/timer.c, tools/runtest: URL for license changed.
  • Property mode set to 100644
File size: 2.7 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains some definitions specific to the
4 *  JMR3904 simulator in gdb.
5 *
6 *  COPYRIGHT (c) 1989-2000.
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.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifndef __JMR3904_h
17#define __JMR3904_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/tx3904.h>
30
31/*
32 *  Define the time limits for RTEMS Test Suite test durations.
33 *  Long test and short test duration limits are provided.  These
34 *  values are in seconds and need to be converted to ticks for the
35 *  application.
36 *
37 */
38
39#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
40#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
41
42/*
43 *  Define the interrupt mechanism for Time Test 27
44 *
45 *  NOTE: Following are for XXX and are board independent
46 *
47 */
48
49#define MUST_WAIT_FOR_INTERRUPT 1
50
51#if 0
52#define Install_tm27_vector( handler ) \
53    (void) set_vector( handler, TX3904_IRQ_SOFTWARE_1, 1 ); \
54
55#define Cause_tm27_intr() \
56    asm volatile ( "syscall 0x01" : : );
57
58#define CLOCK_VECTOR TX3904_IRQ_TMR0
59
60#define Clear_tm27_intr() 
61
62#define Lower_tm27_intr()
63#else
64#define Install_tm27_vector( handler ) \
65    (void) set_vector( handler, TX3904_IRQ_TMR0, 1 ); \
66
67#define Cause_tm27_intr() \
68  do { \
69    unsigned32 _clicks = 20; \
70    TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CCDR, 0x3 ); \
71    TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CPRA, _clicks ); \
72    TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TISR, 0x00 ); \
73    TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_ITMR, 0x8001 ); \
74    TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TCR,   0xC0 ); \
75    *((volatile unsigned32 *) 0xFFFFC01C) = 0x00000700; \
76  } while(0)
77
78#define Clear_tm27_intr() \
79  do { \
80    TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_ITMR, 0x0001 ); \
81    TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CCDR, 0x3 ); \
82    TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TISR,   0x00 ); \
83  } while(0)
84
85#define Lower_tm27_intr() \
86  mips_enable_in_interrupt_mask( 0xff01 );
87
88#endif
89
90/* Constants */
91
92/* miscellaneous stuff assumed to exist */
93
94extern rtems_configuration_table BSP_Configuration;
95
96/*
97 *  Device Driver Table Entries
98 */
99
100/*
101 * NOTE: Use the standard Console driver entry
102 */
103 
104/*
105 * NOTE: Use the standard Clock driver entry
106 */
107
108/* functions */
109
110void bsp_cleanup( void );
111
112rtems_isr_entry set_vector(
113  rtems_isr_entry, rtems_vector_number, int );
114
115#ifdef __cplusplus
116}
117#endif
118
119#endif
120/* end of include file */
Note: See TracBrowser for help on using the repository browser.