[cd67dca] | 1 | /* |
---|
| 2 | * This include file contains all board IO definitions. |
---|
| 3 | * |
---|
| 4 | * sh4 simulator bsp |
---|
| 5 | * |
---|
| 6 | * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia |
---|
| 7 | * Author: Victor V. Vengerov <vvv@oktet.ru> |
---|
| 8 | * Alexandra Kossovsky <sasha@oktet.ru> |
---|
| 9 | * |
---|
| 10 | * Based on work: |
---|
| 11 | * Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
| 12 | * |
---|
| 13 | * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany |
---|
| 14 | * |
---|
| 15 | * This program is distributed in the hope that it will be useful, |
---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
[0fdc099] | 18 | * |
---|
[cd67dca] | 19 | * |
---|
| 20 | * COPYRIGHT (c) 1998-2001. |
---|
| 21 | * On-Line Applications Research Corporation (OAR). |
---|
| 22 | * |
---|
| 23 | * The license and distribution terms for this file may be |
---|
| 24 | * found in the file LICENSE in this distribution or at |
---|
[b5bc659] | 25 | * http://www.rtems.com/license/LICENSE. |
---|
[cd67dca] | 26 | * |
---|
| 27 | * Minor adaptations for sh2 by: |
---|
| 28 | * John M. Mills (jmills@tga.com) |
---|
| 29 | * TGA Technologies, Inc. |
---|
| 30 | * 100 Pinnacle Way, Suite 140 |
---|
| 31 | * Norcross, GA 30071 U.S.A. |
---|
| 32 | * |
---|
| 33 | * This modified file may be copied and distributed in accordance |
---|
| 34 | * the above-referenced license. It is provided for critique and |
---|
| 35 | * developmental purposes without any warranty nor representation |
---|
| 36 | * by the authors or by TGA Technologies. |
---|
| 37 | * |
---|
| 38 | * $Id$ |
---|
| 39 | */ |
---|
| 40 | |
---|
[34c4852] | 41 | #ifndef _BSP_H |
---|
| 42 | #define _BSP_H |
---|
[cd67dca] | 43 | |
---|
| 44 | #ifdef __cplusplus |
---|
| 45 | extern "C" { |
---|
| 46 | #endif |
---|
| 47 | |
---|
| 48 | #include <rtems.h> |
---|
[2d39080c] | 49 | #include <rtems/clockdrv.h> |
---|
| 50 | #include <rtems/console.h> |
---|
[cd67dca] | 51 | #include <ramdisk.h> |
---|
| 52 | |
---|
[19b704cd] | 53 | #include <bspopts.h> |
---|
| 54 | |
---|
[cd67dca] | 55 | /* |
---|
| 56 | * confdefs.h overrides for this BSP: |
---|
| 57 | * - number of termios serial ports (defaults to 1) |
---|
| 58 | * - Interrupt stack space is not minimum if defined. |
---|
| 59 | */ |
---|
| 60 | |
---|
| 61 | #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1 |
---|
| 62 | |
---|
| 63 | /* !!! Should be defined in accordance to simulator considerations.*/ |
---|
| 64 | #define CLOCK_VECTOR 32 |
---|
| 65 | |
---|
| 66 | /* Constants */ |
---|
| 67 | |
---|
| 68 | /* |
---|
| 69 | * Simple spin delay in microsecond units for device drivers. |
---|
| 70 | * This is very dependent on the clock speed of the target. |
---|
| 71 | */ |
---|
| 72 | |
---|
| 73 | #define delay( microseconds ) CPU_delay(microseconds) |
---|
| 74 | #define sh_delay( microseconds ) CPU_delay( microseconds ) |
---|
| 75 | |
---|
| 76 | /* |
---|
| 77 | * Defined in the linker script 'linkcmds' |
---|
| 78 | */ |
---|
| 79 | |
---|
[c939d5e] | 80 | extern uint32_t HeapStart ; |
---|
| 81 | extern uint32_t HeapEnd ; |
---|
| 82 | extern uint32_t WorkSpaceStart ; |
---|
| 83 | extern uint32_t WorkSpaceEnd ; |
---|
[cd67dca] | 84 | |
---|
| 85 | extern void *CPU_Interrupt_stack_low ; |
---|
| 86 | extern void *CPU_Interrupt_stack_high ; |
---|
| 87 | |
---|
| 88 | /* |
---|
| 89 | * Device Driver Table Entries |
---|
| 90 | */ |
---|
| 91 | |
---|
| 92 | #undef CONSOLE_DRIVER_TABLE_ENTRY |
---|
| 93 | #define CONSOLE_DRIVER_TABLE_ENTRY \ |
---|
| 94 | { console_initialize, console_open, console_close, \ |
---|
| 95 | console_read, console_write, console_control } |
---|
| 96 | |
---|
| 97 | #define RAMDISK_DRIVER_TABLE_ENTRY \ |
---|
| 98 | { ramdisk_initialize, ramdisk_open, ramdisk_close, \ |
---|
| 99 | ramdisk_read, ramdisk_write, ramdisk_control } |
---|
[0fdc099] | 100 | |
---|
[cd67dca] | 101 | /* |
---|
| 102 | * NOTE: Use the standard Clock driver entry |
---|
| 103 | */ |
---|
| 104 | |
---|
| 105 | /* |
---|
| 106 | * Trap interface with simulator |
---|
| 107 | */ |
---|
| 108 | int __trap34(); |
---|
| 109 | |
---|
| 110 | #ifdef __cplusplus |
---|
| 111 | } |
---|
| 112 | #endif |
---|
| 113 | |
---|
| 114 | #endif |
---|