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

4.115
Last change on this file since a052181 was a052181, checked in by Sebastian Huber <sebastian.huber@…>, on 11/14/12 at 08:59:10

score: Add RTEMS_FATAL_SOURCE_EXIT

Include <bsp/default-initial-extension.h> in all BSPs. Call
rtems_fatal() with RTEMS_FATAL_SOURCE_EXIT as source and the exit()
status code as fatal code in every bsp_cleanup(). Move previous
bsp_cleanup() code into bsp_fatal_extension().

  • Property mode set to 100644
File size: 3.0 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
13#ifndef _BSP_H
14#define _BSP_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#include <bspopts.h>
21#include <bsp/default-initial-extension.h>
22
23#include <rtems.h>
24#include <rtems/clockdrv.h>
25#include <rtems/console.h>
26#include <rtems/iosupp.h>
27
28/*
29 *  Simple spin delay in microsecond units for device drivers.
30 *  This is very dependent on the clock speed of the target.
31 */
32
33#define rtems_bsp_delay( microseconds ) \
34  { register uint32_t         _delay=(microseconds); \
35    register uint32_t         _tmp=123; \
36    __asm__ volatile( "0: \
37                     nbcd      %0 ; \
38                     nbcd      %0 ; \
39                     dbf       %1,0b" \
40                  : "=d" (_tmp), "=d" (_delay) \
41                  : "0"  (_tmp), "1"  (_delay) ); \
42  }
43
44/* Constants */
45
46#define RAM_START 0
47#define RAM_END   0x100000
48
49#define M681ADDR      0xfffb0040         /* address of the M68681 chip */
50#define RXRDYB        0x01               /* status reg recv ready mask */
51#define TXRDYB        0x04               /* status reg trans ready mask */
52#define PARITYERR     0x20               /* status reg parity error mask */
53#define FRAMEERR      0x40               /* status reg frame error mask */
54
55#define FOREVER       1                  /* infinite loop */
56
57/* Structures */
58
59struct r_m681_info {
60  char fill1[ 5 ];                       /* channel A regs ( not used ) */
61  char isr;                              /* interrupt status reg */
62  char fill2[ 2 ];                       /* counter regs (not used) */
63  char mr1mr2b;                          /* MR1B and MR2B regs */
64  char srb;                              /* status reg channel B */
65  char fill3;                            /* do not access */
66  char rbb;                              /* receive buffer channel B */
67  char ivr;                              /* interrupt vector register */
68};
69
70struct w_m681_info {
71  char fill1[ 4 ];                       /* channel A regs (not used) */
72  char acr;                              /* auxillary control reg */
73  char imr;                              /* interrupt mask reg */
74  char fill2[ 2 ];                       /* counter regs (not used) */
75  char mr1mr2b;                          /* MR1B and MR2B regs */
76  char csrb;                             /* clock select reg */
77  char crb;                              /* command reg */
78  char tbb;                              /* transmit buffer channel B */
79  char ivr;                              /* interrupt vector register */
80};
81
82extern rtems_isr_entry M68Kvec[];   /* vector table address */
83
84/* functions */
85
86rtems_isr_entry set_vector(
87  rtems_isr_entry     handler,
88  rtems_vector_number vector,
89  int                 type
90);
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif
Note: See TracBrowser for help on using the repository browser.