1 | /* |
---|
2 | * Board Support Package for `Generic' Motorola MC68360 |
---|
3 | * |
---|
4 | * Based on the `gen68302' board support package, and covered by the |
---|
5 | * original distribution terms. |
---|
6 | * |
---|
7 | * W. Eric Norum |
---|
8 | * Saskatchewan Accelerator Laboratory |
---|
9 | * University of Saskatchewan |
---|
10 | * Saskatoon, Saskatchewan, CANADA |
---|
11 | * eric@skatter.usask.ca |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | /* bsp.h |
---|
17 | * |
---|
18 | * COPYRIGHT (c) 1989-1997. |
---|
19 | * On-Line Applications Research Corporation (OAR). |
---|
20 | * Copyright assigned to U.S. Government, 1994. |
---|
21 | * |
---|
22 | * The license and distribution terms for this file may be |
---|
23 | * found in the file LICENSE in this distribution or at |
---|
24 | * http://www.OARcorp.com/rtems/license.html. |
---|
25 | */ |
---|
26 | |
---|
27 | #ifndef __GEN68360_BSP_h |
---|
28 | #define __GEN68360_BSP_h |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #endif |
---|
33 | |
---|
34 | #include <rtems.h> |
---|
35 | #include <console.h> |
---|
36 | #include <iosupp.h> |
---|
37 | #include <clockdrv.h> |
---|
38 | |
---|
39 | /* |
---|
40 | * Define the time limits for RTEMS Test Suite test durations. |
---|
41 | * Long test and short test duration limits are provided. These |
---|
42 | * values are in seconds and need to be converted to ticks for the |
---|
43 | * application. |
---|
44 | * |
---|
45 | */ |
---|
46 | |
---|
47 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
48 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
49 | |
---|
50 | /* |
---|
51 | * Stuff for Time Test 27 |
---|
52 | * Don't bother with hardware -- just use a software-interrupt |
---|
53 | */ |
---|
54 | |
---|
55 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
56 | |
---|
57 | #define Install_tm27_vector( handler ) set_vector( (handler), 34, 1 ) |
---|
58 | |
---|
59 | #define Cause_tm27_intr() asm volatile ("trap #2"); |
---|
60 | |
---|
61 | #define Clear_tm27_intr() |
---|
62 | |
---|
63 | #define Lower_tm27_intr() |
---|
64 | |
---|
65 | /* |
---|
66 | * Simple spin delay in microsecond units for device drivers. |
---|
67 | * This is very dependent on the clock speed of the target. |
---|
68 | */ |
---|
69 | |
---|
70 | #define delay( microseconds ) \ |
---|
71 | { register rtems_unsigned32 _delay=(microseconds); \ |
---|
72 | register rtems_unsigned32 _tmp=123; \ |
---|
73 | asm volatile( "0: \ |
---|
74 | nbcd %0 ; \ |
---|
75 | nbcd %0 ; \ |
---|
76 | dbf %1,0b" \ |
---|
77 | : "=d" (_tmp), "=d" (_delay) \ |
---|
78 | : "0" (_tmp), "1" (_delay) ); \ |
---|
79 | } |
---|
80 | |
---|
81 | /* Constants */ |
---|
82 | |
---|
83 | /* Structures */ |
---|
84 | |
---|
85 | /* |
---|
86 | * Device Driver Table Entries |
---|
87 | */ |
---|
88 | |
---|
89 | /* |
---|
90 | * NOTE: Use the standard Console driver entry |
---|
91 | */ |
---|
92 | |
---|
93 | /* |
---|
94 | * NOTE: Use the standard Clock driver entry |
---|
95 | */ |
---|
96 | |
---|
97 | /* |
---|
98 | * How many libio files we want |
---|
99 | */ |
---|
100 | |
---|
101 | #define BSP_LIBIO_MAX_FDS 20 |
---|
102 | |
---|
103 | /* miscellaneous stuff assumed to exist */ |
---|
104 | |
---|
105 | extern rtems_configuration_table BSP_Configuration; |
---|
106 | |
---|
107 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
108 | |
---|
109 | /* functions */ |
---|
110 | |
---|
111 | void bsp_cleanup( void ); |
---|
112 | |
---|
113 | void M360ExecuteRISC( rtems_unsigned16 command ); |
---|
114 | void *M360AllocateBufferDescriptors( int count ); |
---|
115 | void *M360AllocateRiscTimers( int count ); |
---|
116 | extern char M360DefaultWatchdogFeeder; |
---|
117 | |
---|
118 | m68k_isr_entry set_vector( |
---|
119 | rtems_isr_entry handler, |
---|
120 | rtems_vector_number vector, |
---|
121 | int type |
---|
122 | ); |
---|
123 | |
---|
124 | /* |
---|
125 | * Values assigned by link editor |
---|
126 | */ |
---|
127 | extern void *_RomBase, *_RamBase, *_RamSize; |
---|
128 | |
---|
129 | /* |
---|
130 | * Definitions for Atlas Computer Equipment Inc. High Speed Bridge (HSB) |
---|
131 | */ |
---|
132 | #define ATLASHSB_ESR 0x20010000L |
---|
133 | #define ATLASHSB_USICR 0x20010001L |
---|
134 | #define ATLASHSB_DSRR 0x20010002L |
---|
135 | #define ATLASHSB_LED4 0x20010004L |
---|
136 | #define ATLASHSB_ROM_U6 0xFF080000L /* U6 flash ROM socket */ |
---|
137 | |
---|
138 | #ifdef __cplusplus |
---|
139 | } |
---|
140 | #endif |
---|
141 | |
---|
142 | #endif |
---|
143 | /* end of include file */ |
---|