[50cf94da] | 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 | #include <rtems.h> |
---|
| 34 | #include <clockdrv.h> |
---|
| 35 | #include <console.h> |
---|
| 36 | |
---|
[4a238002] | 37 | /* EDIT: To activate the sci driver, change the define below */ |
---|
| 38 | #if 1 |
---|
| 39 | #include <sh/null.h> |
---|
| 40 | #define BSP_CONSOLE_DEVNAME "/dev/null" |
---|
| 41 | #define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVNULL_DRIVER_TABLE_ENTRY |
---|
| 42 | #else |
---|
| 43 | #include <sh/sci.h> |
---|
| 44 | #define BSP_CONSOLE_DEVNAME "/dev/sci0" |
---|
| 45 | #define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVSCI_DRIVER_TABLE_ENTRY |
---|
| 46 | #endif |
---|
| 47 | |
---|
| 48 | |
---|
[50cf94da] | 49 | /* |
---|
| 50 | * Define the time limits for RTEMS Test Suite test durations. |
---|
| 51 | * Long test and short test duration limits are provided. These |
---|
| 52 | * values are in seconds and need to be converted to ticks for the |
---|
| 53 | * application. |
---|
| 54 | * |
---|
| 55 | */ |
---|
| 56 | |
---|
| 57 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
| 58 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
| 59 | |
---|
| 60 | /* |
---|
| 61 | * Stuff for Time Test 27 |
---|
| 62 | */ |
---|
| 63 | |
---|
| 64 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
| 65 | |
---|
[21bfd93] | 66 | #define Install_tm27_vector( handler ) \ |
---|
| 67 | { \ |
---|
| 68 | rtems_isr_entry ignored ; \ |
---|
| 69 | rtems_interrupt_catch( (handler), 0, &ignored ) ; \ |
---|
| 70 | } |
---|
[50cf94da] | 71 | |
---|
| 72 | #define Cause_tm27_intr() |
---|
| 73 | |
---|
| 74 | #define Clear_tm27_intr() |
---|
| 75 | |
---|
| 76 | #define Lower_tm27_intr() |
---|
| 77 | |
---|
| 78 | /* Constants */ |
---|
[7046cdd] | 79 | |
---|
| 80 | /* |
---|
| 81 | * Simple spin delay in microsecond units for device drivers. |
---|
| 82 | * This is very dependent on the clock speed of the target. |
---|
| 83 | */ |
---|
| 84 | |
---|
[4a238002] | 85 | #define delay( microseconds ) CPU_delay(microseconds) |
---|
| 86 | #define sh_delay( microseconds ) CPU_delay(microseconds) |
---|
[50cf94da] | 87 | |
---|
| 88 | /* |
---|
| 89 | * Defined in the linker script 'linkcmds' |
---|
| 90 | */ |
---|
| 91 | |
---|
| 92 | extern unsigned32 HeapStart ; |
---|
| 93 | extern unsigned32 HeapEnd ; |
---|
| 94 | extern unsigned32 WorkSpaceStart ; |
---|
| 95 | extern unsigned32 WorkSpaceEnd ; |
---|
| 96 | |
---|
| 97 | extern void *CPU_Interrupt_stack_low ; |
---|
| 98 | extern void *CPU_Interrupt_stack_high ; |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | /* miscellaneous stuff assumed to exist */ |
---|
| 102 | |
---|
| 103 | extern rtems_configuration_table BSP_Configuration; |
---|
| 104 | |
---|
| 105 | extern void bsp_cleanup( void ); |
---|
| 106 | |
---|
| 107 | /* |
---|
| 108 | * Device Driver Table Entries |
---|
| 109 | */ |
---|
| 110 | |
---|
| 111 | /* |
---|
| 112 | * We redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console |
---|
| 113 | */ |
---|
| 114 | #undef CONSOLE_DRIVER_TABLE_ENTRY |
---|
| 115 | #define CONSOLE_DRIVER_TABLE_ENTRY \ |
---|
[4a238002] | 116 | BSP_CONSOLE_DRIVER_TABLE_ENTRY, \ |
---|
[50cf94da] | 117 | { console_initialize, console_open, console_close, \ |
---|
| 118 | console_read, console_write, console_control } |
---|
| 119 | |
---|
| 120 | /* |
---|
| 121 | * NOTE: Use the standard Clock driver entry |
---|
| 122 | */ |
---|
| 123 | |
---|
| 124 | #ifdef __cplusplus |
---|
| 125 | } |
---|
| 126 | #endif |
---|
| 127 | |
---|
| 128 | #endif |
---|
| 129 | /* end of include file */ |
---|