summaryrefslogtreecommitdiff
path: root/drivers/staging/vme/devices/vme_user.h
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
committerYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
commit8e4bff4cab0ddac6060645b0715210484d02ff40 (patch)
tree3a5c3024371a04692a3a6d9974d001cdff8ebf84 /drivers/staging/vme/devices/vme_user.h
Initial file dump from open source releaseHEADmaster
Diffstat (limited to 'drivers/staging/vme/devices/vme_user.h')
-rw-r--r--drivers/staging/vme/devices/vme_user.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/staging/vme/devices/vme_user.h b/drivers/staging/vme/devices/vme_user.h
new file mode 100644
index 00000000..7d24cd63
--- /dev/null
+++ b/drivers/staging/vme/devices/vme_user.h
@@ -0,0 +1,58 @@
+#ifndef _VME_USER_H_
+#define _VME_USER_H_
+
+#define VME_USER_BUS_MAX 1
+
+/*
+ * VMEbus Master Window Configuration Structure
+ */
+struct vme_master {
+ int enable; /* State of Window */
+ unsigned long long vme_addr; /* Starting Address on the VMEbus */
+ unsigned long long size; /* Window Size */
+ u32 aspace; /* Address Space */
+ u32 cycle; /* Cycle properties */
+ u32 dwidth; /* Maximum Data Width */
+#if 0
+ char prefetchEnable; /* Prefetch Read Enable State */
+ int prefetchSize; /* Prefetch Read Size (Cache Lines) */
+ char wrPostEnable; /* Write Post State */
+#endif
+};
+
+
+/*
+ * IOCTL Commands and structures
+ */
+
+/* Magic number for use in ioctls */
+#define VME_IOC_MAGIC 0xAE
+
+
+/* VMEbus Slave Window Configuration Structure */
+struct vme_slave {
+ int enable; /* State of Window */
+ unsigned long long vme_addr; /* Starting Address on the VMEbus */
+ unsigned long long size; /* Window Size */
+ u32 aspace; /* Address Space */
+ u32 cycle; /* Cycle properties */
+#if 0
+ char wrPostEnable; /* Write Post State */
+ char rmwLock; /* Lock PCI during RMW Cycles */
+ char data64BitCapable; /* non-VMEbus capable of 64-bit Data */
+#endif
+};
+
+struct vme_irq_id {
+ __u8 level;
+ __u8 statid;
+};
+
+#define VME_GET_SLAVE _IOR(VME_IOC_MAGIC, 1, struct vme_slave)
+#define VME_SET_SLAVE _IOW(VME_IOC_MAGIC, 2, struct vme_slave)
+#define VME_GET_MASTER _IOR(VME_IOC_MAGIC, 3, struct vme_master)
+#define VME_SET_MASTER _IOW(VME_IOC_MAGIC, 4, struct vme_master)
+#define VME_IRQ_GEN _IOW(VME_IOC_MAGIC, 5, struct vme_irq_id)
+
+#endif /* _VME_USER_H_ */
+