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-1998. |
---|
13 | * On-Line Applications Research Corporation (OAR). |
---|
14 | * Copyright assigned to U.S. Government, 1994. |
---|
15 | * |
---|
16 | * The license and distribution terms for this file may be |
---|
17 | * found in the file LICENSE in this distribution or at |
---|
18 | * http://www.OARcorp.com/rtems/license.html. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef __GEN68340_BSP_h |
---|
22 | #define __GEN68340_BSP_h |
---|
23 | |
---|
24 | #ifdef __cplusplus |
---|
25 | extern "C" { |
---|
26 | #endif |
---|
27 | |
---|
28 | #include <rtems.h> |
---|
29 | #include <console.h> |
---|
30 | #include <iosupp.h> |
---|
31 | #include <clockdrv.h> |
---|
32 | |
---|
33 | /* |
---|
34 | * Define the time limits for RTEMS Test Suite test durations. |
---|
35 | * Long test and short test duration limits are provided. These |
---|
36 | * values are in seconds and need to be converted to ticks for the |
---|
37 | * application. |
---|
38 | * |
---|
39 | */ |
---|
40 | |
---|
41 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
42 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
43 | |
---|
44 | /* |
---|
45 | * Stuff for Time Test 27 |
---|
46 | * Don't bother with hardware -- just use a software-interrupt |
---|
47 | */ |
---|
48 | |
---|
49 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
50 | |
---|
51 | #define Install_tm27_vector( handler ) set_vector( (handler), 34, 1 ) |
---|
52 | |
---|
53 | #define Cause_tm27_intr() /* asm volatile ("trap #2"); */ |
---|
54 | |
---|
55 | #define Clear_tm27_intr() |
---|
56 | |
---|
57 | #define Lower_tm27_intr() |
---|
58 | |
---|
59 | /* |
---|
60 | * Simple spin delay in microsecond units for device drivers. |
---|
61 | * This is very dependent on the clock speed of the target. |
---|
62 | */ |
---|
63 | |
---|
64 | #define delay( microseconds ) \ |
---|
65 | { register rtems_unsigned32 _delay=(microseconds); \ |
---|
66 | register rtems_unsigned32 _tmp=123; \ |
---|
67 | asm volatile( "0: \ |
---|
68 | nbcd %0 ; \ |
---|
69 | nbcd %0 ; \ |
---|
70 | dbf %1,0b" \ |
---|
71 | : "=d" (_tmp), "=d" (_delay) \ |
---|
72 | : "0" (_tmp), "1" (_delay) ); \ |
---|
73 | } |
---|
74 | |
---|
75 | /* Constants */ |
---|
76 | |
---|
77 | /* Structures */ |
---|
78 | |
---|
79 | /* |
---|
80 | * Device Driver Table Entries |
---|
81 | */ |
---|
82 | |
---|
83 | /* |
---|
84 | * NOTE: Use the standard Console driver entry |
---|
85 | */ |
---|
86 | |
---|
87 | /* |
---|
88 | * NOTE: Use the standard Clock driver entry |
---|
89 | */ |
---|
90 | |
---|
91 | /* |
---|
92 | * How many libio files we want |
---|
93 | */ |
---|
94 | |
---|
95 | #define BSP_LIBIO_MAX_FDS 20 |
---|
96 | |
---|
97 | /* miscellaneous stuff assumed to exist */ |
---|
98 | |
---|
99 | extern rtems_configuration_table BSP_Configuration; |
---|
100 | |
---|
101 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
102 | |
---|
103 | /* functions */ |
---|
104 | |
---|
105 | void bsp_cleanup( void ); |
---|
106 | |
---|
107 | m68k_isr_entry set_vector( |
---|
108 | rtems_isr_entry handler, |
---|
109 | rtems_vector_number vector, |
---|
110 | int type |
---|
111 | ); |
---|
112 | |
---|
113 | /* |
---|
114 | * Values assigned by link editor |
---|
115 | */ |
---|
116 | extern void *_RomBase, *_RamBase; |
---|
117 | |
---|
118 | #ifdef __cplusplus |
---|
119 | } |
---|
120 | #endif |
---|
121 | |
---|
122 | #endif |
---|
123 | /* end of include file */ |
---|