source: rtems/c/src/lib/libbsp/m68k/mvme136/include/bsp.h @ e35761b

4.104.114.84.95
Last change on this file since e35761b was e35761b, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/22/04 at 15:25:55

2004-04-22 Ralf Corsepius <ralf_corsepius@…>

  • include/bsp.h: Split out tmtest27 support.
  • include/tm27.h: New.
  • Property mode set to 100644
File size: 3.8 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all MVME136 board IO definitions.
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#ifndef __MVME136_h
16#define __MVME136_h
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include <bspopts.h>
23
24#include <rtems.h>
25#include <rtems/clockdrv.h>
26#include <rtems/console.h>
27#include <rtems/iosupp.h>
28
29/*
30 *  confdefs.h overrides for this BSP:
31 *   - number of termios serial ports (defaults to 1)
32 *   - Interrupt stack space is not minimum if defined.
33 */
34
35/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
36#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
37
38/*
39 *  Simple spin delay in microsecond units for device drivers.
40 *  This is very dependent on the clock speed of the target.
41 */
42
43#define rtems_bsp_delay( microseconds ) \
44  { register uint32_t         _delay=(microseconds); \
45    register uint32_t         _tmp=123; \
46    asm volatile( "0: \
47                     nbcd      %0 ; \
48                     nbcd      %0 ; \
49                     dbf       %1,0b" \
50                  : "=d" (_tmp), "=d" (_delay) \
51                  : "0"  (_tmp), "1"  (_delay) ); \
52  }
53
54/* Constants */
55
56#define RAM_START 0
57#define RAM_END   0x100000
58
59#define M681ADDR      0xfffb0040         /* address of the M68681 chip */
60#define RXRDYB        0x01               /* status reg recv ready mask */
61#define TXRDYB        0x04               /* status reg trans ready mask */
62#define PARITYERR     0x20               /* status reg parity error mask */
63#define FRAMEERR      0x40               /* status reg frame error mask */
64
65#define FOREVER       1                  /* infinite loop */
66
67/* Structures */
68
69struct r_m681_info {
70  char fill1[ 5 ];                       /* channel A regs ( not used ) */
71  char isr;                              /* interrupt status reg */
72  char fill2[ 2 ];                       /* counter regs (not used) */
73  char mr1mr2b;                          /* MR1B and MR2B regs */
74  char srb;                              /* status reg channel B */
75  char fill3;                            /* do not access */
76  char rbb;                              /* receive buffer channel B */
77  char ivr;                              /* interrupt vector register */
78};
79
80struct w_m681_info {
81  char fill1[ 4 ];                       /* channel A regs (not used) */
82  char acr;                              /* auxillary control reg */
83  char imr;                              /* interrupt mask reg */
84  char fill2[ 2 ];                       /* counter regs (not used) */
85  char mr1mr2b;                          /* MR1B and MR2B regs */
86  char csrb;                             /* clock select reg */
87  char crb;                              /* command reg */
88  char tbb;                              /* transmit buffer channel B */
89  char ivr;                              /* interrupt vector register */
90};
91
92#ifdef M136_INIT
93#undef EXTERN
94#define EXTERN
95#else
96#undef EXTERN
97#define EXTERN extern
98#endif
99
100/* miscellaneous stuff assumed to exist */
101
102extern rtems_configuration_table BSP_Configuration;
103
104/* M68681 DUART chip register variables */
105
106EXTERN volatile struct r_m681_info *_Read_m681;  /* M68681 read registers */
107EXTERN volatile struct w_m681_info *_Write_m681; /* M68681 write registers */
108
109extern m68k_isr_entry M68Kvec[];   /* vector table address */
110
111/*
112 *  Device Driver Table Entries
113 */
114
115/*
116 * NOTE: Use the standard Console driver entry
117 */
118
119/*
120 * NOTE: Use the standard Clock driver entry
121 */
122
123/* functions */
124
125void bsp_cleanup( void );
126
127m68k_isr_entry set_vector(
128  rtems_isr_entry     handler,
129  rtems_vector_number vector,
130  int                 type
131);
132
133#ifdef __cplusplus
134}
135#endif
136
137#endif
138/* end of include file */
Note: See TracBrowser for help on using the repository browser.