source: rtems/c/src/lib/libbsp/m68k/mrm332/include/bsp.h @ fb7a141

4.104.114.84.95
Last change on this file since fb7a141 was fb7a141, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/01/04 at 10:10:42

2004-04-01 Ralf Corsepius <ralf_corsepius@…>

  • include/bsp.h: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
  • include/bsp.h: Include <rtems/console.h> instead of <console.h>.
  • include/bsp.h: Include <rtems/iosupp.h> instead of <iosupp.h>.
  • Property mode set to 100644
File size: 3.3 KB
Line 
1/*  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.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#ifndef __MRM332_BSP_h
16#define __MRM332_BSP_h
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include <bspopts.h>
23
24#include <rtems.h>
25#include <rtems/bspIo.h>
26#include <rtems/clockdrv.h>
27#include <rtems/console.h>
28#include <rtems/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 uint32_t         _delay=(microseconds); \
77    register uint32_t         _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
88extern char _etext[];
89extern char _copy_start[];
90extern char _edata[];
91extern char _clear_start[];
92extern char end[];
93extern 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
122extern rtems_configuration_table BSP_Configuration;
123
124extern m68k_isr_entry M68Kvec[];   /* vector table address */
125
126extern int stack_size;
127
128extern 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
144void bsp_cleanup( void );
145
146m68k_isr_entry set_vector(
147  rtems_isr_entry     handler,
148  rtems_vector_number vector,
149  int                 type
150);
151
152void console_init(void);
153
154void Spurious_Initialize(void);
155
156void _UART_flush(void);
157
158void Clock_exit(void);
159
160void outbyte(char);
161
162#ifdef __cplusplus
163}
164#endif
165
166#endif
167/* end of include file */
Note: See TracBrowser for help on using the repository browser.