1 #ifndef _VME_USER_H_ 2 #define _VME_USER_H_ 3 4 #define VME_USER_BUS_MAX 1 5 6 /* 7 * VMEbus Master Window Configuration Structure 8 */ 9 struct vme_master { 10 __u32 enable; /* State of Window */ 11 __u64 vme_addr; /* Starting Address on the VMEbus */ 12 __u64 size; /* Window Size */ 13 __u32 aspace; /* Address Space */ 14 __u32 cycle; /* Cycle properties */ 15 __u32 dwidth; /* Maximum Data Width */ 16 #if 0 17 char prefetchenable; /* Prefetch Read Enable State */ 18 int prefetchsize; /* Prefetch Read Size (Cache Lines) */ 19 char wrpostenable; /* Write Post State */ 20 #endif 21 } __packed; 22 23 /* 24 * IOCTL Commands and structures 25 */ 26 27 /* Magic number for use in ioctls */ 28 #define VME_IOC_MAGIC 0xAE 29 30 /* VMEbus Slave Window Configuration Structure */ 31 struct vme_slave { 32 __u32 enable; /* State of Window */ 33 __u64 vme_addr; /* Starting Address on the VMEbus */ 34 __u64 size; /* Window Size */ 35 __u32 aspace; /* Address Space */ 36 __u32 cycle; /* Cycle properties */ 37 #if 0 38 char wrpostenable; /* Write Post State */ 39 char rmwlock; /* Lock PCI during RMW Cycles */ 40 char data64bitcapable; /* non-VMEbus capable of 64-bit Data */ 41 #endif 42 } __packed; 43 44 struct vme_irq_id { 45 __u8 level; 46 __u8 statid; 47 }; 48 49 #define VME_GET_SLAVE _IOR(VME_IOC_MAGIC, 1, struct vme_slave) 50 #define VME_SET_SLAVE _IOW(VME_IOC_MAGIC, 2, struct vme_slave) 51 #define VME_GET_MASTER _IOR(VME_IOC_MAGIC, 3, struct vme_master) 52 #define VME_SET_MASTER _IOW(VME_IOC_MAGIC, 4, struct vme_master) 53 #define VME_IRQ_GEN _IOW(VME_IOC_MAGIC, 5, struct vme_irq_id) 54 55 #endif /* _VME_USER_H_ */ 56 57