source: rtems/c/src/lib/libbsp/m68k/gen68360/include/bsp.h @ 08311cc3

4.104.114.84.95
Last change on this file since 08311cc3 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

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