diff options
author | root <root@iss-tomyspiel-l> | 2011-07-04 16:21:23 +0200 |
---|---|---|
committer | root <root@iss-tomyspiel-l> | 2011-07-04 16:21:23 +0200 |
commit | 2e7a7a3534bcf591c0d6c65105b2d845f293112f (patch) | |
tree | d0e5d2f9ea246ff55134205f7ac3af0d9599e641 /driver/pciDriver.h | |
parent | 70937611e34577151a6607640050e8b164a54e70 (diff) | |
download | pcitool-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.gz pcitool-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.bz2 pcitool-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.xz pcitool-2e7a7a3534bcf591c0d6c65105b2d845f293112f.zip |
North West Logick DMA implementation
Diffstat (limited to 'driver/pciDriver.h')
-rw-r--r-- | driver/pciDriver.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/driver/pciDriver.h b/driver/pciDriver.h index 98c1301..94c98e7 100644 --- a/driver/pciDriver.h +++ b/driver/pciDriver.h @@ -57,6 +57,7 @@ */ #include <linux/ioctl.h> +#include "pcilib_types.h" /* Identifies the PCI-E Xilinx ML605 */ #define PCIE_XILINX_VENDOR_ID 0x10ee @@ -82,9 +83,9 @@ #define PCIDRIVER_MMAP_KMEM 1 /* Direction of a DMA operation */ -#define PCIDRIVER_DMA_BIDIRECTIONAL 0 -#define PCIDRIVER_DMA_TODEVICE 1 -#define PCIDRIVER_DMA_FROMDEVICE 2 +#define PCIDRIVER_DMA_BIDIRECTIONAL 0 +#define PCIDRIVER_DMA_TODEVICE PCILIB_KMEM_SYNC_TODEVICE +#define PCIDRIVER_DMA_FROMDEVICE PCILIB_KMEM_SYNC_FROMDEVICE /* Possible sizes in a PCI command */ #define PCIDRIVER_PCI_CFG_SZ_BYTE 1 @@ -100,8 +101,11 @@ /* Types */ typedef struct { + unsigned long type; unsigned long pa; unsigned long size; + unsigned long align; + unsigned long use; int handle_id; } kmem_handle_t; @@ -171,8 +175,8 @@ typedef struct { #define PCIDRIVER_IOC_MMAP_MODE _IO( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 0 ) #define PCIDRIVER_IOC_MMAP_AREA _IO( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 1 ) #define PCIDRIVER_IOC_KMEM_ALLOC _IOWR( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 2, kmem_handle_t * ) -#define PCIDRIVER_IOC_KMEM_FREE _IOW( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 3, kmem_handle_t * ) -#define PCIDRIVER_IOC_KMEM_SYNC _IOW( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 4, kmem_sync_t * ) +#define PCIDRIVER_IOC_KMEM_FREE _IOW ( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 3, kmem_handle_t * ) +#define PCIDRIVER_IOC_KMEM_SYNC _IOWR( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 4, kmem_sync_t * ) #define PCIDRIVER_IOC_UMEM_SGMAP _IOWR( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 5, umem_handle_t * ) #define PCIDRIVER_IOC_UMEM_SGUNMAP _IOW( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 6, umem_handle_t * ) #define PCIDRIVER_IOC_UMEM_SGGET _IOWR( PCIDRIVER_IOC_MAGIC, PCIDRIVER_IOC_BASE + 7, umem_sglist_t * ) |