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

4.104.114.84.95
Last change on this file since e2d79559 was e2d79559, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 9, 1997 at 2:05:50 PM

Added ka9q tcpip stack and network driver for the gen68360. This effort
was done based on the 3.6.0 release and had to be autoconf'ed locally.
It is turned on is the bsp enables it and it is not explicitly disabled
via the configure option --disable-tcpip. As many warnings as possible
were removed locally after the code was merged. Only the gen68360
and mvme136 bsps were compiled this way.

The ka9q port and network driver were submitted by Eric Norum
(eric@…).

The network demo programs are not included in the tree at this point.

  • Property mode set to 100644
File size: 3.4 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, 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
31extern "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
113extern rtems_configuration_table BSP_Configuration;
114
115extern m68k_isr_entry M68Kvec[];   /* vector table address */
116
117/* functions */
118
119void bsp_cleanup( void );
120
121void M360ExecuteRISC( rtems_unsigned16 command );
122void *M360AllocateBufferDescriptors( int count );
123void *M360AllocateRiscTimers( int count );
124
125m68k_isr_entry set_vector(
126  rtems_isr_entry     handler,
127  rtems_vector_number vector,
128  int                 type
129);
130
131/*
132 * Values assigned by link editor
133 */
134extern void *_RomBase, *_RamBase, *_RamSize;
135extern void *_MC68360HardwareType;
136extern void *_MC68360HardwareTypeMotorolaGeneric;
137extern void *_MC68360HardwareTypeAtlasHSB;
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
148#ifdef __cplusplus
149}
150#endif
151
152#endif
153/* end of include file */
Note: See TracBrowser for help on using the repository browser.