Vijay Kumar | a14eddd | 2008-10-19 08:58:46 +0530 | [diff] [blame] | 1 | /* |
| 2 | * User-space DMA and UIO based Redrapids Pocket Change CardBus driver |
| 3 | * |
| 4 | * Copyright 2008 Vijay Kumar <vijaykumar@bravegnu.org> |
| 5 | * |
| 6 | * Part of userspace API. Should be moved to a header file in |
| 7 | * include/linux for final version. |
| 8 | * |
| 9 | */ |
Vijay Kumar B | 949d6ae | 2009-09-21 11:23:59 +0530 | [diff] [blame^] | 10 | |
| 11 | #include <linux/types.h> |
| 12 | |
Vijay Kumar | a14eddd | 2008-10-19 08:58:46 +0530 | [diff] [blame] | 13 | struct poch_counters { |
| 14 | __u32 fifo_empty; |
| 15 | __u32 fifo_overflow; |
| 16 | __u32 pll_unlock; |
| 17 | }; |
| 18 | |
Vijay Kumar B | b01faf0 | 2009-09-21 11:23:55 +0530 | [diff] [blame] | 19 | struct poch_consume { |
| 20 | __u32 __user *offsets; |
| 21 | __u32 nfetch; |
| 22 | __u32 nflush; |
| 23 | }; |
| 24 | |
Vijay Kumar | a14eddd | 2008-10-19 08:58:46 +0530 | [diff] [blame] | 25 | #define POCH_IOC_NUM '9' |
| 26 | |
| 27 | #define POCH_IOC_TRANSFER_START _IO(POCH_IOC_NUM, 0) |
| 28 | #define POCH_IOC_TRANSFER_STOP _IO(POCH_IOC_NUM, 1) |
| 29 | #define POCH_IOC_GET_COUNTERS _IOR(POCH_IOC_NUM, 2, \ |
| 30 | struct poch_counters) |
| 31 | #define POCH_IOC_SYNC_GROUP_FOR_USER _IO(POCH_IOC_NUM, 3) |
| 32 | #define POCH_IOC_SYNC_GROUP_FOR_DEVICE _IO(POCH_IOC_NUM, 4) |
Vijay Kumar B | b01faf0 | 2009-09-21 11:23:55 +0530 | [diff] [blame] | 33 | |
| 34 | #define POCH_IOC_CONSUME _IOWR(POCH_IOC_NUM, 5, \ |
| 35 | struct poch_consume) |