source: rtems/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h @ ccceaf3

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

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

  • include/bsp.h: Remove unnecessary boilerplate comments.
  • Property mode set to 100644
File size: 6.6 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all MVME147 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 *  MVME147 port for TNI - Telecom Bretagne
13 *  by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
14 *  May 1996
15 *
16 *  $Id$
17 */
18
19#ifndef _BSP_H
20#define _BSP_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <bspopts.h>
27
28#include <rtems.h>
29#include <rtems/clockdrv.h>
30#include <rtems/console.h>
31#include <rtems/iosupp.h>
32
33/* Constants */
34
35#define RAM_START 0x00007000
36#define RAM_END   0x003e0000
37#define DRAM_END  0x00400000
38  /* We leave 128k for the shared memory */
39
40  /* MVME 147 Peripheral controller chip
41     see MVME147/D1, 3.4 */
42
43struct pcc_map {
44  /* 32 bit registers */
45  uint32_t         dma_table_address;            /* 0xfffe1000 */
46  uint32_t         dma_data_address;             /* 0xfffe1004 */
47  uint32_t         dma_bytecount;                /* 0xfffe1008 */
48  uint32_t         dma_data_holding;             /* 0xfffe100c */
49
50  /* 16 bit registers */
51  uint16_t         timer1_preload;               /* 0xfffe1010 */
52  uint16_t         timer1_count;                 /* 0xfffe1012 */
53  uint16_t         timer2_preload;               /* 0xfffe1014 */
54  uint16_t         timer2_count;                 /* 0xfffe1016 */
55
56  /* 8 bit registers */
57  uint8_t         timer1_int_control;            /* 0xfffe1018 */
58  uint8_t         timer1_control;                /* 0xfffe1019 */
59  uint8_t         timer2_int_control;            /* 0xfffe101a */
60  uint8_t         timer2_control;                /* 0xfffe101b */
61
62  uint8_t         acfail_int_control;            /* 0xfffe101c */
63  uint8_t         watchdog_control;              /* 0xfffe101d */
64
65  uint8_t         printer_int_control;           /* 0xfffe101e */
66  uint8_t         printer_control;               /* 0xfffe102f */
67
68  uint8_t         dma_int_control;               /* 0xfffe1020 */
69  uint8_t         dma_control;                   /* 0xfffe1021 */
70  uint8_t         bus_error_int_control;         /* 0xfffe1022 */
71  uint8_t         dma_status;                    /* 0xfffe1023 */
72  uint8_t         abort_int_control;             /* 0xfffe1024 */
73  uint8_t         table_address_function_code;   /* 0xfffe1025 */
74  uint8_t         serial_port_int_control;       /* 0xfffe1026 */
75  uint8_t         general_purpose_control;       /* 0xfffe1027 */
76  uint8_t         lan_int_control;               /* 0xfffe1028 */
77  uint8_t         general_purpose_status;        /* 0xfffe1029 */
78  uint8_t         scsi_port_int_control;         /* 0xfffe102a */
79  uint8_t         slave_base_address;            /* 0xfffe102b */
80  uint8_t         software_int_1_control;        /* 0xfffe102c */
81  uint8_t         int_base_vector;               /* 0xfffe102d */
82  uint8_t         software_int_2_control;        /* 0xfffe102e */
83  uint8_t         revision_level;                /* 0xfffe102f */
84};
85
86#define pcc      ((volatile struct pcc_map * const) 0xfffe1000)
87
88/* VME chip configuration registers */
89
90struct vme_lcsr_map {
91  uint8_t         unused_1;
92  uint8_t         system_controller;             /* 0xfffe2001 */
93  uint8_t         unused_2;
94  uint8_t         vme_bus_requester;             /* 0xfffe2003 */
95  uint8_t         unused_3;
96  uint8_t         master_configuration;          /* 0xfffe2005 */
97  uint8_t         unused_4;
98  uint8_t         slave_configuration;           /* 0xfffe2007 */
99  uint8_t         unused_5;
100  uint8_t         timer_configuration;           /* 0xfffe2009 */
101  uint8_t         unused_6;
102  uint8_t         slave_address_modifier;        /* 0xfffe200b */
103  uint8_t         unused_7;
104  uint8_t         master_address_modifier;       /* 0xfffe200d */
105  uint8_t         unused_8;
106  uint8_t         interrupt_handler_mask;        /* 0xfffe200f */
107  uint8_t         unused_9;
108  uint8_t         utility_interrupt_mask;        /* 0xfffe2011 */
109  uint8_t         unused_10;
110  uint8_t         utility_interrupt_vector;      /* 0xfffe2013 */
111  uint8_t         unused_11;
112  uint8_t         interrupt_request;             /* 0xfffe2015 */
113  uint8_t         unused_12;
114  uint8_t         vme_bus_status_id;             /* 0xfffe2017 */
115  uint8_t         unused_13;
116  uint8_t         bus_error_status;              /* 0xfffe2019 */
117  uint8_t         unused_14;
118  uint8_t         gcsr_base_address;             /* 0xfffe201b */
119};
120
121#define vme_lcsr      ((volatile struct vme_lcsr_map * const) 0xfffe2000)
122
123struct vme_gcsr_map {
124  uint8_t         unused_1;
125  uint8_t         global_0;                      /* 0xfffe2021 */
126  uint8_t         unused_2;
127  uint8_t         global_1;                      /* 0xfffe2023 */
128  uint8_t         unused_3;
129  uint8_t         board_identification;          /* 0xfffe2025 */
130  uint8_t         unused_4;
131  uint8_t         general_purpose_0;             /* 0xfffe2027 */
132  uint8_t         unused_5;
133  uint8_t         general_purpose_1;             /* 0xfffe2029 */
134  uint8_t         unused_6;
135  uint8_t         general_purpose_2;             /* 0xfffe202b */
136  uint8_t         unused_7;
137  uint8_t         general_purpose_3;             /* 0xfffe202d */
138  uint8_t         unused_8;
139  uint8_t         general_purpose_4;             /* 0xfffe202f */
140};
141
142#define vme_gcsr      ((volatile struct vme_gcsr_map * const) 0xfffe2020)
143
144#define z8530 0xfffe3001
145
146/* interrupt vectors - see MVME147/D1 4.14 */
147#define PCC_BASE_VECTOR        0x40 /* First user int */
148#define SCC_VECTOR             PCC_BASE_VECTOR+3
149#define TIMER_1_VECTOR         PCC_BASE_VECTOR+8
150#define TIMER_2_VECTOR         PCC_BASE_VECTOR+9
151#define SOFT_1_VECTOR          PCC_BASE_VECTOR+10
152#define SOFT_2_VECTOR          PCC_BASE_VECTOR+11
153
154#define VME_BASE_VECTOR        0x50
155#define VME_SIGLP_VECTOR       VME_BASE_VECTOR+1
156
157#define USE_CHANNEL_A   1                /* 1 = use channel A for console */
158#define USE_CHANNEL_B   0                /* 1 = use channel B for console */
159
160#if (USE_CHANNEL_A == 1)
161#define CONSOLE_CONTROL  0xfffe3002
162#define CONSOLE_DATA     0xfffe3003
163#elif (USE_CHANNEL_B == 1)
164#define CONSOLE_CONTROL  0xfffe3000
165#define CONSOLE_DATA     0xfffe3001
166#endif
167
168#define FOREVER       1                  /* infinite loop */
169
170#ifdef M147_INIT
171#undef EXTERN
172#define EXTERN
173#else
174#undef EXTERN
175#define EXTERN extern
176#endif
177
178extern m68k_isr_entry M68Kvec[];   /* vector table address */
179
180/*
181 * NOTE: Use the standard Clock driver entry
182 */
183
184/* functions */
185
186m68k_isr_entry set_vector(
187  rtems_isr_entry     handler,
188  rtems_vector_number vector,
189  int                 type
190);
191
192#ifdef __cplusplus
193}
194#endif
195
196#endif
Note: See TracBrowser for help on using the repository browser.