1 | /* |
---|
2 | * Board Support Package for `Generic' Motorola MC68340 |
---|
3 | * |
---|
4 | * Based on the `gen68360' board support package, and covered by the |
---|
5 | * original distribution terms. |
---|
6 | * |
---|
7 | * $Id$ |
---|
8 | */ |
---|
9 | |
---|
10 | /* bsp.h |
---|
11 | * |
---|
12 | * COPYRIGHT (c) 1989-1999. |
---|
13 | * On-Line Applications Research Corporation (OAR). |
---|
14 | * |
---|
15 | * The license and distribution terms for this file may be |
---|
16 | * found in the file LICENSE in this distribution or at |
---|
17 | * http://www.rtems.com/license/LICENSE. |
---|
18 | */ |
---|
19 | |
---|
20 | #ifndef __GEN68340_BSP_h |
---|
21 | #define __GEN68340_BSP_h |
---|
22 | |
---|
23 | #ifdef __cplusplus |
---|
24 | extern "C" { |
---|
25 | #endif |
---|
26 | |
---|
27 | #include <bspopts.h> |
---|
28 | |
---|
29 | #include <rtems.h> |
---|
30 | #include <rtems/console.h> |
---|
31 | #include <rtems/iosupp.h> |
---|
32 | #include <rtems/clockdrv.h> |
---|
33 | |
---|
34 | /* |
---|
35 | * confdefs.h overrides for this BSP: |
---|
36 | * - termios serial ports (defaults to 1) |
---|
37 | * - Interrupt stack space is not minimum if defined. |
---|
38 | */ |
---|
39 | |
---|
40 | /* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */ |
---|
41 | #define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 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 | |
---|
53 | /* |
---|
54 | * Stuff for Time Test 27 |
---|
55 | * Don't bother with hardware -- just use a software-interrupt |
---|
56 | */ |
---|
57 | |
---|
58 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
59 | |
---|
60 | #define Install_tm27_vector( handler ) set_vector( (handler), 34, 1 ) |
---|
61 | |
---|
62 | #define Cause_tm27_intr() /* asm volatile ("trap #2"); */ |
---|
63 | |
---|
64 | #define Clear_tm27_intr() |
---|
65 | |
---|
66 | #define Lower_tm27_intr() |
---|
67 | |
---|
68 | /* |
---|
69 | * Simple spin delay in microsecond units for device drivers. |
---|
70 | * This is very dependent on the clock speed of the target. |
---|
71 | */ |
---|
72 | |
---|
73 | #define rtems_bsp_delay( microseconds ) \ |
---|
74 | { register uint32_t _delay=(microseconds); \ |
---|
75 | register uint32_t _tmp=123; \ |
---|
76 | asm volatile( "0: \ |
---|
77 | nbcd %0 ; \ |
---|
78 | nbcd %0 ; \ |
---|
79 | dbf %1,0b" \ |
---|
80 | : "=d" (_tmp), "=d" (_delay) \ |
---|
81 | : "0" (_tmp), "1" (_delay) ); \ |
---|
82 | } |
---|
83 | |
---|
84 | /* Constants */ |
---|
85 | |
---|
86 | /* Structures */ |
---|
87 | |
---|
88 | /* |
---|
89 | * Device Driver Table Entries |
---|
90 | */ |
---|
91 | |
---|
92 | /* |
---|
93 | * NOTE: Use the standard Console driver entry |
---|
94 | */ |
---|
95 | |
---|
96 | /* |
---|
97 | * NOTE: Use the standard Clock driver entry |
---|
98 | */ |
---|
99 | |
---|
100 | /* |
---|
101 | * How many libio files we want |
---|
102 | */ |
---|
103 | |
---|
104 | #define BSP_LIBIO_MAX_FDS 20 |
---|
105 | |
---|
106 | /* miscellaneous stuff assumed to exist */ |
---|
107 | |
---|
108 | extern rtems_configuration_table BSP_Configuration; |
---|
109 | |
---|
110 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
111 | |
---|
112 | /* functions */ |
---|
113 | |
---|
114 | void bsp_cleanup( void ); |
---|
115 | |
---|
116 | m68k_isr_entry set_vector( |
---|
117 | rtems_isr_entry handler, |
---|
118 | rtems_vector_number vector, |
---|
119 | int type |
---|
120 | ); |
---|
121 | |
---|
122 | /* |
---|
123 | * Values assigned by link editor |
---|
124 | */ |
---|
125 | extern void *_RomBase, *_RamBase; |
---|
126 | |
---|
127 | #ifdef __cplusplus |
---|
128 | } |
---|
129 | #endif |
---|
130 | |
---|
131 | #endif |
---|
132 | /* end of include file */ |
---|