1 | /* |
---|
2 | * This include file contains all board IO definitions. |
---|
3 | * |
---|
4 | * generic sh1 |
---|
5 | * |
---|
6 | * Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
7 | * |
---|
8 | * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany |
---|
9 | * |
---|
10 | * This program is distributed in the hope that it will be useful, |
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
13 | * |
---|
14 | * |
---|
15 | * COPYRIGHT (c) 1998. |
---|
16 | * On-Line Applications Research Corporation (OAR). |
---|
17 | * Copyright assigned to U.S. Government, 1994. |
---|
18 | * |
---|
19 | * The license and distribution terms for this file may be |
---|
20 | * found in the file LICENSE in this distribution or at |
---|
21 | * http://www.OARcorp.com/rtems/license.html. |
---|
22 | * |
---|
23 | * $Id$ |
---|
24 | */ |
---|
25 | |
---|
26 | #ifndef __gensh1_h |
---|
27 | #define __gensh1_h |
---|
28 | |
---|
29 | #ifdef __cplusplus |
---|
30 | extern "C" { |
---|
31 | #endif |
---|
32 | |
---|
33 | #define CPU_CONSOLE_DEVNAME "/dev/null" |
---|
34 | |
---|
35 | |
---|
36 | #include <rtems.h> |
---|
37 | #include <clockdrv.h> |
---|
38 | #include <sh/null.h> |
---|
39 | #include <console.h> |
---|
40 | |
---|
41 | /* |
---|
42 | * Define the time limits for RTEMS Test Suite test durations. |
---|
43 | * Long test and short test duration limits are provided. These |
---|
44 | * values are in seconds and need to be converted to ticks for the |
---|
45 | * application. |
---|
46 | * |
---|
47 | */ |
---|
48 | |
---|
49 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
50 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
51 | |
---|
52 | /* |
---|
53 | * Stuff for Time Test 27 |
---|
54 | */ |
---|
55 | |
---|
56 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
57 | |
---|
58 | #define Install_tm27_vector( handler ) \ |
---|
59 | { \ |
---|
60 | rtems_isr_entry ignored ; \ |
---|
61 | rtems_interrupt_catch( (handler), 0, &ignored ) ; \ |
---|
62 | } |
---|
63 | |
---|
64 | #define Cause_tm27_intr() |
---|
65 | |
---|
66 | #define Clear_tm27_intr() |
---|
67 | |
---|
68 | #define Lower_tm27_intr() |
---|
69 | |
---|
70 | /* Constants */ |
---|
71 | |
---|
72 | #define MHZ 20 |
---|
73 | |
---|
74 | /* |
---|
75 | * Defined in the linker script 'linkcmds' |
---|
76 | */ |
---|
77 | |
---|
78 | extern unsigned32 HeapStart ; |
---|
79 | extern unsigned32 HeapEnd ; |
---|
80 | extern unsigned32 WorkSpaceStart ; |
---|
81 | extern unsigned32 WorkSpaceEnd ; |
---|
82 | |
---|
83 | extern void *CPU_Interrupt_stack_low ; |
---|
84 | extern void *CPU_Interrupt_stack_high ; |
---|
85 | |
---|
86 | |
---|
87 | /* miscellaneous stuff assumed to exist */ |
---|
88 | |
---|
89 | extern rtems_configuration_table BSP_Configuration; |
---|
90 | |
---|
91 | extern void bsp_cleanup( void ); |
---|
92 | |
---|
93 | /* |
---|
94 | * Device Driver Table Entries |
---|
95 | */ |
---|
96 | |
---|
97 | /* |
---|
98 | * We redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console |
---|
99 | */ |
---|
100 | #if defined(CONSOLE_DRIVER_TABLE_ENTRY) |
---|
101 | #warning Overwriting CONSOLE_DRIVER_TABLE_ENTRY |
---|
102 | #undef CONSOLE_DRIVER_TABLE_ENTRY |
---|
103 | #endif |
---|
104 | |
---|
105 | #define CONSOLE_DRIVER_TABLE_ENTRY \ |
---|
106 | DEVNULL_DRIVER_TABLE_ENTRY, \ |
---|
107 | { console_initialize, console_open, console_close, \ |
---|
108 | console_read, console_write, console_control } |
---|
109 | |
---|
110 | /* |
---|
111 | * NOTE: Use the standard Clock driver entry |
---|
112 | */ |
---|
113 | |
---|
114 | /* |
---|
115 | * FIXME: Should this go to libcpu/sh/sh7032 ? |
---|
116 | */ |
---|
117 | #if 0 |
---|
118 | /* functions */ |
---|
119 | sh_isr_entry set_vector( /* returns old vector */ |
---|
120 | rtems_isr_entry handler, /* isr routine */ |
---|
121 | rtems_vector_number vector, /* vector number */ |
---|
122 | int type /* RTEMS or RAW intr */ |
---|
123 | ); |
---|
124 | #endif |
---|
125 | |
---|
126 | #ifdef __cplusplus |
---|
127 | } |
---|
128 | #endif |
---|
129 | |
---|
130 | #endif |
---|
131 | /* end of include file */ |
---|