1
2#ifndef _VME_USER_H_
3#define _VME_USER_H_
4
5#define VME_USER_BUS_MAX 1
6
7
8
9
10struct vme_master {
11 __u32 enable;
12 __u64 vme_addr;
13 __u64 size;
14 __u32 aspace;
15 __u32 cycle;
16 __u32 dwidth;
17#if 0
18 char prefetchenable;
19 int prefetchsize;
20 char wrpostenable;
21#endif
22} __packed;
23
24
25
26
27
28
29#define VME_IOC_MAGIC 0xAE
30
31
32struct vme_slave {
33 __u32 enable;
34 __u64 vme_addr;
35 __u64 size;
36 __u32 aspace;
37 __u32 cycle;
38#if 0
39 char wrpostenable;
40 char rmwlock;
41 char data64bitcapable;
42#endif
43} __packed;
44
45struct vme_irq_id {
46 __u8 level;
47 __u8 statid;
48};
49
50#define VME_GET_SLAVE _IOR(VME_IOC_MAGIC, 1, struct vme_slave)
51#define VME_SET_SLAVE _IOW(VME_IOC_MAGIC, 2, struct vme_slave)
52#define VME_GET_MASTER _IOR(VME_IOC_MAGIC, 3, struct vme_master)
53#define VME_SET_MASTER _IOW(VME_IOC_MAGIC, 4, struct vme_master)
54#define VME_IRQ_GEN _IOW(VME_IOC_MAGIC, 5, struct vme_irq_id)
55
56#endif
57
58