1 | /* |
---|
2 | * This include file contains all MVME136 board IO definitions. |
---|
3 | */ |
---|
4 | |
---|
5 | /* |
---|
6 | * COPYRIGHT (c) 1989-2014. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in the file LICENSE in this distribution or at |
---|
11 | * http://www.rtems.org/license/LICENSE. |
---|
12 | */ |
---|
13 | |
---|
14 | #ifndef LIBBSP_M68K_MVME136_BSP_H |
---|
15 | #define LIBBSP_M68K_MVME136_BSP_H |
---|
16 | |
---|
17 | #include <bspopts.h> |
---|
18 | #include <bsp/default-initial-extension.h> |
---|
19 | |
---|
20 | #include <rtems.h> |
---|
21 | #include <rtems/clockdrv.h> |
---|
22 | #include <rtems/console.h> |
---|
23 | #include <rtems/iosupp.h> |
---|
24 | |
---|
25 | #ifdef __cplusplus |
---|
26 | extern "C" { |
---|
27 | #endif |
---|
28 | |
---|
29 | /* Constants */ |
---|
30 | |
---|
31 | #define RAM_START 0 |
---|
32 | #define RAM_END 0x100000 |
---|
33 | |
---|
34 | #define M681ADDR 0xfffb0040 /* address of the M68681 chip */ |
---|
35 | #define RXRDYB 0x01 /* status reg recv ready mask */ |
---|
36 | #define TXRDYB 0x04 /* status reg trans ready mask */ |
---|
37 | #define PARITYERR 0x20 /* status reg parity error mask */ |
---|
38 | #define FRAMEERR 0x40 /* status reg frame error mask */ |
---|
39 | |
---|
40 | #define FOREVER 1 /* infinite loop */ |
---|
41 | |
---|
42 | /* Structures */ |
---|
43 | |
---|
44 | struct r_m681_info { |
---|
45 | char fill1[ 5 ]; /* channel A regs ( not used ) */ |
---|
46 | char isr; /* interrupt status reg */ |
---|
47 | char fill2[ 2 ]; /* counter regs (not used) */ |
---|
48 | char mr1mr2b; /* MR1B and MR2B regs */ |
---|
49 | char srb; /* status reg channel B */ |
---|
50 | char fill3; /* do not access */ |
---|
51 | char rbb; /* receive buffer channel B */ |
---|
52 | char ivr; /* interrupt vector register */ |
---|
53 | }; |
---|
54 | |
---|
55 | struct w_m681_info { |
---|
56 | char fill1[ 4 ]; /* channel A regs (not used) */ |
---|
57 | char acr; /* auxillary control reg */ |
---|
58 | char imr; /* interrupt mask reg */ |
---|
59 | char fill2[ 2 ]; /* counter regs (not used) */ |
---|
60 | char mr1mr2b; /* MR1B and MR2B regs */ |
---|
61 | char csrb; /* clock select reg */ |
---|
62 | char crb; /* command reg */ |
---|
63 | char tbb; /* transmit buffer channel B */ |
---|
64 | char ivr; /* interrupt vector register */ |
---|
65 | }; |
---|
66 | |
---|
67 | extern rtems_isr_entry M68Kvec[]; /* vector table address */ |
---|
68 | |
---|
69 | /* functions */ |
---|
70 | |
---|
71 | rtems_isr_entry set_vector( |
---|
72 | rtems_isr_entry handle, |
---|
73 | rtems_vector_number vector, |
---|
74 | int type |
---|
75 | ); |
---|
76 | |
---|
77 | #ifdef __cplusplus |
---|
78 | } |
---|
79 | #endif |
---|
80 | |
---|
81 | #endif |
---|