summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h
diff options
context:
space:
mode:
authorTill Straumann <strauman@slac.stanford.edu>2005-11-04 08:17:56 +0000
committerTill Straumann <strauman@slac.stanford.edu>2005-11-04 08:17:56 +0000
commit784e792a04c600b79d535ad81a5ba32b4f4de33e (patch)
tree47eae99ca61f0b46976ee5fbf8edbe81d8ed2ee3 /c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h
parent2005-11-03 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-784e792a04c600b79d535ad81a5ba32b4f4de33e.tar.bz2
2005-11-04 Till Straumann <strauman@slac.stanford.edu>
* shared/vmeUniverse/vmeTsi148.c, shared/vmeUniverse/vmeTsi148.h, shared/vmeUniverse/vme_am_defs.h: New files. * Makefile.am, shared/vmeUniverse/README.universe, shared/vmeUniverse/vmeUniverse.c, shared/vmeUniverse/vmeUniverse.h: Several VME related upgrades and fixes, hopefully addressing PR#835: vmeUniverse driver now supports shared interrupts. vmeUniverse now supports up to four wires between universe and PIC. A new irq mgr installation routine has been added allowing to use the new features. (old version is still present for bwd compatibility). Calls have been added to change interrupt routing (e.g., if wires have different priorities at the PIC this feature can be used to configure priorites). Routine for testing VME interrupts has been added (useful during BSP development). A new header defining standard VME address modes has been added so that the VME API doesn't have to #include a particular bridge driver header. For all driver entry points, a 'XX' variant has been added which allows to pass the chip's base address [in case a second universe is sitting on a VME card :-)]. Driver now uses interrupt line as read from PCI config. space (without offset) BSP needs to use PCI fixup if necessary. Added a driver for the tundra tsi148 VME bridge.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h b/c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h
new file mode 100644
index 0000000000..0292c3060a
--- /dev/null
+++ b/c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h
@@ -0,0 +1,67 @@
+#ifndef VME_AM_DEFINITIONS_H
+#define VME_AM_DEFINITIONS_H
+
+/* vxworks compatible addressing modes */
+
+#ifndef VME_AM_STD_SUP_ASCENDING
+#define VME_AM_STD_SUP_ASCENDING 0x3f
+#endif
+#ifndef VME_AM_STD_SUP_PGM
+#define VME_AM_STD_SUP_PGM 0x3e
+#endif
+#ifndef VME_AM_STD_USR_ASCENDING
+#define VME_AM_STD_USR_ASCENDING 0x3b
+#endif
+#ifndef VME_AM_STD_USR_PGM
+#define VME_AM_STD_USR_PGM 0x3a
+#endif
+#ifndef VME_AM_STD_SUP_DATA
+#define VME_AM_STD_SUP_DATA 0x3d
+#endif
+#ifndef VME_AM_STD_USR_DATA
+#define VME_AM_STD_USR_DATA 0x39
+#endif
+#ifndef VME_AM_EXT_SUP_ASCENDING
+#define VME_AM_EXT_SUP_ASCENDING 0x0f
+#endif
+#ifndef VME_AM_EXT_SUP_PGM
+#define VME_AM_EXT_SUP_PGM 0x0e
+#endif
+#ifndef VME_AM_EXT_USR_ASCENDING
+#define VME_AM_EXT_USR_ASCENDING 0x0b
+#endif
+#ifndef VME_AM_EXT_USR_PGM
+#define VME_AM_EXT_USR_PGM 0x0a
+#endif
+#ifndef VME_AM_EXT_SUP_DATA
+#define VME_AM_EXT_SUP_DATA 0x0d
+#endif
+#ifndef VME_AM_EXT_USR_DATA
+#define VME_AM_EXT_USR_DATA 0x09
+#endif
+#ifndef VME_AM_SUP_SHORT_IO
+#define VME_AM_SUP_SHORT_IO 0x2d
+#endif
+#ifndef VME_AM_USR_SHORT_IO
+#define VME_AM_USR_SHORT_IO 0x29
+#endif
+#ifndef VME_AM_IS_SHORT
+#define VME_AM_IS_SHORT(a) (((a) & 0xf0) == 0x20)
+#endif
+#ifndef VME_AM_IS_STD
+#define VME_AM_IS_STD(a) (((a) & 0xf0) == 0x30)
+#endif
+#ifndef VME_AM_IS_EXT
+#define VME_AM_IS_EXT(a) (((a) & 0xf0) == 0x00)
+#endif
+#ifndef VME_AM_IS_SUP
+#define VME_AM_IS_SUP(a) ((a) & 4)
+#endif
+
+/* Higher order bits are driver specific */
+
+#ifndef VME_AM_MASK
+#define VME_AM_MASK 0xff
+#endif
+
+#endif