[4a238002] | 1 | /* |
---|
| 2 | * This include file contains all board IO definitions. |
---|
| 3 | * |
---|
| 4 | * generic sh2 |
---|
| 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. |
---|
[0fdc099] | 13 | * |
---|
[4a238002] | 14 | * |
---|
| 15 | * COPYRIGHT (c) 1998. |
---|
| 16 | * On-Line Applications Research Corporation (OAR). |
---|
| 17 | * |
---|
| 18 | * The license and distribution terms for this file may be |
---|
| 19 | * found in the file LICENSE in this distribution or at |
---|
[5e1b695] | 20 | * http://www.rtems.com/license/LICENSE. |
---|
[4a238002] | 21 | * |
---|
| 22 | * Minor adaptations for sh2 by: |
---|
| 23 | * John M. Mills (jmills@tga.com) |
---|
| 24 | * TGA Technologies, Inc. |
---|
| 25 | * 100 Pinnacle Way, Suite 140 |
---|
| 26 | * Norcross, GA 30071 U.S.A. |
---|
| 27 | * |
---|
| 28 | * This modified file may be copied and distributed in accordance |
---|
| 29 | * the above-referenced license. It is provided for critique and |
---|
| 30 | * developmental purposes without any warranty nor representation |
---|
| 31 | * by the authors or by TGA Technologies. |
---|
| 32 | * |
---|
| 33 | * $Id$ |
---|
| 34 | */ |
---|
| 35 | |
---|
[34c4852] | 36 | #ifndef _BSP_H |
---|
| 37 | #define _BSP_H |
---|
[4a238002] | 38 | |
---|
| 39 | #ifdef __cplusplus |
---|
| 40 | extern "C" { |
---|
| 41 | #endif |
---|
| 42 | |
---|
| 43 | #include <rtems.h> |
---|
[2d39080c] | 44 | #include <rtems/clockdrv.h> |
---|
| 45 | #include <rtems/console.h> |
---|
[4a238002] | 46 | |
---|
[5dbd4fe] | 47 | #include <bspopts.h> |
---|
| 48 | |
---|
[4a238002] | 49 | #if 0 |
---|
[96b2583] | 50 | #include <rtems/devnull.h> |
---|
[4a238002] | 51 | #define BSP_CONSOLE_DEVNAME "/dev/null" |
---|
| 52 | #define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVNULL_DRIVER_TABLE_ENTRY |
---|
| 53 | #else |
---|
| 54 | #include <sh/sci.h> |
---|
[ede9699c] | 55 | /* FIXME: |
---|
| 56 | * These definitions will be no longer necessary if the old |
---|
| 57 | * implementation of SCI driver will be droped |
---|
| 58 | */ |
---|
[9f87484] | 59 | #define BSP_CONSOLE_DEVNAME "/dev/sci0" |
---|
[ede9699c] | 60 | #define BSP_CONSOLE_MINOR_NUMBER ((rtems_device_minor_number) 0) |
---|
[4a238002] | 61 | #define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVSCI_DRIVER_TABLE_ENTRY |
---|
[ede9699c] | 62 | #define BSP_CONSOLE_DEVICE_TERMIOS_HANDLERS (sh_sci_get_termios_handlers(TRUE)) |
---|
[4a238002] | 63 | #endif |
---|
| 64 | |
---|
| 65 | /* Constants */ |
---|
| 66 | |
---|
| 67 | /* |
---|
| 68 | * Simple spin delay in microsecond units for device drivers. |
---|
| 69 | * This is very dependent on the clock speed of the target. |
---|
| 70 | */ |
---|
| 71 | |
---|
[cf282090] | 72 | #define rtems_bsp_delay( microseconds ) CPU_delay(microseconds) |
---|
[4a238002] | 73 | #define sh_delay( microseconds ) CPU_delay( microseconds ) |
---|
| 74 | |
---|
| 75 | /* |
---|
| 76 | * Defined in the linker script 'linkcmds' |
---|
| 77 | */ |
---|
| 78 | |
---|
[8cf4fac5] | 79 | extern uint32_t HeapStart ; |
---|
| 80 | extern uint32_t HeapEnd ; |
---|
| 81 | extern uint32_t WorkSpaceStart ; |
---|
| 82 | extern uint32_t WorkSpaceEnd ; |
---|
[4a238002] | 83 | |
---|
| 84 | extern void *CPU_Interrupt_stack_low ; |
---|
| 85 | extern void *CPU_Interrupt_stack_high ; |
---|
| 86 | |
---|
| 87 | /* |
---|
| 88 | * Device Driver Table Entries |
---|
| 89 | */ |
---|
| 90 | |
---|
| 91 | /* |
---|
| 92 | * We redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console |
---|
[ede9699c] | 93 | * |
---|
| 94 | * FIXME: Since console driver works properly this is not |
---|
| 95 | * necessary. When enabled - causes error in console_initialize. |
---|
[4a238002] | 96 | */ |
---|
[ede9699c] | 97 | #if 0 |
---|
[4a238002] | 98 | #undef CONSOLE_DRIVER_TABLE_ENTRY |
---|
| 99 | #define CONSOLE_DRIVER_TABLE_ENTRY \ |
---|
| 100 | BSP_CONSOLE_DRIVER_TABLE_ENTRY, \ |
---|
| 101 | { console_initialize, console_open, console_close, \ |
---|
| 102 | console_read, console_write, console_control } |
---|
[ede9699c] | 103 | #endif |
---|
| 104 | |
---|
[4a238002] | 105 | /* |
---|
| 106 | * NOTE: Use the standard Clock driver entry |
---|
| 107 | */ |
---|
| 108 | |
---|
| 109 | #ifdef __cplusplus |
---|
| 110 | } |
---|
| 111 | #endif |
---|
| 112 | |
---|
| 113 | #endif |
---|