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

4.104.115
Last change on this file since 9f74843 was 9f74843, checked in by Joel Sherrill <joel.sherrill@…>, on 09/18/08 at 17:38:26

2008-09-18 Joel Sherrill <joel.sherrill@…>

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