blob: 995f2c53f7955ddfc6b53f99900c7ea6806f05a9 [file] [log] [blame]
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : 6280/7280/8270 Encoder device driver (kernel module)
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: hx280enc.h,v $
-- $Date: 2008/03/27 11:26:23 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef _HX280ENC_H_
#define _HX280ENC_H_
#include <linux/ioctl.h> /* needed for the _IOW etc stuff used later */
/*
* Macros to help debugging
*/
#undef PDEBUG /* undef it, just in case */
#ifdef HX280ENC_DEBUG
# ifdef __KERNEL__
/* This one if debugging is on, and kernel space */
# define PDEBUG(fmt, args...) printk( KERN_INFO "hmp4e: " fmt, ## args)
# else
/* This one for user space */
# define PDEBUG(fmt, args...) printf(__FILE__ ":%d: " fmt, __LINE__ , ## args)
# endif
#else
# define PDEBUG(fmt, args...) /* not debugging: nothing */
#endif
/*
* Ioctl definitions
*/
/* Use 'k' as magic number */
#define HX280ENC_IOC_MAGIC 'k'
/*
* S means "Set" through a ptr,
* T means "Tell" directly with the argument value
* G means "Get": reply by setting through a pointer
* Q means "Query": response is on the return value
* X means "eXchange": G and S atomically
* H means "sHift": T and Q atomically
*/
/*
* #define HX280ENC_IOCGBUFBUSADDRESS _IOR(HX280ENC_IOC_MAGIC, 1, unsigned long *)
* #define HX280ENC_IOCGBUFSIZE _IOR(HX280ENC_IOC_MAGIC, 2, unsigned int *)
*/
#define HX280ENC_IOCGHWOFFSET _IOR(HX280ENC_IOC_MAGIC, 3, unsigned long *)
#define HX280ENC_IOCGHWIOSIZE _IOR(HX280ENC_IOC_MAGIC, 4, unsigned int *)
#define HX280ENC_IOC_CLI _IO(HX280ENC_IOC_MAGIC, 5)
#define HX280ENC_IOC_STI _IO(HX280ENC_IOC_MAGIC, 6)
#define HX280ENC_IOCXVIRT2BUS _IOWR(HX280ENC_IOC_MAGIC, 7, unsigned long *)
#define HX280ENC_IOCHARDRESET _IO(HX280ENC_IOC_MAGIC, 8) /* debugging tool */
#define HX280ENC_IOCWAIT _IO(HX280ENC_IOC_MAGIC, 9) /* wait for irq */
#define MEMALLOC_IOCHARDRESET _IO(HX280ENC_IOC_MAGIC, 10) /* reset memalloc */
#define MEMALLOC_IOCXGETBUFFER _IOWR(HX280ENC_IOC_MAGIC, 11, unsigned long) /* get memory memalloc */
#define MEMALLOC_IOCSFREEBUFFER _IOW(HX280ENC_IOC_MAGIC, 12, unsigned long) /* free memory memalloc */
#define HX280ENC_IOC_MAXNR 12
typedef struct
{
unsigned busAddress;
unsigned size;
} MemallocParams;
#endif /* !_HX280ENC_H_ */