source: rtems/c/src/lib/libbsp/m68k/mvme147/include/bsp.h @ 34c4852

4.104.114.84.95
Last change on this file since 34c4852 was 34c4852, checked in by Ralf Corsepius <ralf.corsepius@…>, on 05/26/05 at 05:36:48

2005-05-26 Ralf Corsepius <ralf.corsepius@…>

  • include/bsp.h: New header guard.
  • Property mode set to 100644
File size: 4.7 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/*
34 *  confdefs.h overrides for this BSP:
35 *   - number of termios serial ports (defaults to 1)
36 *   - Interrupt stack space is not minimum if defined.
37 */
38
39/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
40#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
41
42/* Constants */
43
44#define RAM_START 0x00005000
45#define RAM_END   0x00400000
46
47  /* MVME 147 Peripheral controller chip
48     see MVME147/D1, 3.4 */
49
50struct pcc_map {
51  /* 32 bit registers */
52  uint32_t         dma_table_address;            /* 0xfffe1000 */
53  uint32_t         dma_data_address;             /* 0xfffe1004 */
54  uint32_t         dma_bytecount;                /* 0xfffe1008 */
55  uint32_t         dma_data_holding;             /* 0xfffe100c */
56
57  /* 16 bit registers */
58  uint16_t         timer1_preload;               /* 0xfffe1010 */
59  uint16_t         timer1_count;                 /* 0xfffe1012 */
60  uint16_t         timer2_preload;               /* 0xfffe1014 */
61  uint16_t         timer2_count;                 /* 0xfffe1016 */
62
63  /* 8 bit registers */
64  uint8_t         timer1_int_control;            /* 0xfffe1018 */
65  uint8_t         timer1_control;                /* 0xfffe1019 */
66  uint8_t         timer2_int_control;            /* 0xfffe101a */
67  uint8_t         timer2_control;                /* 0xfffe101b */
68
69  uint8_t         acfail_int_control;            /* 0xfffe101c */
70  uint8_t         watchdog_control;              /* 0xfffe101d */
71
72  uint8_t         printer_int_control;           /* 0xfffe101e */
73  uint8_t         printer_control;               /* 0xfffe102f */
74
75  uint8_t         dma_int_control;               /* 0xfffe1020 */
76  uint8_t         dma_control;                   /* 0xfffe1021 */
77  uint8_t         bus_error_int_control;         /* 0xfffe1022 */
78  uint8_t         dma_status;                    /* 0xfffe1023 */
79  uint8_t         abort_int_control;             /* 0xfffe1024 */
80  uint8_t         table_address_function_code;   /* 0xfffe1025 */
81  uint8_t         serial_port_int_control;       /* 0xfffe1026 */
82  uint8_t         general_purpose_control;       /* 0xfffe1027 */
83  uint8_t         lan_int_control;               /* 0xfffe1028 */
84  uint8_t         general_purpose_status;        /* 0xfffe1029 */
85  uint8_t         scsi_port_int_control;         /* 0xfffe102a */
86  uint8_t         slave_base_address;            /* 0xfffe102b */
87  uint8_t         software_int_1_control;        /* 0xfffe102c */
88  uint8_t         int_base_vector;               /* 0xfffe102d */
89  uint8_t         software_int_2_control;        /* 0xfffe102e */
90  uint8_t         revision_level;                /* 0xfffe102f */
91};
92
93#define pcc      ((volatile struct pcc_map * const) 0xfffe1000)
94
95#define z8530 0xfffe3001
96
97/* interrupt vectors - see MVME146/D1 4.14 */
98#define PCC_BASE_VECTOR        0x40 /* First user int */
99#define SCC_VECTOR             PCC_BASE_VECTOR+3
100#define TIMER_1_VECTOR         PCC_BASE_VECTOR+8
101#define TIMER_2_VECTOR         PCC_BASE_VECTOR+9
102#define SOFT_1_VECTOR          PCC_BASE_VECTOR+10
103#define SOFT_2_VECTOR          PCC_BASE_VECTOR+11
104
105#define USE_CHANNEL_A   1                /* 1 = use channel A for console */
106#define USE_CHANNEL_B   0                /* 1 = use channel B for console */
107
108#if (USE_CHANNEL_A == 1)
109#define CONSOLE_CONTROL  0xfffe3002
110#define CONSOLE_DATA     0xfffe3003
111#elif (USE_CHANNEL_B == 1)
112#define CONSOLE_CONTROL  0xfffe3000
113#define CONSOLE_DATA     0xfffe3001
114#endif
115
116#define FOREVER       1                  /* infinite loop */
117
118#ifdef M147_INIT
119#undef EXTERN
120#define EXTERN
121#else
122#undef EXTERN
123#define EXTERN extern
124#endif
125
126/* miscellaneous stuff assumed to exist */
127
128extern rtems_configuration_table BSP_Configuration;
129
130extern m68k_isr_entry M68Kvec[];   /* vector table address */
131
132/*
133 *  Device Driver Table Entries
134 */
135
136/*
137 * NOTE: Use the standard Console driver entry
138 */
139
140/*
141 * NOTE: Use the standard Clock driver entry
142 */
143
144/* functions */
145
146void bsp_cleanup( void );
147
148m68k_isr_entry set_vector(
149  rtems_isr_entry     handler,
150  rtems_vector_number vector,
151  int                 type
152);
153
154#ifdef __cplusplus
155}
156#endif
157
158#endif
159/* end of include file */
Note: See TracBrowser for help on using the repository browser.