Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:51

0001 #ifndef RTEMS_BSP_VME_CONFIG_H
0002 #define RTEMS_BSP_VME_CONFIG_H
0003 
0004 /* BSP specific address space configuration parameters */
0005 
0006 /* 
0007  * Authorship
0008  * ----------
0009  * This software ('beatnik' RTEMS BSP for MVME6100 and MVME5500) was
0010  *     created by Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
0011  *      Stanford Linear Accelerator Center, Stanford University.
0012  * 
0013  * Acknowledgement of sponsorship
0014  * ------------------------------
0015  * The 'beatnik' BSP was produced by
0016  *     the Stanford Linear Accelerator Center, Stanford University,
0017  *      under Contract DE-AC03-76SFO0515 with the Department of Energy.
0018  * 
0019  * Government disclaimer of liability
0020  * ----------------------------------
0021  * Neither the United States nor the United States Department of Energy,
0022  * nor any of their employees, makes any warranty, express or implied, or
0023  * assumes any legal liability or responsibility for the accuracy,
0024  * completeness, or usefulness of any data, apparatus, product, or process
0025  * disclosed, or represents that its use would not infringe privately owned
0026  * rights.
0027  * 
0028  * Stanford disclaimer of liability
0029  * --------------------------------
0030  * Stanford University makes no representations or warranties, express or
0031  * implied, nor assumes any liability for the use of this software.
0032  * 
0033  * Stanford disclaimer of copyright
0034  * --------------------------------
0035  * Stanford University, owner of the copyright, hereby disclaims its
0036  * copyright and all other rights in this software.  Hence, anyone may
0037  * freely use it for any purpose without restriction.  
0038  * 
0039  * Maintenance of notices
0040  * ----------------------
0041  * In the interest of clarity regarding the origin and status of this
0042  * SLAC software, this and all the preceding Stanford University notices
0043  * are to remain affixed to any copy or derivative of this software made
0044  * or distributed by the recipient and are to be affixed to any copy of
0045  * software made or distributed by the recipient that contains a copy or
0046  * derivative of this software.
0047  * 
0048  * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
0049  */ 
0050 
0051 #define _VME_DRIVER_TSI148
0052 #define _VME_DRIVER_UNIVERSE
0053 
0054 /* 
0055  * NOTE: the BSP (startup/bspstart.c) uses
0056  * hardcoded window lengths that match this
0057  * layout when setting BATs:
0058  */
0059 #define _VME_A32_WIN0_ON_PCI  0x90000000
0060 /* If _VME_CSR_ON_PCI is defined then the A32 window is reduced to accommodate
0061  * CSR for space.
0062  */
0063 #define _VME_CSR_ON_PCI      0x9e000000
0064 #define _VME_A24_ON_PCI      0x9f000000
0065 #define _VME_A16_ON_PCI      0x9fff0000
0066 
0067 /* start of the A32 window on the VME bus
0068  * TODO: this should perhaps be a configuration option
0069  */
0070 #define _VME_A32_WIN0_ON_VME  0x20000000
0071 
0072 /* if _VME_DRAM_OFFSET is defined, the BSP
0073  * will map our RAM onto the VME bus, starting
0074  * at _VME_DRAM_OFFSET
0075  */
0076 #define _VME_DRAM_OFFSET    0x90000000
0077 
0078 extern int BSP_VMEInit(void);
0079 extern int BSP_VMEIrqMgrInstall(void);
0080 
0081 #define BSP_VME_INSTALL_IRQ_MGR(err)  \
0082   do { \
0083     err = -1; \
0084     switch (BSP_getBoardType()) { \
0085       case MVME6100: \
0086     err = theOps->install_irq_mgr( \
0087           VMETSI148_IRQ_MGR_FLAG_SHARED, \
0088           0, BSP_IRQ_GPP_0 + 20, \
0089           1, BSP_IRQ_GPP_0 + 21, \
0090           2, BSP_IRQ_GPP_0 + 22, \
0091           3, BSP_IRQ_GPP_0 + 23, \
0092           -1); \
0093     break; \
0094 \
0095       case MVME5500: \
0096     err = theOps->install_irq_mgr( \
0097           VMEUNIVERSE_IRQ_MGR_FLAG_SHARED | \
0098           VMEUNIVERSE_IRQ_MGR_FLAG_PW_WORKAROUND, \
0099           0, BSP_IRQ_GPP_0 + 12, \
0100           1, BSP_IRQ_GPP_0 + 13, \
0101           2, BSP_IRQ_GPP_0 + 14, \
0102           3, BSP_IRQ_GPP_0 + 15, \
0103           -1); \
0104     break; \
0105 \
0106       default: \
0107     printk("WARNING: unknown board; "); \
0108     break; \
0109     } \
0110     if ( err ) \
0111       printk("VME interrupt manager NOT INSTALLED (error: %i)\n", err); \
0112   } while (0)
0113 
0114 #endif