[457b6ae] | 1 | /* |
---|
| 2 | * Board Support Package for `Generic' Motorola MC68360 |
---|
| 3 | * |
---|
| 4 | * Based on the `gen68302' board support package, and covered by the |
---|
| 5 | * original distribution terms. |
---|
| 6 | * |
---|
| 7 | * W. Eric Norum |
---|
| 8 | * Saskatchewan Accelerator Laboratory |
---|
| 9 | * University of Saskatchewan |
---|
| 10 | * Saskatoon, Saskatchewan, CANADA |
---|
| 11 | * eric@skatter.usask.ca |
---|
| 12 | * |
---|
| 13 | * $Id$ |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | /* bsp.h |
---|
| 17 | * |
---|
| 18 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
| 19 | * On-Line Applications Research Corporation (OAR). |
---|
| 20 | * All rights assigned to U.S. Government, 1994. |
---|
| 21 | * |
---|
| 22 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
| 23 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
| 24 | * notice must appear in all copies of this file and its derivatives. |
---|
| 25 | */ |
---|
| 26 | |
---|
| 27 | #ifndef __GEN68360_BSP_h |
---|
| 28 | #define __GEN68360_BSP_h |
---|
| 29 | |
---|
| 30 | #ifdef __cplusplus |
---|
| 31 | extern "C" { |
---|
| 32 | #endif |
---|
| 33 | |
---|
| 34 | #include <rtems.h> |
---|
| 35 | #include <console.h> |
---|
| 36 | #include <iosupp.h> |
---|
| 37 | #include <clockdrv.h> |
---|
| 38 | |
---|
| 39 | /* |
---|
| 40 | * Define the time limits for RTEMS Test Suite test durations. |
---|
| 41 | * Long test and short test duration limits are provided. These |
---|
| 42 | * values are in seconds and need to be converted to ticks for the |
---|
| 43 | * application. |
---|
| 44 | * |
---|
| 45 | */ |
---|
| 46 | |
---|
| 47 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
| 48 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
| 49 | |
---|
| 50 | /* |
---|
| 51 | * Stuff for Time Test 27 |
---|
| 52 | * Don't bother with hardware -- just use a software-interrupt |
---|
| 53 | */ |
---|
| 54 | |
---|
| 55 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
| 56 | |
---|
| 57 | #define Install_tm27_vector( handler ) set_vector( (handler), 34, 1 ) |
---|
| 58 | |
---|
| 59 | #define Cause_tm27_intr() asm volatile ("trap #2"); |
---|
| 60 | |
---|
| 61 | #define Clear_tm27_intr() |
---|
| 62 | |
---|
| 63 | #define Lower_tm27_intr() |
---|
| 64 | |
---|
| 65 | /* |
---|
| 66 | * Simple spin delay in microsecond units for device drivers. |
---|
| 67 | * This is very dependent on the clock speed of the target. |
---|
| 68 | */ |
---|
| 69 | |
---|
| 70 | #define delay( microseconds ) \ |
---|
| 71 | { register rtems_unsigned32 _delay=(microseconds); \ |
---|
| 72 | register rtems_unsigned32 _tmp=123; \ |
---|
| 73 | asm volatile( "0: \ |
---|
| 74 | nbcd %0 ; \ |
---|
| 75 | nbcd %0 ; \ |
---|
| 76 | dbf %1,0b" \ |
---|
| 77 | : "=d" (_tmp), "=d" (_delay) \ |
---|
| 78 | : "0" (_tmp), "1" (_delay) ); \ |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | /* Constants */ |
---|
| 82 | |
---|
| 83 | /* Structures */ |
---|
| 84 | |
---|
| 85 | #ifdef GEN68360_INIT |
---|
| 86 | #undef EXTERN |
---|
| 87 | #define EXTERN |
---|
| 88 | #else |
---|
| 89 | #undef EXTERN |
---|
| 90 | #define EXTERN extern |
---|
| 91 | #endif |
---|
| 92 | |
---|
| 93 | /* |
---|
| 94 | * Device Driver Table Entries |
---|
| 95 | */ |
---|
| 96 | |
---|
| 97 | /* |
---|
| 98 | * NOTE: Use the standard Console driver entry |
---|
| 99 | */ |
---|
| 100 | |
---|
| 101 | /* |
---|
| 102 | * NOTE: Use the standard Clock driver entry |
---|
| 103 | */ |
---|
| 104 | |
---|
| 105 | /* |
---|
| 106 | * How many libio files we want |
---|
| 107 | */ |
---|
| 108 | |
---|
| 109 | #define BSP_LIBIO_MAX_FDS 20 |
---|
| 110 | |
---|
| 111 | /* miscellaneous stuff assumed to exist */ |
---|
| 112 | |
---|
| 113 | extern rtems_configuration_table BSP_Configuration; |
---|
| 114 | |
---|
| 115 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
| 116 | |
---|
| 117 | /* functions */ |
---|
| 118 | |
---|
| 119 | void bsp_cleanup( void ); |
---|
| 120 | |
---|
| 121 | m68k_isr_entry set_vector( |
---|
| 122 | rtems_isr_entry handler, |
---|
| 123 | rtems_vector_number vector, |
---|
| 124 | int type |
---|
| 125 | ); |
---|
| 126 | |
---|
| 127 | #ifdef __cplusplus |
---|
| 128 | } |
---|
| 129 | #endif |
---|
| 130 | |
---|
| 131 | #endif |
---|
| 132 | /* end of include file */ |
---|