2010-02-05 18:53:00 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2010 Intel Corporation. All rights reserved.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of version 2 of the GNU General
|
|
|
|
* Public License as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be
|
|
|
|
* useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
|
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
* You should have received a copy of the GNU General Public
|
|
|
|
* License along with this program; if not, write to the Free
|
|
|
|
* Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
* The full GNU General Public License is included in this
|
|
|
|
* distribution in the file called COPYING.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _RAR_REGISTER_H
|
|
|
|
#define _RAR_REGISTER_H
|
|
|
|
|
2010-05-04 19:40:12 +00:00
|
|
|
#include <linux/types.h>
|
2010-02-05 18:53:00 +00:00
|
|
|
|
|
|
|
/* following are used both in drivers as well as user space apps */
|
2009-08-06 19:44:18 +00:00
|
|
|
|
2010-05-04 19:40:12 +00:00
|
|
|
#define RAR_TYPE_VIDEO 0
|
|
|
|
#define RAR_TYPE_AUDIO 1
|
|
|
|
#define RAR_TYPE_IMAGE 2
|
|
|
|
#define RAR_TYPE_DATA 3
|
2010-02-05 18:53:00 +00:00
|
|
|
|
2010-05-04 19:40:12 +00:00
|
|
|
#ifdef __KERNEL__
|
2010-02-05 18:53:00 +00:00
|
|
|
|
2010-05-04 19:40:12 +00:00
|
|
|
struct rar_device;
|
2010-02-05 18:53:00 +00:00
|
|
|
|
2010-11-24 19:33:43 +00:00
|
|
|
#if defined(CONFIG_RAR_REGISTER)
|
2010-05-04 19:40:12 +00:00
|
|
|
int register_rar(int num,
|
|
|
|
int (*callback)(unsigned long data), unsigned long data);
|
|
|
|
void unregister_rar(int num);
|
|
|
|
int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end);
|
2010-02-05 18:53:00 +00:00
|
|
|
int rar_lock(int rar_index);
|
2010-11-24 19:33:43 +00:00
|
|
|
#else
|
|
|
|
extern void unregister_rar(int num) { }
|
|
|
|
extern int rar_lock(int rar_index) { return -EIO; }
|
|
|
|
|
|
|
|
extern inline int register_rar(int num,
|
|
|
|
int (*callback)(unsigned long data), unsigned long data)
|
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
|
|
|
|
extern int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end)
|
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
#endif /* RAR_REGISTER */
|
2009-08-06 19:44:18 +00:00
|
|
|
|
2010-02-05 18:53:00 +00:00
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
#endif /* _RAR_REGISTER_H */
|