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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [m68k/] [mrm332/] [include/] [bsp.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  bsp.h
2
 *
3
 *  This include file contains all mrm board IO definitions.
4
 *
5
 *  COPYRIGHT (c) 1989-1999.
6
 *  On-Line Applications Research Corporation (OAR).
7
 *
8
 *  The license and distribution terms for this file may be
9
 *  found in the file LICENSE in this distribution or at
10
 *  http://www.OARcorp.com/rtems/license.html.
11
 *
12
 *  bsp.h,v 1.4 2002/02/28 23:09:55 joel Exp
13
 */
14
 
15
#ifndef __MRM332_BSP_h
16
#define __MRM332_BSP_h
17
 
18
#ifdef __cplusplus
19
extern "C" {
20
#endif
21
 
22
#include <bspopts.h>
23
 
24
#include <rtems.h>
25
#include <rtems/bspIo.h>
26
#include <clockdrv.h>
27
#include <console.h>
28
#include <iosupp.h>
29
#include <mrm332.h>
30
#include <sim.h>
31
#include <qsm.h>
32
 
33
/*
34
 *  confdefs.h overrides for this BSP:
35
 *   - number of termios serial ports (defaults to 1)
36
 *   - Interrupt stack space is not minimum if defined.
37
 */
38
 
39
#define CONSOLE_SCI
40
/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
41
/* #define CONFIGURE_INTERRUPT_STACK_MEMORY  (TBD * 1024) */
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
 *  Define the interrupt mechanism for Time Test 27
56
 */
57
 
58
/* XXX - JRS - I want to compile the tmtests */
59
 
60
#define MUST_WAIT_FOR_INTERRUPT 1 
61
 
62
#define Install_tm27_vector( handler )
63
 
64
#define Cause_tm27_intr()
65
 
66
#define Clear_tm27_intr()
67
 
68
#define Lower_tm27_intr() 
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
 
75
#define rtems_bsp_delay( microseconds ) \
76
  { register rtems_unsigned32 _delay=(microseconds); \
77
    register rtems_unsigned32 _tmp=123; \
78
    asm volatile( "0: \
79
                     nbcd      %0 ; \
80
                     nbcd      %0 ; \
81
                     dbf       %1,0b" \
82
                  : "=d" (_tmp), "=d" (_delay) \
83
                  : "0"  (_tmp), "1"  (_delay) ); \
84
  }
85
 
86
/* externals */
87
 
88
extern char _etext[];
89
extern char _copy_start[];
90
extern char _edata[];
91
extern char _clear_start[];
92
extern char end[];
93
extern char _copy_data_from_rom[];
94
 
95
/* constants */
96
 
97
#ifdef __START_C__
98
#define STACK_SIZE "#0x800"
99
#else
100
#define STACK_SIZE 0x800
101
#endif
102
 
103
/* macros */
104
 
105
#define RAW_PUTS(str) \
106
  { register char *ptr = str; \
107
    while (*ptr) SCI_output_char(*ptr++); \
108
  }
109
 
110
#define RAW_PUTI(n) { \
111
    register int i, j; \
112
    \
113
    RAW_PUTS("0x"); \
114
    for (i=28;i>=0;i -= 4) { \
115
      j = (n>>i) & 0xf; \
116
      SCI_output_char( (j>9 ? j-10+'a' : j+'0') ); \
117
    } \
118
  }
119
 
120
/* miscellaneous stuff assumed to exist */
121
 
122
extern rtems_configuration_table BSP_Configuration;
123
 
124
extern m68k_isr_entry M68Kvec[];   /* vector table address */
125
 
126
extern int stack_size;
127
 
128
extern int stack_start;
129
 
130
/*
131
 *  Device Driver Table Entries
132
 */
133
 
134
/*
135
 * NOTE: Use the standard Console driver entry
136
 */
137
 
138
/*
139
 * NOTE: Use the standard Clock driver entry
140
 */
141
 
142
/* functions */
143
 
144
void bsp_cleanup( void );
145
 
146
m68k_isr_entry set_vector(
147
  rtems_isr_entry     handler,
148
  rtems_vector_number vector,
149
  int                 type
150
);
151
 
152
void console_init(void);
153
 
154
void Spurious_Initialize(void);
155
 
156
void _UART_flush(void);
157
 
158
void Clock_exit(void);
159
 
160
void outbyte(char);
161
 
162
#ifdef __cplusplus
163
}
164
#endif
165
 
166
#endif
167
/* end of include file */

powered by: WebSVN 2.1.0

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