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 | * Simple spin delay in microsecond units for device drivers. |
---|
45 | * This is very dependent on the clock speed of the target. |
---|
46 | */ |
---|
47 | |
---|
48 | #define rtems_bsp_delay( microseconds ) \ |
---|
49 | { register uint32_t _delay=(microseconds); \ |
---|
50 | register uint32_t _tmp=123; \ |
---|
51 | asm volatile( "0: \ |
---|
52 | nbcd %0 ; \ |
---|
53 | nbcd %0 ; \ |
---|
54 | dbf %1,0b" \ |
---|
55 | : "=d" (_tmp), "=d" (_delay) \ |
---|
56 | : "0" (_tmp), "1" (_delay) ); \ |
---|
57 | } |
---|
58 | |
---|
59 | /* Constants */ |
---|
60 | |
---|
61 | /* Structures */ |
---|
62 | |
---|
63 | /* |
---|
64 | * Device Driver Table Entries |
---|
65 | */ |
---|
66 | |
---|
67 | /* |
---|
68 | * NOTE: Use the standard Console driver entry |
---|
69 | */ |
---|
70 | |
---|
71 | /* |
---|
72 | * NOTE: Use the standard Clock driver entry |
---|
73 | */ |
---|
74 | |
---|
75 | /* |
---|
76 | * How many libio files we want |
---|
77 | */ |
---|
78 | |
---|
79 | #define BSP_LIBIO_MAX_FDS 20 |
---|
80 | |
---|
81 | /* miscellaneous stuff assumed to exist */ |
---|
82 | |
---|
83 | extern rtems_configuration_table BSP_Configuration; |
---|
84 | |
---|
85 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
86 | |
---|
87 | /* functions */ |
---|
88 | |
---|
89 | void bsp_cleanup( void ); |
---|
90 | |
---|
91 | m68k_isr_entry set_vector( |
---|
92 | rtems_isr_entry handler, |
---|
93 | rtems_vector_number vector, |
---|
94 | int type |
---|
95 | ); |
---|
96 | |
---|
97 | /* |
---|
98 | * Values assigned by link editor |
---|
99 | */ |
---|
100 | extern void *_RomBase, *_RamBase; |
---|
101 | |
---|
102 | #ifdef __cplusplus |
---|
103 | } |
---|
104 | #endif |
---|
105 | |
---|
106 | #endif |
---|
107 | /* end of include file */ |
---|