1 | /* bsp.h |
---|
2 | * |
---|
3 | * This include file contains all board IO definitions. |
---|
4 | * |
---|
5 | * XXX : put yours in here |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989-1999. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.com/license/LICENSE. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __GEN68302_BSP_h |
---|
18 | #define __GEN68302_BSP_h |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <bspopts.h> |
---|
25 | |
---|
26 | #include <rtems.h> |
---|
27 | #include <rtems/console.h> |
---|
28 | #include <rtems/iosupp.h> |
---|
29 | #include <rtems/clockdrv.h> |
---|
30 | |
---|
31 | /* |
---|
32 | * confdefs.h overrides for this BSP: |
---|
33 | * - number of termios serial ports (defaults to 1) |
---|
34 | * - Interrupt stack space is not minimum if defined. |
---|
35 | */ |
---|
36 | |
---|
37 | /* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */ |
---|
38 | #define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024) |
---|
39 | |
---|
40 | /* |
---|
41 | * Simple spin delay in microsecond units for device drivers. |
---|
42 | * This is very dependent on the clock speed of the target. |
---|
43 | */ |
---|
44 | |
---|
45 | #define rtems_bsp_delay( microseconds ) \ |
---|
46 | { register uint32_t _delay=(microseconds); \ |
---|
47 | register uint32_t _tmp=123; \ |
---|
48 | asm volatile( "0: \ |
---|
49 | nbcd %0 ; \ |
---|
50 | nbcd %0 ; \ |
---|
51 | dbf %1,0b" \ |
---|
52 | : "=d" (_tmp), "=d" (_delay) \ |
---|
53 | : "0" (_tmp), "1" (_delay) ); \ |
---|
54 | } |
---|
55 | |
---|
56 | /* Constants */ |
---|
57 | |
---|
58 | #define RAM_START 0 |
---|
59 | #define RAM_END 0x040000 |
---|
60 | |
---|
61 | /* Structures */ |
---|
62 | |
---|
63 | #ifdef GEN68302_INIT |
---|
64 | #undef EXTERN |
---|
65 | #define EXTERN |
---|
66 | #else |
---|
67 | #undef EXTERN |
---|
68 | #define EXTERN extern |
---|
69 | #endif |
---|
70 | |
---|
71 | /* |
---|
72 | * Device Driver Table Entries |
---|
73 | */ |
---|
74 | |
---|
75 | /* |
---|
76 | * NOTE: Use the standard Console driver entry |
---|
77 | */ |
---|
78 | |
---|
79 | /* |
---|
80 | * NOTE: Use the standard Clock driver entry |
---|
81 | */ |
---|
82 | |
---|
83 | /* miscellaneous stuff assumed to exist */ |
---|
84 | |
---|
85 | extern rtems_configuration_table BSP_Configuration; |
---|
86 | |
---|
87 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
88 | |
---|
89 | /* functions */ |
---|
90 | |
---|
91 | void bsp_cleanup( void ); |
---|
92 | |
---|
93 | m68k_isr_entry set_vector( |
---|
94 | rtems_isr_entry handler, |
---|
95 | rtems_vector_number vector, |
---|
96 | int type |
---|
97 | ); |
---|
98 | |
---|
99 | #ifdef __cplusplus |
---|
100 | } |
---|
101 | #endif |
---|
102 | |
---|
103 | #endif |
---|
104 | /* end of include file */ |
---|