[0074691a] | 1 | /* bsp.h |
---|
| 2 | * |
---|
| 3 | * This include file contains all board IO definitions. |
---|
| 4 | * |
---|
| 5 | * XXX : put yours in here |
---|
| 6 | * |
---|
[60b791ad] | 7 | * COPYRIGHT (c) 1989-1998. |
---|
[0074691a] | 8 | * On-Line Applications Research Corporation (OAR). |
---|
| 9 | * Copyright assigned to U.S. Government, 1994. |
---|
| 10 | * |
---|
[98e4ebf5] | 11 | * The license and distribution terms for this file may be |
---|
| 12 | * found in the file LICENSE in this distribution or at |
---|
[0074691a] | 13 | * http://www.OARcorp.com/rtems/license.html. |
---|
| 14 | * |
---|
| 15 | * $Id$ |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | #ifndef __GEN68302_BSP_h |
---|
| 19 | #define __GEN68302_BSP_h |
---|
| 20 | |
---|
| 21 | #ifdef __cplusplus |
---|
| 22 | extern "C" { |
---|
| 23 | #endif |
---|
| 24 | |
---|
| 25 | #include <rtems.h> |
---|
| 26 | #include <console.h> |
---|
| 27 | #include <iosupp.h> |
---|
| 28 | #include <clockdrv.h> |
---|
| 29 | #include <m68302.h> |
---|
| 30 | |
---|
| 31 | #if defined(VARIANT) |
---|
| 32 | |
---|
| 33 | #define __bsp_cat(x, y) x ## y |
---|
| 34 | #define __bsp_xcat(x, y) __bsp_cat(x, y) |
---|
| 35 | #define __bsp_str(s) #s |
---|
| 36 | #define __bsp_xstr(s) __bsp_str(s) |
---|
| 37 | |
---|
| 38 | #define __BSP_HEADER_FILE__ __bsp_xcat(VARIANT, .h) |
---|
| 39 | #define __BSP_HEADER_FILE_STR__ __bsp_xstr(__BSP_HEADER_FILE__) |
---|
| 40 | |
---|
| 41 | #include __BSP_HEADER_FILE_STR__ |
---|
| 42 | #endif |
---|
| 43 | |
---|
| 44 | /* |
---|
| 45 | * Define the time limits for RTEMS Test Suite test durations. |
---|
| 46 | * Long test and short test duration limits are provided. These |
---|
| 47 | * values are in seconds and need to be converted to ticks for the |
---|
| 48 | * application. |
---|
| 49 | * |
---|
| 50 | */ |
---|
| 51 | |
---|
| 52 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
| 53 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
| 54 | |
---|
| 55 | /* |
---|
| 56 | * Stuff for Time Test 27 |
---|
| 57 | */ |
---|
| 58 | |
---|
| 59 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
| 60 | |
---|
| 61 | #define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 ) |
---|
| 62 | |
---|
| 63 | #define Cause_tm27_intr() |
---|
| 64 | |
---|
| 65 | #define Clear_tm27_intr() |
---|
| 66 | |
---|
| 67 | #define Lower_tm27_intr() |
---|
| 68 | |
---|
| 69 | /* |
---|
| 70 | * Simple spin delay in microsecond units for device drivers. |
---|
| 71 | * This is very dependent on the clock speed of the target. |
---|
| 72 | */ |
---|
| 73 | |
---|
| 74 | #define delay( microseconds ) \ |
---|
| 75 | { register rtems_unsigned32 _delay=(microseconds); \ |
---|
| 76 | register rtems_unsigned32 _tmp=123; \ |
---|
| 77 | asm volatile( "0: \ |
---|
| 78 | nbcd %0 ; \ |
---|
| 79 | nbcd %0 ; \ |
---|
| 80 | dbf %1,0b" \ |
---|
| 81 | : "=d" (_tmp), "=d" (_delay) \ |
---|
| 82 | : "0" (_tmp), "1" (_delay) ); \ |
---|
| 83 | } |
---|
| 84 | |
---|
| 85 | /* Constants */ |
---|
| 86 | |
---|
| 87 | #define RAM_START RAM_BASE |
---|
| 88 | #define RAM_END (RAM_BASE + RAM_SIZE) |
---|
| 89 | |
---|
| 90 | /* Structures */ |
---|
| 91 | |
---|
| 92 | #ifdef GEN68302_INIT |
---|
| 93 | #undef EXTERN |
---|
| 94 | #define EXTERN |
---|
| 95 | #else |
---|
| 96 | #undef EXTERN |
---|
| 97 | #define EXTERN extern |
---|
| 98 | #endif |
---|
| 99 | |
---|
| 100 | /* |
---|
| 101 | * Device Driver Table Entries |
---|
| 102 | */ |
---|
| 103 | |
---|
| 104 | /* |
---|
| 105 | * NOTE: Use the standard Console driver entry |
---|
| 106 | */ |
---|
| 107 | |
---|
| 108 | /* |
---|
| 109 | * NOTE: Use the standard Clock driver entry |
---|
| 110 | */ |
---|
| 111 | |
---|
| 112 | /* miscellaneous stuff assumed to exist */ |
---|
| 113 | |
---|
| 114 | extern rtems_configuration_table BSP_Configuration; |
---|
| 115 | |
---|
| 116 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
| 117 | |
---|
| 118 | /* functions */ |
---|
| 119 | |
---|
| 120 | void bsp_cleanup( void ); |
---|
| 121 | |
---|
| 122 | m68k_isr_entry set_vector( |
---|
| 123 | rtems_isr_entry handler, |
---|
| 124 | rtems_vector_number vector, |
---|
| 125 | int type |
---|
| 126 | ); |
---|
| 127 | |
---|
| 128 | #ifdef __cplusplus |
---|
| 129 | } |
---|
| 130 | #endif |
---|
| 131 | |
---|
| 132 | #endif |
---|
| 133 | /* end of include file */ |
---|