summaryrefslogtreecommitdiff
path: root/vmeta_lib.h
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2012-10-20 17:48:11 +0100
committerRussell King <rmk@arm.linux.org.uk>2012-10-23 11:16:04 +0100
commit365dbfa7b9a2029a4c0f19b2b0f300340488ecc4 (patch)
tree0b8f72463b7741c866e6e850a23f153ad8b467a1 /vmeta_lib.h
parent3550ca2f59ae1e5f1d5f33fdfa0b56aa06f9930e (diff)
Major cleanup: rework for miscdevice kernel interface
This removes all support for the uio-based interface from libvmeta, replacing it with the new miscdevice interface code. This represents a substantial cleanup of this code.
Diffstat (limited to 'vmeta_lib.h')
-rw-r--r--vmeta_lib.h67
1 files changed, 3 insertions, 64 deletions
diff --git a/vmeta_lib.h b/vmeta_lib.h
index 6226542..9060c32 100644
--- a/vmeta_lib.h
+++ b/vmeta_lib.h
@@ -1,32 +1,14 @@
+/*
+ * This header file describes the public interface of the libvmeta library.
+ */
#ifndef VDEC_OS_DRIVER_H
#define VDEC_OS_DRIVER_H
-#include <sys/poll.h>
-#include <semaphore.h>
-#include "uio_vmeta.h"
#ifdef __cplusplus
extern "C"
{
#endif
-#define VDEC_DEBUG_ALL 0x1
-#define VDEC_DEBUG_MEM 0x2
-#define VDEC_DEBUG_LOCK 0x4
-#define VDEC_DEBUG_VER 0x8
-#define VDEC_DEBUG_NONE 0x0
-
-#define UIO_DEV "/dev/uio0"
-#define UIO_IO_VERSION "/sys/class/uio/uio0/version"
-
-#define UIO_IO_MEM_INDEX 0
-#define UIO_IO_HW_CONTEXT_INDEX 1
-#define UIO_IO_VMETA_OBJ_INDEX 2
-#define UIO_IO_KERNEL_SHARE_INDEX 3
-
-#define VMETA_SHARED_LOCK_HANDLE "vmeta_shared_lock"
-
-#define VMETA_KERN_MIN_VER 4
-#define VMETA_USER_VER "build-004"
//---------------------------------------------------------------------------
// Macros
//---------------------------------------------------------------------------
@@ -61,9 +43,6 @@ enum dma_data_direction {
DMA_NONE = 3,
};
-#define VMETA_STATUS_BIT_USED 0
-#define VMETA_STATUS_BIT_REGISTED 1
-
//---------------------------------------------------------------------------
// Driver initialization API
//---------------------------------------------------------------------------
@@ -114,7 +93,6 @@ SIGN32 vdec_os_api_free_user_id(SIGN32 user_id);
SIGN32 vdec_os_api_register_user_id(SIGN32 user_id);
SIGN32 vdec_os_api_unregister_user_id(SIGN32 user_id);
-SIGN32 vdec_os_api_update_user_info(SIGN32 user_id, void* info);
SIGN32 vdec_os_api_get_user_count(void);
//return: Former user unlock vmeta normally/abnormally/forced
@@ -162,45 +140,6 @@ typedef enum _LOCK_RET_CODE {
LOCK_RET_FORCE_INIT,
}LOCK_RET_CODE;
-/* display debug message */
-#define VMETA_LOG_ON 0
-#define VMETA_LOG_FILE "/data/vmeta_dbg.log"
-static int dbg_printf(UNSG32 dbglevel, const char* format, ...);
-
-typedef sem_t lock_t;
-//---------------------------------------------------------------------------
-// the control block of vdec os driver
-//---------------------------------------------------------------------------
-typedef struct vdec_os_driver_cb_s
-{
- int fd; // kernel file descriptor
- int uio; // using uio driver
- struct {
- UNSG32 phys;
- UNSG32 size;
- } map[3];
-
- UNSG32 io_mem_phy_addr; // the physical addr of io register base
- void *io_mem_virt_addr; // the reg base addr that maped from kernel
- UNSG32 io_mem_size; // the size of io mem area
- int refcount; // reference count in current process
- void *vdec_obj_va;
- UNSG32 vdec_obj_size;
- UNSG32 hw_context_pa;
- struct _kernel_share *kernel_share_va;
- UNSG32 kernel_share_size;
- int kern_ver; //vmeta kernel version
-} vdec_os_driver_cb_t;
-
-struct monitor_data{
- pthread_t pt;
- SIGN32 user_id;
-};
-
-/* vdec driver get cb */
-vdec_os_driver_cb_t *vdec_driver_get_cb(void);
-
-
#ifdef __cplusplus
}
#endif