RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
VMEConfig.h
Go to the documentation of this file.
1
9#ifndef RTEMS_BSP_VME_CONFIG_H
10#define RTEMS_BSP_VME_CONFIG_H
11
12/*
13 * Authorship
14 * ----------
15 * This software was created by
16 * Till Straumann <strauman@slac.stanford.edu>, 2002..2007,
17 * Stanford Linear Accelerator Center, Stanford University.
18 *
19 * Acknowledgement of sponsorship
20 * ------------------------------
21 * This software was produced by
22 * the Stanford Linear Accelerator Center, Stanford University,
23 * under Contract DE-AC03-76SFO0515 with the Department of Energy.
24 *
25 * Government disclaimer of liability
26 * ----------------------------------
27 * Neither the United States nor the United States Department of Energy,
28 * nor any of their employees, makes any warranty, express or implied, or
29 * assumes any legal liability or responsibility for the accuracy,
30 * completeness, or usefulness of any data, apparatus, product, or process
31 * disclosed, or represents that its use would not infringe privately owned
32 * rights.
33 *
34 * Stanford disclaimer of liability
35 * --------------------------------
36 * Stanford University makes no representations or warranties, express or
37 * implied, nor assumes any liability for the use of this software.
38 *
39 * Stanford disclaimer of copyright
40 * --------------------------------
41 * Stanford University, owner of the copyright, hereby disclaims its
42 * copyright and all other rights in this software. Hence, anyone may
43 * freely use it for any purpose without restriction.
44 *
45 * Maintenance of notices
46 * ----------------------
47 * In the interest of clarity regarding the origin and status of this
48 * SLAC software, this and all the preceding Stanford University notices
49 * are to remain affixed to any copy or derivative of this software made
50 * or distributed by the recipient and are to be affixed to any copy of
51 * software made or distributed by the recipient that contains a copy or
52 * derivative of this software.
53 *
54 * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
55 */
56
57/*
58 * NOTE: the BSP (startup/bspstart.c) uses
59 * hardcoded window lengths that match this
60 * layout:
61 */
62
63#define _VME_A32_WIN0_ON_PCI 0xc0000000
64#define _VME_CSR_ON_PCI 0xce000000
65#define _VME_A24_ON_PCI 0xcf000000
66#define _VME_A16_ON_PCI 0xcfff0000
67
68/* start of the A32 window on the VME bus
69 * TODO: this should perhaps be a run-time configuration option
70 */
71#define _VME_A32_WIN0_ON_VME 0x20000000
72
73/* if _VME_DRAM_OFFSET is defined, the BSP
74 * will map the board RAM onto the VME bus, starting
75 * at _VME_DRAM_OFFSET
76 */
77#define _VME_DRAM_OFFSET 0xc0000000
78
79/* If your BSP requires a non-standard way to configure
80 * the VME interrupt manager then define the symbol
81 *
82 * BSP_VME_INSTALL_IRQ_MGR
83 *
84 * to a proper instruction sequence that installs the
85 * universe interrupt manager. This requires knowledge
86 * of the wiring between the universe and the PIC (main
87 * interrupt controller), i.e., which IRQ 'pins' of the
88 * universe are wired to which 'lines'/inputs at the PIC.
89 * (consult vmeUniverse.h for more information).
90 *
91 * When installing the universe IRQ manager it is also
92 * possible to specify whether it should try to share
93 * PIC interrupts with other sources. This might not
94 * be supported by all BSPs (but the unverse driver
95 * recognizes that).
96 *
97 * If BSP_VME_INSTALL_IRQ_MGR is undefined then
98 * the default algorithm is used (vme_universe.c):
99 *
100 * This default setup uses only a single wire. It reads
101 * the PIC 'line' from PCI configuration space and assumes
102 * this to be wired to the first (LIRQ0) IRQ input at the
103 * universe. The default setup tries to use interrupt
104 * sharing.
105 */
106
107extern int BSP_VMEInit(void);
108extern int BSP_VMEIrqMgrInstall(void);
109
117#define BSP_VME_INSTALL_IRQ_MGR(err) \
118 do { \
119 err = vmeTsi148InstallIrqMgrAlt(\
120 VMETSI148_IRQ_MGR_FLAG_SHARED, /* use shared IRQs */ \
121 0, BSP_VME0_IRQ, \
122 1, BSP_VME1_IRQ, \
123 2, BSP_VME2_IRQ, \
124 3, BSP_VME3_IRQ, \
125 -1 /* terminate list */ \
126 ); \
127 } while (0)
128
129/* This BSP uses the Tsi148 Driver */
130#define _VME_DRIVER_TSI148
131
132#endif