[b812f84] | 1 | /* bsp.h |
---|
| 2 | * |
---|
| 3 | * This include file contains some definitions specific to the |
---|
| 4 | * BSVC simulator BSP. |
---|
| 5 | * |
---|
| 6 | * COPYRIGHT (c) 1989-2000. |
---|
| 7 | * On-Line Applications Research Corporation (OAR). |
---|
| 8 | * |
---|
| 9 | * The license and distribution terms for this file may be |
---|
| 10 | * found in the file LICENSE in this distribution or at |
---|
[1626fcc] | 11 | * http://www.rtems.com/license/LICENSE. |
---|
[b812f84] | 12 | * |
---|
| 13 | * $Id$ |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | #ifndef __BSVC_SIM |
---|
| 17 | #define __BSVC_SIM |
---|
| 18 | |
---|
| 19 | #ifdef __cplusplus |
---|
| 20 | extern "C" { |
---|
| 21 | #endif |
---|
| 22 | |
---|
[4906d72f] | 23 | #include <bspopts.h> |
---|
| 24 | |
---|
[b812f84] | 25 | #include <rtems.h> |
---|
[fb7a141] | 26 | #include <rtems/iosupp.h> |
---|
| 27 | #include <rtems/console.h> |
---|
| 28 | #include <rtems/clockdrv.h> |
---|
[b812f84] | 29 | |
---|
| 30 | /* |
---|
| 31 | * Define some hardware constants here |
---|
| 32 | */ |
---|
| 33 | |
---|
| 34 | /* |
---|
| 35 | * Define the interrupt mechanism for Time Test 27 |
---|
| 36 | * |
---|
| 37 | * NOTE: Following are not defined for the BSVC Simulator YET. |
---|
| 38 | * |
---|
| 39 | */ |
---|
| 40 | |
---|
| 41 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
| 42 | |
---|
| 43 | #define Install_tm27_vector( handler ) /* set_vector( (handler), 6, 1 ) */ |
---|
| 44 | |
---|
[6128a4a] | 45 | #define Cause_tm27_intr() |
---|
[b812f84] | 46 | |
---|
[6128a4a] | 47 | #define Clear_tm27_intr() |
---|
[b812f84] | 48 | |
---|
| 49 | #define Lower_tm27_intr() |
---|
| 50 | |
---|
| 51 | /* |
---|
| 52 | * Simple spin delay in microsecond units for device drivers. |
---|
| 53 | * This is very dependent on the clock speed of the target. |
---|
| 54 | */ |
---|
| 55 | |
---|
[cf282090] | 56 | #define rtems_bsp_delay( microseconds ) \ |
---|
[f3e486aa] | 57 | { register uint32_t _delay=(microseconds); \ |
---|
| 58 | register uint32_t _tmp = 0; /* initialized to avoid warning */ \ |
---|
[b812f84] | 59 | asm volatile( "0: \ |
---|
| 60 | remo 3,31,%0 ; \ |
---|
| 61 | cmpo 0,%0 ; \ |
---|
| 62 | subo 1,%1,%1 ; \ |
---|
| 63 | cmpobne.t 0,%1,0b " \ |
---|
| 64 | : "=d" (_tmp), "=d" (_delay) \ |
---|
| 65 | : "0" (_tmp), "1" (_delay) ); \ |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | /* Constants */ |
---|
| 69 | |
---|
| 70 | /* miscellaneous stuff assumed to exist */ |
---|
| 71 | |
---|
| 72 | extern rtems_configuration_table BSP_Configuration; |
---|
| 73 | |
---|
| 74 | /* |
---|
| 75 | * Device Driver Table Entries |
---|
| 76 | */ |
---|
| 77 | |
---|
| 78 | /* |
---|
| 79 | * NOTE: Use the standard Console driver entry |
---|
| 80 | */ |
---|
[6128a4a] | 81 | |
---|
[b812f84] | 82 | /* |
---|
| 83 | * NOTE: Use the standard Clock driver entry |
---|
| 84 | */ |
---|
| 85 | |
---|
| 86 | /* functions */ |
---|
| 87 | |
---|
| 88 | void bsp_cleanup( void ); |
---|
| 89 | |
---|
| 90 | m68k_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int ); |
---|
| 91 | |
---|
| 92 | #ifdef __cplusplus |
---|
| 93 | } |
---|
| 94 | #endif |
---|
| 95 | |
---|
| 96 | #endif |
---|
| 97 | /* end of include file */ |
---|