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

4.104.114.84.95
Last change on this file since b04a2b3 was c09e836, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 4, 2003 at 6:51:52 PM

2003-09-04 Joel Sherrill <joel@…>

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