blob: 8b08385861fdbbd59a0baa801b0a23bc727b50c8 [file] [log] [blame]
Vijay Kumara14eddd2008-10-19 08:58:46 +05301/*
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 B949d6ae2009-09-21 11:23:59 +053010
11#include <linux/types.h>
12
Vijay Kumara14eddd2008-10-19 08:58:46 +053013struct poch_counters {
14 __u32 fifo_empty;
15 __u32 fifo_overflow;
16 __u32 pll_unlock;
17};
18
Vijay Kumar Bb01faf02009-09-21 11:23:55 +053019struct poch_consume {
20 __u32 __user *offsets;
21 __u32 nfetch;
22 __u32 nflush;
23};
24
Vijay Kumara14eddd2008-10-19 08:58:46 +053025#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 Bb01faf02009-09-21 11:23:55 +053033
34#define POCH_IOC_CONSUME _IOWR(POCH_IOC_NUM, 5, \
35 struct poch_consume)