[9e86dd7d] | 1 | /* bsp.h |
---|
| 2 | * |
---|
| 3 | * This include file contains all board IO definitions. |
---|
| 4 | * |
---|
| 5 | * XXX : put yours in here |
---|
| 6 | * |
---|
[08311cc3] | 7 | * COPYRIGHT (c) 1989-1999. |
---|
[9e86dd7d] | 8 | * On-Line Applications Research Corporation (OAR). |
---|
| 9 | * |
---|
[98e4ebf5] | 10 | * The license and distribution terms for this file may be |
---|
| 11 | * found in the file LICENSE in this distribution or at |
---|
[d6284ab] | 12 | * http://www.rtems.com/license/LICENSE. |
---|
[9e86dd7d] | 13 | * |
---|
| 14 | * $Id$ |
---|
| 15 | */ |
---|
| 16 | |
---|
| 17 | #ifndef __GEN68302_BSP_h |
---|
| 18 | #define __GEN68302_BSP_h |
---|
| 19 | |
---|
| 20 | #ifdef __cplusplus |
---|
| 21 | extern "C" { |
---|
| 22 | #endif |
---|
| 23 | |
---|
[ebf3adc] | 24 | #include <bspopts.h> |
---|
| 25 | |
---|
[9e86dd7d] | 26 | #include <rtems.h> |
---|
[3a4ae6c] | 27 | #include <console.h> |
---|
[9e86dd7d] | 28 | #include <iosupp.h> |
---|
[3a4ae6c] | 29 | #include <clockdrv.h> |
---|
[9e86dd7d] | 30 | |
---|
[df49c60] | 31 | /* |
---|
| 32 | * confdefs.h overrides for this BSP: |
---|
| 33 | * - number of termios serial ports (defaults to 1) |
---|
| 34 | * - Interrupt stack space is not minimum if defined. |
---|
| 35 | */ |
---|
| 36 | |
---|
| 37 | /* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */ |
---|
| 38 | #define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024) |
---|
| 39 | |
---|
[9e86dd7d] | 40 | /* |
---|
| 41 | * Define the time limits for RTEMS Test Suite test durations. |
---|
| 42 | * Long test and short test duration limits are provided. These |
---|
| 43 | * values are in seconds and need to be converted to ticks for the |
---|
| 44 | * application. |
---|
| 45 | * |
---|
| 46 | */ |
---|
| 47 | |
---|
| 48 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
| 49 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
| 50 | |
---|
| 51 | /* |
---|
| 52 | * Stuff for Time Test 27 |
---|
| 53 | */ |
---|
| 54 | |
---|
| 55 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
| 56 | |
---|
| 57 | #define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 ) |
---|
| 58 | |
---|
| 59 | #define Cause_tm27_intr() |
---|
| 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 | |
---|
[cf282090] | 70 | #define rtems_bsp_delay( microseconds ) \ |
---|
[9e86dd7d] | 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 | #define RAM_START 0 |
---|
| 84 | #define RAM_END 0x040000 |
---|
| 85 | |
---|
| 86 | /* Structures */ |
---|
| 87 | |
---|
| 88 | #ifdef GEN68302_INIT |
---|
| 89 | #undef EXTERN |
---|
| 90 | #define EXTERN |
---|
| 91 | #else |
---|
| 92 | #undef EXTERN |
---|
| 93 | #define EXTERN extern |
---|
| 94 | #endif |
---|
| 95 | |
---|
[3a4ae6c] | 96 | /* |
---|
| 97 | * Device Driver Table Entries |
---|
| 98 | */ |
---|
| 99 | |
---|
| 100 | /* |
---|
| 101 | * NOTE: Use the standard Console driver entry |
---|
| 102 | */ |
---|
| 103 | |
---|
| 104 | /* |
---|
| 105 | * NOTE: Use the standard Clock driver entry |
---|
| 106 | */ |
---|
| 107 | |
---|
[9e86dd7d] | 108 | /* miscellaneous stuff assumed to exist */ |
---|
| 109 | |
---|
| 110 | extern rtems_configuration_table BSP_Configuration; |
---|
| 111 | |
---|
| 112 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
| 113 | |
---|
| 114 | /* functions */ |
---|
| 115 | |
---|
| 116 | void bsp_cleanup( void ); |
---|
| 117 | |
---|
| 118 | m68k_isr_entry set_vector( |
---|
| 119 | rtems_isr_entry handler, |
---|
| 120 | rtems_vector_number vector, |
---|
| 121 | int type |
---|
| 122 | ); |
---|
| 123 | |
---|
| 124 | #ifdef __cplusplus |
---|
| 125 | } |
---|
| 126 | #endif |
---|
| 127 | |
---|
| 128 | #endif |
---|
| 129 | /* end of include file */ |
---|