[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 | * |
---|
[08311cc3] | 18 | * COPYRIGHT (c) 1989-1999. |
---|
[457b6ae] | 19 | * On-Line Applications Research Corporation (OAR). |
---|
| 20 | * |
---|
[98e4ebf5] | 21 | * The license and distribution terms for this file may be |
---|
| 22 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 23 | * http://www.OARcorp.com/rtems/license.html. |
---|
[457b6ae] | 24 | */ |
---|
| 25 | |
---|
| 26 | #ifndef __GEN68360_BSP_h |
---|
| 27 | #define __GEN68360_BSP_h |
---|
| 28 | |
---|
| 29 | #ifdef __cplusplus |
---|
| 30 | extern "C" { |
---|
| 31 | #endif |
---|
| 32 | |
---|
| 33 | #include <rtems.h> |
---|
| 34 | #include <console.h> |
---|
| 35 | #include <iosupp.h> |
---|
| 36 | #include <clockdrv.h> |
---|
| 37 | |
---|
[df49c60] | 38 | /* |
---|
| 39 | * confdefs.h overrides for this BSP: |
---|
| 40 | * - termios serial ports (defaults to 1) |
---|
| 41 | * - Interrupt stack space is not minimum if defined. |
---|
| 42 | */ |
---|
| 43 | |
---|
| 44 | /* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */ |
---|
| 45 | #define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024) |
---|
| 46 | |
---|
[28e7d7fa] | 47 | /* |
---|
| 48 | * Network driver configuration |
---|
| 49 | */ |
---|
| 50 | struct rtems_bsdnet_ifconfig; |
---|
| 51 | extern int rtems_scc1_driver_attach (struct rtems_bsdnet_ifconfig *config); |
---|
| 52 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "scc1" |
---|
| 53 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_scc1_driver_attach |
---|
| 54 | |
---|
[457b6ae] | 55 | /* |
---|
| 56 | * Define the time limits for RTEMS Test Suite test durations. |
---|
| 57 | * Long test and short test duration limits are provided. These |
---|
| 58 | * values are in seconds and need to be converted to ticks for the |
---|
| 59 | * application. |
---|
| 60 | * |
---|
| 61 | */ |
---|
| 62 | |
---|
| 63 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
| 64 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
| 65 | |
---|
| 66 | /* |
---|
| 67 | * Stuff for Time Test 27 |
---|
| 68 | * Don't bother with hardware -- just use a software-interrupt |
---|
| 69 | */ |
---|
| 70 | |
---|
| 71 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
| 72 | |
---|
| 73 | #define Install_tm27_vector( handler ) set_vector( (handler), 34, 1 ) |
---|
| 74 | |
---|
| 75 | #define Cause_tm27_intr() asm volatile ("trap #2"); |
---|
| 76 | |
---|
| 77 | #define Clear_tm27_intr() |
---|
| 78 | |
---|
| 79 | #define Lower_tm27_intr() |
---|
| 80 | |
---|
| 81 | /* |
---|
| 82 | * Simple spin delay in microsecond units for device drivers. |
---|
| 83 | * This is very dependent on the clock speed of the target. |
---|
| 84 | */ |
---|
| 85 | |
---|
| 86 | #define delay( microseconds ) \ |
---|
| 87 | { register rtems_unsigned32 _delay=(microseconds); \ |
---|
| 88 | register rtems_unsigned32 _tmp=123; \ |
---|
| 89 | asm volatile( "0: \ |
---|
| 90 | nbcd %0 ; \ |
---|
| 91 | nbcd %0 ; \ |
---|
| 92 | dbf %1,0b" \ |
---|
| 93 | : "=d" (_tmp), "=d" (_delay) \ |
---|
| 94 | : "0" (_tmp), "1" (_delay) ); \ |
---|
| 95 | } |
---|
| 96 | |
---|
| 97 | /* Constants */ |
---|
| 98 | |
---|
| 99 | /* Structures */ |
---|
| 100 | |
---|
| 101 | /* |
---|
| 102 | * Device Driver Table Entries |
---|
| 103 | */ |
---|
| 104 | |
---|
| 105 | /* |
---|
| 106 | * NOTE: Use the standard Console driver entry |
---|
| 107 | */ |
---|
| 108 | |
---|
| 109 | /* |
---|
| 110 | * NOTE: Use the standard Clock driver entry |
---|
| 111 | */ |
---|
| 112 | |
---|
| 113 | /* miscellaneous stuff assumed to exist */ |
---|
| 114 | |
---|
| 115 | extern rtems_configuration_table BSP_Configuration; |
---|
| 116 | |
---|
| 117 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
| 118 | |
---|
| 119 | /* functions */ |
---|
| 120 | |
---|
| 121 | void bsp_cleanup( void ); |
---|
| 122 | |
---|
[996a9cb4] | 123 | void M360ExecuteRISC( rtems_unsigned16 command ); |
---|
[e2d79559] | 124 | void *M360AllocateBufferDescriptors( int count ); |
---|
| 125 | void *M360AllocateRiscTimers( int count ); |
---|
[6b4ca31] | 126 | extern char M360DefaultWatchdogFeeder; |
---|
[996a9cb4] | 127 | |
---|
[457b6ae] | 128 | m68k_isr_entry set_vector( |
---|
| 129 | rtems_isr_entry handler, |
---|
| 130 | rtems_vector_number vector, |
---|
| 131 | int type |
---|
| 132 | ); |
---|
| 133 | |
---|
[e2d79559] | 134 | /* |
---|
| 135 | * Values assigned by link editor |
---|
| 136 | */ |
---|
[98bcbda3] | 137 | extern void *_RomBase, *_RamBase; |
---|
[e2d79559] | 138 | |
---|
| 139 | /* |
---|
| 140 | * Definitions for Atlas Computer Equipment Inc. High Speed Bridge (HSB) |
---|
| 141 | */ |
---|
| 142 | #define ATLASHSB_ESR 0x20010000L |
---|
| 143 | #define ATLASHSB_USICR 0x20010001L |
---|
| 144 | #define ATLASHSB_DSRR 0x20010002L |
---|
| 145 | #define ATLASHSB_LED4 0x20010004L |
---|
| 146 | #define ATLASHSB_ROM_U6 0xFF080000L /* U6 flash ROM socket */ |
---|
| 147 | |
---|
[457b6ae] | 148 | #ifdef __cplusplus |
---|
| 149 | } |
---|
| 150 | #endif |
---|
| 151 | |
---|
| 152 | #endif |
---|
| 153 | /* end of include file */ |
---|