summaryrefslogtreecommitdiff
path: root/drivers/media/video/wmt
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/wmt')
-rwxr-xr-xdrivers/media/video/wmt/Kconfig19
-rwxr-xr-xdrivers/media/video/wmt/Makefile13
-rw-r--r--drivers/media/video/wmt/built-in.o1
-rw-r--r--drivers/media/video/wmt/com-lock.h58
-rw-r--r--drivers/media/video/wmt/com-vd.h73
-rw-r--r--drivers/media/video/wmt/encode/.built-in.o.cmd1
-rw-r--r--drivers/media/video/wmt/encode/.g_wmt_ve_com.ko.cmd1
-rw-r--r--drivers/media/video/wmt/encode/.g_wmt_ve_com.mod.o.cmd371
-rw-r--r--drivers/media/video/wmt/encode/.g_wmt_ve_com.o.cmd1
-rw-r--r--drivers/media/video/wmt/encode/.g_wmt_ve_h264.ko.cmd1
-rw-r--r--drivers/media/video/wmt/encode/.g_wmt_ve_h264.mod.o.cmd371
-rw-r--r--drivers/media/video/wmt/encode/.g_wmt_ve_h264.o.cmd1
-rw-r--r--drivers/media/video/wmt/encode/.g_wmt_ve_jenc.ko.cmd1
-rw-r--r--drivers/media/video/wmt/encode/.g_wmt_ve_jenc.mod.o.cmd371
-rw-r--r--drivers/media/video/wmt/encode/.g_wmt_ve_jenc.o.cmd1
-rwxr-xr-xdrivers/media/video/wmt/encode/Kconfig15
-rwxr-xr-xdrivers/media/video/wmt/encode/Makefile11
-rw-r--r--drivers/media/video/wmt/encode/built-in.o1
-rw-r--r--drivers/media/video/wmt/encode/g_wmt_ve_com.mod.c54
-rw-r--r--drivers/media/video/wmt/encode/g_wmt_ve_com.mod.obin0 -> 3388 bytes
-rw-r--r--drivers/media/video/wmt/encode/g_wmt_ve_com.obin0 -> 13410 bytes
-rw-r--r--drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.c64
-rw-r--r--drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.obin0 -> 4056 bytes
-rw-r--r--drivers/media/video/wmt/encode/g_wmt_ve_h264.obin0 -> 24111 bytes
-rw-r--r--drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.c69
-rw-r--r--drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.obin0 -> 4376 bytes
-rw-r--r--drivers/media/video/wmt/encode/g_wmt_ve_jenc.obin0 -> 17049 bytes
-rwxr-xr-xdrivers/media/video/wmt/encode/h264/header.obin0 -> 3540 bytes
-rwxr-xr-xdrivers/media/video/wmt/encode/h264/vlc.obin0 -> 4116 bytes
-rwxr-xr-xdrivers/media/video/wmt/encode/h264/wmt-h264enc.obin0 -> 18240 bytes
-rwxr-xr-xdrivers/media/video/wmt/encode/jpeg/Kbuild3
-rwxr-xr-xdrivers/media/video/wmt/encode/jpeg/hw-jenc.obin0 -> 3728 bytes
-rwxr-xr-xdrivers/media/video/wmt/encode/jpeg/wmt-jenc.obin0 -> 14464 bytes
-rw-r--r--drivers/media/video/wmt/encode/modules.order3
-rwxr-xr-xdrivers/media/video/wmt/encode/wmt-ve.obin0 -> 13410 bytes
-rw-r--r--drivers/media/video/wmt/g_wmt_lock.mod.c52
-rw-r--r--drivers/media/video/wmt/g_wmt_lock.mod.obin0 -> 3256 bytes
-rw-r--r--drivers/media/video/wmt/g_wmt_lock.obin0 -> 8210 bytes
-rw-r--r--drivers/media/video/wmt/g_wmt_msvd.mod.c92
-rw-r--r--drivers/media/video/wmt/g_wmt_msvd.mod.obin0 -> 5828 bytes
-rw-r--r--drivers/media/video/wmt/g_wmt_msvd.obin0 -> 22807 bytes
-rw-r--r--drivers/media/video/wmt/g_wmt_vd_com.mod.c71
-rw-r--r--drivers/media/video/wmt/g_wmt_vd_com.mod.obin0 -> 4476 bytes
-rw-r--r--drivers/media/video/wmt/g_wmt_vd_com.obin0 -> 30689 bytes
-rw-r--r--drivers/media/video/wmt/g_wmt_vd_jdec.mod.c68
-rw-r--r--drivers/media/video/wmt/g_wmt_vd_jdec.mod.obin0 -> 4296 bytes
-rw-r--r--drivers/media/video/wmt/g_wmt_vd_jdec.obin0 -> 26987 bytes
-rwxr-xr-xdrivers/media/video/wmt/jpeg/hw-jdec.obin0 -> 12920 bytes
-rwxr-xr-xdrivers/media/video/wmt/jpeg/wmt-jdec.obin0 -> 15444 bytes
-rw-r--r--drivers/media/video/wmt/modules.order4
-rwxr-xr-xdrivers/media/video/wmt/msvd/vpu.obin0 -> 22788 bytes
-rw-r--r--drivers/media/video/wmt/wmt-codec.c857
-rw-r--r--drivers/media/video/wmt/wmt-codec.h72
-rwxr-xr-xdrivers/media/video/wmt/wmt-codec.obin0 -> 20119 bytes
-rw-r--r--drivers/media/video/wmt/wmt-lock.c512
-rw-r--r--drivers/media/video/wmt/wmt-lock.h45
-rwxr-xr-xdrivers/media/video/wmt/wmt-lock.obin0 -> 8196 bytes
-rw-r--r--drivers/media/video/wmt/wmt-vd.c541
-rw-r--r--drivers/media/video/wmt/wmt-vd.h106
-rwxr-xr-xdrivers/media/video/wmt/wmt-vd.obin0 -> 11849 bytes
60 files changed, 3924 insertions, 0 deletions
diff --git a/drivers/media/video/wmt/Kconfig b/drivers/media/video/wmt/Kconfig
new file mode 100755
index 00000000..48f69397
--- /dev/null
+++ b/drivers/media/video/wmt/Kconfig
@@ -0,0 +1,19 @@
+#
+# Multimedia Video device configuration
+#
+
+config WMT_VIDEO_LOCK
+ tristate "WonderMedia Video Lock"
+ ---help---
+ Say Y here to enable Video Lock
+
+config WMT_VIDEO_DECODE_JPEG
+ tristate "WonderMedia Hardware JPEG decoder"
+ ---help---
+ Say Y here to use hardware to decode JPEG files
+
+config WMT_VIDEO_DECODE_MSVD
+ tristate "WonderMedia Hardware MSVD decoder"
+ ---help---
+ Say Y here to use hardware to decode MSVD files
+ \ No newline at end of file
diff --git a/drivers/media/video/wmt/Makefile b/drivers/media/video/wmt/Makefile
new file mode 100755
index 00000000..3e02cf24
--- /dev/null
+++ b/drivers/media/video/wmt/Makefile
@@ -0,0 +1,13 @@
+#
+# Makefile for the video capture/playback device drivers.
+#
+
+g_wmt_vd_com-y := wmt-vd.o wmt-codec.o
+g_wmt_lock-y := wmt-lock.o
+g_wmt_msvd-y := msvd/vpu.o
+g_wmt_vd_jdec-y := jpeg/hw-jdec.o jpeg/wmt-jdec.o
+
+obj-$(CONFIG_WMT_VIDEO_LOCK) += g_wmt_lock.o
+obj-$(CONFIG_WMT_VIDEO_DECODE) += g_wmt_vd_com.o
+obj-$(CONFIG_WMT_VIDEO_DECODE_MSVD) += g_wmt_msvd.o
+obj-$(CONFIG_WMT_VIDEO_DECODE_JPEG) += g_wmt_vd_jdec.o
diff --git a/drivers/media/video/wmt/built-in.o b/drivers/media/video/wmt/built-in.o
new file mode 100644
index 00000000..8b277f0d
--- /dev/null
+++ b/drivers/media/video/wmt/built-in.o
@@ -0,0 +1 @@
+!<arch>
diff --git a/drivers/media/video/wmt/com-lock.h b/drivers/media/video/wmt/com-lock.h
new file mode 100644
index 00000000..477ddca2
--- /dev/null
+++ b/drivers/media/video/wmt/com-lock.h
@@ -0,0 +1,58 @@
+/*++
+ * WonderMedia Codec Lock driver
+ *
+ * Copyright (c) 2013 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+#ifndef COM_LOCK_H
+/* To assert that only one occurrence is included */
+#define COM_LOCK_H
+
+/*-------------------- MODULE DEPENDENCY ---------------------------------*/
+
+/*-------------------- EXPORTED PRIVATE TYPES-----------------------------*/
+
+
+/*Define wmt lock types*/
+enum {
+ lock_jpeg = 0, /* Lock for JPEG decoder */
+ lock_video, /* Lock for MSVD decoders */
+ lock_max
+}; /* wmt_lock_type */
+
+struct wmt_lock {
+ long lock_type; /* TYPE_JPEG or TYPE_VIDEO */
+ long arg2; /* for IO_WMT_UNLOCK, the timeout value */
+ int is_wait; /* is someone wait for this lock? */
+};
+#define wmt_lock_ioctl_arg struct wmt_lock
+
+/*--------------------- EXPORTED PRIVATE FUNCTIONS ----------------------*/
+
+/*--------------------------------------------------------------------------
+ Macros below are used for driver in IOCTL
+--------------------------------------------------------------------------*/
+#define LOCK_IOC_MAGIC 'L'
+#define IO_WMT_LOCK _IOWR(LOCK_IOC_MAGIC, 0, unsigned long)
+#define IO_WMT_UNLOCK _IOWR(LOCK_IOC_MAGIC, 1, unsigned long)
+#define IO_WMT_CHECK_WAIT _IOR(LOCK_IOC_MAGIC, 2, unsigned long)
+
+
+#endif /* ifndef COM_LOCK_H */
+
+/*=== END com-lock.h =====================================================*/
diff --git a/drivers/media/video/wmt/com-vd.h b/drivers/media/video/wmt/com-vd.h
new file mode 100644
index 00000000..9ad58b17
--- /dev/null
+++ b/drivers/media/video/wmt/com-vd.h
@@ -0,0 +1,73 @@
+/*++
+ * Copyright (c) 2013 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+
+#ifndef COM_VD_H
+/* To assert that only one occurrence is included */
+#define COM_VD_H
+
+/*-------------------- MODULE DEPENDENCY ---------------------------------*/
+#ifdef __KERNEL__
+#include <mach/com-video.h>
+#else
+#include "com-video.h"
+#endif
+
+/*-------------------- EXPORTED PRIVATE CONSTANTS ------------------------*/
+
+#define VD_JPEG 0x0001
+#define VD_MAX 0x0002
+
+/*--------------------------------------------------------------------------
+Following macros define hardware decoder type for vd_ioctl_cmd
+--------------------------------------------------------------------------*/
+#define IOCTL_CMD_INIT(cmd, _struct_type_, vd_type, version)
+
+#define VD_IOCTL_CMD_M \
+ unsigned int identity; /* decoder type */\
+ unsigned int size /* size of full structure */
+/* End of VD_IOCTL_CMD_M */
+
+/*-------------------------------------------------------------------------
+ Definitions of Struct
+--------------------------------------------------------------------------*/
+struct vd_ioctl_cmd_s {
+ VD_IOCTL_CMD_M;
+};
+#define vd_ioctl_cmd struct vd_ioctl_cmd_s
+
+struct vd_handle_s {
+ int vd_fd;
+ int mb_fd;
+};
+#define vd_handle_t struct vd_handle_s
+
+/*--------------------------------------------------------------------------
+ Macros below are used for driver in IOCTL
+--------------------------------------------------------------------------*/
+#define VD_IOC_MAGIC 'k'
+#define VD_IOC_MAXNR 1
+
+/* VDIOSET_DECODE_LOOP: application send decode data to driver
+ (blocking mode in driver) */
+#define VDIOSET_DECODE_LOOP _IOWR(VD_IOC_MAGIC, 0, vd_ioctl_cmd)
+
+#endif /* ifndef COM_VD_H */
+
+/*=== END com-vd.h ======================================================*/
diff --git a/drivers/media/video/wmt/encode/.built-in.o.cmd b/drivers/media/video/wmt/encode/.built-in.o.cmd
new file mode 100644
index 00000000..5503ea98
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.built-in.o.cmd
@@ -0,0 +1 @@
+cmd_drivers/media/video/wmt/encode/built-in.o := rm -f drivers/media/video/wmt/encode/built-in.o; arm_1103_le-ar rcsD drivers/media/video/wmt/encode/built-in.o
diff --git a/drivers/media/video/wmt/encode/.g_wmt_ve_com.ko.cmd b/drivers/media/video/wmt/encode/.g_wmt_ve_com.ko.cmd
new file mode 100644
index 00000000..1b28d4ed
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.g_wmt_ve_com.ko.cmd
@@ -0,0 +1 @@
+cmd_drivers/media/video/wmt/encode/g_wmt_ve_com.ko := arm_1103_le-ld -EL -r -T /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/scripts/module-common.lds --build-id -o drivers/media/video/wmt/encode/g_wmt_ve_com.ko drivers/media/video/wmt/encode/g_wmt_ve_com.o drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o
diff --git a/drivers/media/video/wmt/encode/.g_wmt_ve_com.mod.o.cmd b/drivers/media/video/wmt/encode/.g_wmt_ve_com.mod.o.cmd
new file mode 100644
index 00000000..f12f7f08
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.g_wmt_ve_com.mod.o.cmd
@@ -0,0 +1,371 @@
+cmd_drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o := arm_1103_le-gcc -Wp,-MD,drivers/media/video/wmt/encode/.g_wmt_ve_com.mod.o.d -nostdinc -isystem /home/srikant/stuff/kernels/wm8880/apc-rock-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.2/include -I/home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include -Iarch/arm/include/generated -Iinclude -include /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-wmt/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -marm -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(g_wmt_ve_com.mod)" -D"KBUILD_MODNAME=KBUILD_STR(g_wmt_ve_com)" -DMODULE -c -o drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o drivers/media/video/wmt/encode/g_wmt_ve_com.mod.c
+
+source_drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o := drivers/media/video/wmt/encode/g_wmt_ve_com.mod.c
+
+deps_drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o := \
+ $(wildcard include/config/module/unload.h) \
+ include/linux/module.h \
+ $(wildcard include/config/sysfs.h) \
+ $(wildcard include/config/modules.h) \
+ $(wildcard include/config/unused/symbols.h) \
+ $(wildcard include/config/generic/bug.h) \
+ $(wildcard include/config/kallsyms.h) \
+ $(wildcard include/config/smp.h) \
+ $(wildcard include/config/tracepoints.h) \
+ $(wildcard include/config/tracing.h) \
+ $(wildcard include/config/event/tracing.h) \
+ $(wildcard include/config/ftrace/mcount/record.h) \
+ $(wildcard include/config/constructors.h) \
+ $(wildcard include/config/debug/set/module/ronx.h) \
+ include/linux/list.h \
+ $(wildcard include/config/debug/list.h) \
+ include/linux/types.h \
+ $(wildcard include/config/uid16.h) \
+ $(wildcard include/config/lbdaf.h) \
+ $(wildcard include/config/arch/dma/addr/t/64bit.h) \
+ $(wildcard include/config/phys/addr/t/64bit.h) \
+ $(wildcard include/config/64bit.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/types.h \
+ include/asm-generic/int-ll64.h \
+ arch/arm/include/generated/asm/bitsperlong.h \
+ include/asm-generic/bitsperlong.h \
+ include/linux/posix_types.h \
+ include/linux/stddef.h \
+ include/linux/compiler.h \
+ $(wildcard include/config/sparse/rcu/pointer.h) \
+ $(wildcard include/config/trace/branch/profiling.h) \
+ $(wildcard include/config/profile/all/branches.h) \
+ $(wildcard include/config/enable/must/check.h) \
+ $(wildcard include/config/enable/warn/deprecated.h) \
+ include/linux/compiler-gcc.h \
+ $(wildcard include/config/arch/supports/optimized/inlining.h) \
+ $(wildcard include/config/optimize/inlining.h) \
+ include/linux/compiler-gcc4.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/posix_types.h \
+ include/asm-generic/posix_types.h \
+ include/linux/poison.h \
+ $(wildcard include/config/illegal/pointer/value.h) \
+ include/linux/const.h \
+ include/linux/stat.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/stat.h \
+ include/linux/time.h \
+ $(wildcard include/config/arch/uses/gettimeoffset.h) \
+ include/linux/cache.h \
+ $(wildcard include/config/arch/has/cache/line/size.h) \
+ include/linux/kernel.h \
+ $(wildcard include/config/preempt/voluntary.h) \
+ $(wildcard include/config/debug/atomic/sleep.h) \
+ $(wildcard include/config/prove/locking.h) \
+ $(wildcard include/config/ring/buffer.h) \
+ $(wildcard include/config/numa.h) \
+ $(wildcard include/config/compaction.h) \
+ include/linux/sysinfo.h \
+ /home/srikant/stuff/kernels/wm8880/apc-rock-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.2/include/stdarg.h \
+ include/linux/linkage.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/linkage.h \
+ include/linux/bitops.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/bitops.h \
+ include/linux/irqflags.h \
+ $(wildcard include/config/trace/irqflags.h) \
+ $(wildcard include/config/irqsoff/tracer.h) \
+ $(wildcard include/config/preempt/tracer.h) \
+ $(wildcard include/config/trace/irqflags/support.h) \
+ include/linux/typecheck.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/irqflags.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/ptrace.h \
+ $(wildcard include/config/cpu/endian/be8.h) \
+ $(wildcard include/config/arm/thumb.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/hwcap.h \
+ include/asm-generic/bitops/non-atomic.h \
+ include/asm-generic/bitops/fls64.h \
+ include/asm-generic/bitops/sched.h \
+ include/asm-generic/bitops/hweight.h \
+ include/asm-generic/bitops/arch_hweight.h \
+ include/asm-generic/bitops/const_hweight.h \
+ include/asm-generic/bitops/lock.h \
+ include/asm-generic/bitops/le.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/byteorder.h \
+ include/linux/byteorder/little_endian.h \
+ include/linux/swab.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/swab.h \
+ include/linux/byteorder/generic.h \
+ include/asm-generic/bitops/ext2-atomic-setbit.h \
+ include/linux/log2.h \
+ $(wildcard include/config/arch/has/ilog2/u32.h) \
+ $(wildcard include/config/arch/has/ilog2/u64.h) \
+ include/linux/printk.h \
+ $(wildcard include/config/printk.h) \
+ $(wildcard include/config/dynamic/debug.h) \
+ include/linux/init.h \
+ $(wildcard include/config/hotplug.h) \
+ include/linux/dynamic_debug.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/div64.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/compiler.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/bug.h \
+ $(wildcard include/config/bug.h) \
+ $(wildcard include/config/thumb2/kernel.h) \
+ $(wildcard include/config/debug/bugverbose.h) \
+ $(wildcard include/config/arm/lpae.h) \
+ include/asm-generic/bug.h \
+ $(wildcard include/config/generic/bug/relative/pointers.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/cache.h \
+ $(wildcard include/config/arm/l1/cache/shift.h) \
+ $(wildcard include/config/aeabi.h) \
+ include/linux/seqlock.h \
+ include/linux/spinlock.h \
+ $(wildcard include/config/debug/spinlock.h) \
+ $(wildcard include/config/generic/lockbreak.h) \
+ $(wildcard include/config/preempt.h) \
+ $(wildcard include/config/debug/lock/alloc.h) \
+ include/linux/preempt.h \
+ $(wildcard include/config/debug/preempt.h) \
+ $(wildcard include/config/preempt/count.h) \
+ $(wildcard include/config/preempt/notifiers.h) \
+ include/linux/thread_info.h \
+ $(wildcard include/config/compat.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/thread_info.h \
+ $(wildcard include/config/arm/thumbee.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/fpstate.h \
+ $(wildcard include/config/vfpv3.h) \
+ $(wildcard include/config/iwmmxt.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/domain.h \
+ $(wildcard include/config/io/36.h) \
+ $(wildcard include/config/cpu/use/domains.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/barrier.h \
+ $(wildcard include/config/cpu/32v6k.h) \
+ $(wildcard include/config/cpu/xsc3.h) \
+ $(wildcard include/config/cpu/fa526.h) \
+ $(wildcard include/config/arch/has/barriers.h) \
+ $(wildcard include/config/arm/dma/mem/bufferable.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/outercache.h \
+ $(wildcard include/config/outer/cache/sync.h) \
+ $(wildcard include/config/outer/cache.h) \
+ include/linux/stringify.h \
+ include/linux/bottom_half.h \
+ include/linux/spinlock_types.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/spinlock_types.h \
+ include/linux/lockdep.h \
+ $(wildcard include/config/lockdep.h) \
+ $(wildcard include/config/lock/stat.h) \
+ $(wildcard include/config/prove/rcu.h) \
+ include/linux/rwlock_types.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/spinlock.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/processor.h \
+ $(wildcard include/config/have/hw/breakpoint.h) \
+ $(wildcard include/config/mmu.h) \
+ $(wildcard include/config/arm/errata/754327.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/hw_breakpoint.h \
+ include/linux/rwlock.h \
+ include/linux/spinlock_api_smp.h \
+ $(wildcard include/config/inline/spin/lock.h) \
+ $(wildcard include/config/inline/spin/lock/bh.h) \
+ $(wildcard include/config/inline/spin/lock/irq.h) \
+ $(wildcard include/config/inline/spin/lock/irqsave.h) \
+ $(wildcard include/config/inline/spin/trylock.h) \
+ $(wildcard include/config/inline/spin/trylock/bh.h) \
+ $(wildcard include/config/uninline/spin/unlock.h) \
+ $(wildcard include/config/inline/spin/unlock/bh.h) \
+ $(wildcard include/config/inline/spin/unlock/irq.h) \
+ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \
+ include/linux/rwlock_api_smp.h \
+ $(wildcard include/config/inline/read/lock.h) \
+ $(wildcard include/config/inline/write/lock.h) \
+ $(wildcard include/config/inline/read/lock/bh.h) \
+ $(wildcard include/config/inline/write/lock/bh.h) \
+ $(wildcard include/config/inline/read/lock/irq.h) \
+ $(wildcard include/config/inline/write/lock/irq.h) \
+ $(wildcard include/config/inline/read/lock/irqsave.h) \
+ $(wildcard include/config/inline/write/lock/irqsave.h) \
+ $(wildcard include/config/inline/read/trylock.h) \
+ $(wildcard include/config/inline/write/trylock.h) \
+ $(wildcard include/config/inline/read/unlock.h) \
+ $(wildcard include/config/inline/write/unlock.h) \
+ $(wildcard include/config/inline/read/unlock/bh.h) \
+ $(wildcard include/config/inline/write/unlock/bh.h) \
+ $(wildcard include/config/inline/read/unlock/irq.h) \
+ $(wildcard include/config/inline/write/unlock/irq.h) \
+ $(wildcard include/config/inline/read/unlock/irqrestore.h) \
+ $(wildcard include/config/inline/write/unlock/irqrestore.h) \
+ include/linux/atomic.h \
+ $(wildcard include/config/arch/has/atomic/or.h) \
+ $(wildcard include/config/generic/atomic64.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/atomic.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/cmpxchg.h \
+ $(wildcard include/config/cpu/sa1100.h) \
+ $(wildcard include/config/cpu/sa110.h) \
+ $(wildcard include/config/cpu/v6.h) \
+ include/asm-generic/cmpxchg-local.h \
+ include/asm-generic/atomic-long.h \
+ include/linux/math64.h \
+ include/linux/kmod.h \
+ include/linux/gfp.h \
+ $(wildcard include/config/kmemcheck.h) \
+ $(wildcard include/config/highmem.h) \
+ $(wildcard include/config/zone/dma.h) \
+ $(wildcard include/config/zone/dma32.h) \
+ $(wildcard include/config/pm/sleep.h) \
+ include/linux/mmzone.h \
+ $(wildcard include/config/force/max/zoneorder.h) \
+ $(wildcard include/config/memory/hotplug.h) \
+ $(wildcard include/config/sparsemem.h) \
+ $(wildcard include/config/have/memblock/node/map.h) \
+ $(wildcard include/config/discontigmem.h) \
+ $(wildcard include/config/flat/node/mem/map.h) \
+ $(wildcard include/config/cgroup/mem/res/ctlr.h) \
+ $(wildcard include/config/no/bootmem.h) \
+ $(wildcard include/config/have/memory/present.h) \
+ $(wildcard include/config/have/memoryless/nodes.h) \
+ $(wildcard include/config/need/node/memmap/size.h) \
+ $(wildcard include/config/have/memblock/node.h) \
+ $(wildcard include/config/need/multiple/nodes.h) \
+ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \
+ $(wildcard include/config/flatmem.h) \
+ $(wildcard include/config/sparsemem/extreme.h) \
+ $(wildcard include/config/have/arch/pfn/valid.h) \
+ $(wildcard include/config/nodes/span/other/nodes.h) \
+ $(wildcard include/config/holes/in/zone.h) \
+ $(wildcard include/config/arch/has/holes/memorymodel.h) \
+ include/linux/wait.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/current.h \
+ include/linux/threads.h \
+ $(wildcard include/config/nr/cpus.h) \
+ $(wildcard include/config/base/small.h) \
+ include/linux/numa.h \
+ $(wildcard include/config/nodes/shift.h) \
+ include/linux/nodemask.h \
+ include/linux/bitmap.h \
+ include/linux/string.h \
+ $(wildcard include/config/binary/printf.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/string.h \
+ include/linux/pageblock-flags.h \
+ $(wildcard include/config/hugetlb/page.h) \
+ $(wildcard include/config/hugetlb/page/size/variable.h) \
+ include/generated/bounds.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/page.h \
+ $(wildcard include/config/cpu/copy/v3.h) \
+ $(wildcard include/config/cpu/copy/v4wt.h) \
+ $(wildcard include/config/cpu/copy/v4wb.h) \
+ $(wildcard include/config/cpu/copy/feroceon.h) \
+ $(wildcard include/config/cpu/copy/fa.h) \
+ $(wildcard include/config/cpu/xscale.h) \
+ $(wildcard include/config/cpu/copy/v6.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/glue.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/pgtable-2level-types.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/memory.h \
+ $(wildcard include/config/need/mach/memory/h.h) \
+ $(wildcard include/config/page/offset.h) \
+ $(wildcard include/config/dram/size.h) \
+ $(wildcard include/config/dram/base.h) \
+ $(wildcard include/config/have/tcm.h) \
+ $(wildcard include/config/arm/patch/phys/virt.h) \
+ $(wildcard include/config/phys/offset.h) \
+ arch/arm/include/generated/asm/sizes.h \
+ include/asm-generic/sizes.h \
+ include/asm-generic/memory_model.h \
+ $(wildcard include/config/sparsemem/vmemmap.h) \
+ include/asm-generic/getorder.h \
+ include/linux/memory_hotplug.h \
+ $(wildcard include/config/memory/hotremove.h) \
+ $(wildcard include/config/have/arch/nodedata/extension.h) \
+ include/linux/notifier.h \
+ include/linux/errno.h \
+ arch/arm/include/generated/asm/errno.h \
+ include/asm-generic/errno.h \
+ include/asm-generic/errno-base.h \
+ include/linux/mutex.h \
+ $(wildcard include/config/debug/mutexes.h) \
+ $(wildcard include/config/have/arch/mutex/cpu/relax.h) \
+ include/linux/rwsem.h \
+ $(wildcard include/config/rwsem/generic/spinlock.h) \
+ include/linux/rwsem-spinlock.h \
+ include/linux/srcu.h \
+ include/linux/rcupdate.h \
+ $(wildcard include/config/rcu/torture/test.h) \
+ $(wildcard include/config/tree/rcu.h) \
+ $(wildcard include/config/tree/preempt/rcu.h) \
+ $(wildcard include/config/rcu/trace.h) \
+ $(wildcard include/config/preempt/rcu.h) \
+ $(wildcard include/config/tiny/rcu.h) \
+ $(wildcard include/config/tiny/preempt/rcu.h) \
+ $(wildcard include/config/debug/objects/rcu/head.h) \
+ $(wildcard include/config/hotplug/cpu.h) \
+ $(wildcard include/config/preempt/rt.h) \
+ include/linux/cpumask.h \
+ $(wildcard include/config/cpumask/offstack.h) \
+ $(wildcard include/config/debug/per/cpu/maps.h) \
+ $(wildcard include/config/disable/obsolete/cpumask/functions.h) \
+ include/linux/bug.h \
+ include/linux/completion.h \
+ include/linux/debugobjects.h \
+ $(wildcard include/config/debug/objects.h) \
+ $(wildcard include/config/debug/objects/free.h) \
+ include/linux/rcutree.h \
+ include/linux/topology.h \
+ $(wildcard include/config/sched/smt.h) \
+ $(wildcard include/config/sched/mc.h) \
+ $(wildcard include/config/sched/book.h) \
+ $(wildcard include/config/use/percpu/numa/node/id.h) \
+ include/linux/smp.h \
+ $(wildcard include/config/use/generic/smp/helpers.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/smp.h \
+ $(wildcard include/config/otzone/async/notify/support.h) \
+ include/linux/percpu.h \
+ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \
+ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \
+ $(wildcard include/config/have/setup/per/cpu/area.h) \
+ include/linux/pfn.h \
+ arch/arm/include/generated/asm/percpu.h \
+ include/asm-generic/percpu.h \
+ include/linux/percpu-defs.h \
+ $(wildcard include/config/debug/force/weak/per/cpu.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/topology.h \
+ $(wildcard include/config/arm/cpu/topology.h) \
+ include/asm-generic/topology.h \
+ include/linux/mmdebug.h \
+ $(wildcard include/config/debug/vm.h) \
+ $(wildcard include/config/debug/virtual.h) \
+ include/linux/workqueue.h \
+ $(wildcard include/config/debug/objects/work.h) \
+ $(wildcard include/config/freezer.h) \
+ include/linux/timer.h \
+ $(wildcard include/config/timer/stats.h) \
+ $(wildcard include/config/debug/objects/timers.h) \
+ include/linux/ktime.h \
+ $(wildcard include/config/ktime/scalar.h) \
+ include/linux/jiffies.h \
+ include/linux/timex.h \
+ include/linux/param.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/param.h \
+ $(wildcard include/config/hz.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/timex.h \
+ arch/arm/mach-wmt/include/mach/timex.h \
+ include/linux/sysctl.h \
+ $(wildcard include/config/sysctl.h) \
+ include/linux/rbtree.h \
+ include/linux/elf.h \
+ include/linux/elf-em.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/elf.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/user.h \
+ include/linux/kobject.h \
+ include/linux/sysfs.h \
+ include/linux/kobject_ns.h \
+ include/linux/kref.h \
+ include/linux/moduleparam.h \
+ $(wildcard include/config/alpha.h) \
+ $(wildcard include/config/ia64.h) \
+ $(wildcard include/config/ppc64.h) \
+ include/linux/tracepoint.h \
+ include/linux/static_key.h \
+ include/linux/jump_label.h \
+ $(wildcard include/config/jump/label.h) \
+ include/linux/export.h \
+ $(wildcard include/config/symbol/prefix.h) \
+ $(wildcard include/config/modversions.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/module.h \
+ $(wildcard include/config/arm/unwind.h) \
+ include/linux/vermagic.h \
+ include/generated/utsrelease.h \
+
+drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o: $(deps_drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o)
+
+$(deps_drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o):
diff --git a/drivers/media/video/wmt/encode/.g_wmt_ve_com.o.cmd b/drivers/media/video/wmt/encode/.g_wmt_ve_com.o.cmd
new file mode 100644
index 00000000..4b7862bd
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.g_wmt_ve_com.o.cmd
@@ -0,0 +1 @@
+cmd_drivers/media/video/wmt/encode/g_wmt_ve_com.o := arm_1103_le-ld -EL -r -o drivers/media/video/wmt/encode/g_wmt_ve_com.o drivers/media/video/wmt/encode/wmt-ve.o
diff --git a/drivers/media/video/wmt/encode/.g_wmt_ve_h264.ko.cmd b/drivers/media/video/wmt/encode/.g_wmt_ve_h264.ko.cmd
new file mode 100644
index 00000000..0512e11d
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.g_wmt_ve_h264.ko.cmd
@@ -0,0 +1 @@
+cmd_drivers/media/video/wmt/encode/g_wmt_ve_h264.ko := arm_1103_le-ld -EL -r -T /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/scripts/module-common.lds --build-id -o drivers/media/video/wmt/encode/g_wmt_ve_h264.ko drivers/media/video/wmt/encode/g_wmt_ve_h264.o drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o
diff --git a/drivers/media/video/wmt/encode/.g_wmt_ve_h264.mod.o.cmd b/drivers/media/video/wmt/encode/.g_wmt_ve_h264.mod.o.cmd
new file mode 100644
index 00000000..80a15823
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.g_wmt_ve_h264.mod.o.cmd
@@ -0,0 +1,371 @@
+cmd_drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o := arm_1103_le-gcc -Wp,-MD,drivers/media/video/wmt/encode/.g_wmt_ve_h264.mod.o.d -nostdinc -isystem /home/srikant/stuff/kernels/wm8880/apc-rock-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.2/include -I/home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include -Iarch/arm/include/generated -Iinclude -include /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-wmt/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -marm -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(g_wmt_ve_h264.mod)" -D"KBUILD_MODNAME=KBUILD_STR(g_wmt_ve_h264)" -DMODULE -c -o drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.c
+
+source_drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o := drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.c
+
+deps_drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o := \
+ $(wildcard include/config/module/unload.h) \
+ include/linux/module.h \
+ $(wildcard include/config/sysfs.h) \
+ $(wildcard include/config/modules.h) \
+ $(wildcard include/config/unused/symbols.h) \
+ $(wildcard include/config/generic/bug.h) \
+ $(wildcard include/config/kallsyms.h) \
+ $(wildcard include/config/smp.h) \
+ $(wildcard include/config/tracepoints.h) \
+ $(wildcard include/config/tracing.h) \
+ $(wildcard include/config/event/tracing.h) \
+ $(wildcard include/config/ftrace/mcount/record.h) \
+ $(wildcard include/config/constructors.h) \
+ $(wildcard include/config/debug/set/module/ronx.h) \
+ include/linux/list.h \
+ $(wildcard include/config/debug/list.h) \
+ include/linux/types.h \
+ $(wildcard include/config/uid16.h) \
+ $(wildcard include/config/lbdaf.h) \
+ $(wildcard include/config/arch/dma/addr/t/64bit.h) \
+ $(wildcard include/config/phys/addr/t/64bit.h) \
+ $(wildcard include/config/64bit.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/types.h \
+ include/asm-generic/int-ll64.h \
+ arch/arm/include/generated/asm/bitsperlong.h \
+ include/asm-generic/bitsperlong.h \
+ include/linux/posix_types.h \
+ include/linux/stddef.h \
+ include/linux/compiler.h \
+ $(wildcard include/config/sparse/rcu/pointer.h) \
+ $(wildcard include/config/trace/branch/profiling.h) \
+ $(wildcard include/config/profile/all/branches.h) \
+ $(wildcard include/config/enable/must/check.h) \
+ $(wildcard include/config/enable/warn/deprecated.h) \
+ include/linux/compiler-gcc.h \
+ $(wildcard include/config/arch/supports/optimized/inlining.h) \
+ $(wildcard include/config/optimize/inlining.h) \
+ include/linux/compiler-gcc4.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/posix_types.h \
+ include/asm-generic/posix_types.h \
+ include/linux/poison.h \
+ $(wildcard include/config/illegal/pointer/value.h) \
+ include/linux/const.h \
+ include/linux/stat.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/stat.h \
+ include/linux/time.h \
+ $(wildcard include/config/arch/uses/gettimeoffset.h) \
+ include/linux/cache.h \
+ $(wildcard include/config/arch/has/cache/line/size.h) \
+ include/linux/kernel.h \
+ $(wildcard include/config/preempt/voluntary.h) \
+ $(wildcard include/config/debug/atomic/sleep.h) \
+ $(wildcard include/config/prove/locking.h) \
+ $(wildcard include/config/ring/buffer.h) \
+ $(wildcard include/config/numa.h) \
+ $(wildcard include/config/compaction.h) \
+ include/linux/sysinfo.h \
+ /home/srikant/stuff/kernels/wm8880/apc-rock-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.2/include/stdarg.h \
+ include/linux/linkage.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/linkage.h \
+ include/linux/bitops.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/bitops.h \
+ include/linux/irqflags.h \
+ $(wildcard include/config/trace/irqflags.h) \
+ $(wildcard include/config/irqsoff/tracer.h) \
+ $(wildcard include/config/preempt/tracer.h) \
+ $(wildcard include/config/trace/irqflags/support.h) \
+ include/linux/typecheck.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/irqflags.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/ptrace.h \
+ $(wildcard include/config/cpu/endian/be8.h) \
+ $(wildcard include/config/arm/thumb.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/hwcap.h \
+ include/asm-generic/bitops/non-atomic.h \
+ include/asm-generic/bitops/fls64.h \
+ include/asm-generic/bitops/sched.h \
+ include/asm-generic/bitops/hweight.h \
+ include/asm-generic/bitops/arch_hweight.h \
+ include/asm-generic/bitops/const_hweight.h \
+ include/asm-generic/bitops/lock.h \
+ include/asm-generic/bitops/le.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/byteorder.h \
+ include/linux/byteorder/little_endian.h \
+ include/linux/swab.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/swab.h \
+ include/linux/byteorder/generic.h \
+ include/asm-generic/bitops/ext2-atomic-setbit.h \
+ include/linux/log2.h \
+ $(wildcard include/config/arch/has/ilog2/u32.h) \
+ $(wildcard include/config/arch/has/ilog2/u64.h) \
+ include/linux/printk.h \
+ $(wildcard include/config/printk.h) \
+ $(wildcard include/config/dynamic/debug.h) \
+ include/linux/init.h \
+ $(wildcard include/config/hotplug.h) \
+ include/linux/dynamic_debug.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/div64.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/compiler.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/bug.h \
+ $(wildcard include/config/bug.h) \
+ $(wildcard include/config/thumb2/kernel.h) \
+ $(wildcard include/config/debug/bugverbose.h) \
+ $(wildcard include/config/arm/lpae.h) \
+ include/asm-generic/bug.h \
+ $(wildcard include/config/generic/bug/relative/pointers.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/cache.h \
+ $(wildcard include/config/arm/l1/cache/shift.h) \
+ $(wildcard include/config/aeabi.h) \
+ include/linux/seqlock.h \
+ include/linux/spinlock.h \
+ $(wildcard include/config/debug/spinlock.h) \
+ $(wildcard include/config/generic/lockbreak.h) \
+ $(wildcard include/config/preempt.h) \
+ $(wildcard include/config/debug/lock/alloc.h) \
+ include/linux/preempt.h \
+ $(wildcard include/config/debug/preempt.h) \
+ $(wildcard include/config/preempt/count.h) \
+ $(wildcard include/config/preempt/notifiers.h) \
+ include/linux/thread_info.h \
+ $(wildcard include/config/compat.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/thread_info.h \
+ $(wildcard include/config/arm/thumbee.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/fpstate.h \
+ $(wildcard include/config/vfpv3.h) \
+ $(wildcard include/config/iwmmxt.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/domain.h \
+ $(wildcard include/config/io/36.h) \
+ $(wildcard include/config/cpu/use/domains.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/barrier.h \
+ $(wildcard include/config/cpu/32v6k.h) \
+ $(wildcard include/config/cpu/xsc3.h) \
+ $(wildcard include/config/cpu/fa526.h) \
+ $(wildcard include/config/arch/has/barriers.h) \
+ $(wildcard include/config/arm/dma/mem/bufferable.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/outercache.h \
+ $(wildcard include/config/outer/cache/sync.h) \
+ $(wildcard include/config/outer/cache.h) \
+ include/linux/stringify.h \
+ include/linux/bottom_half.h \
+ include/linux/spinlock_types.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/spinlock_types.h \
+ include/linux/lockdep.h \
+ $(wildcard include/config/lockdep.h) \
+ $(wildcard include/config/lock/stat.h) \
+ $(wildcard include/config/prove/rcu.h) \
+ include/linux/rwlock_types.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/spinlock.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/processor.h \
+ $(wildcard include/config/have/hw/breakpoint.h) \
+ $(wildcard include/config/mmu.h) \
+ $(wildcard include/config/arm/errata/754327.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/hw_breakpoint.h \
+ include/linux/rwlock.h \
+ include/linux/spinlock_api_smp.h \
+ $(wildcard include/config/inline/spin/lock.h) \
+ $(wildcard include/config/inline/spin/lock/bh.h) \
+ $(wildcard include/config/inline/spin/lock/irq.h) \
+ $(wildcard include/config/inline/spin/lock/irqsave.h) \
+ $(wildcard include/config/inline/spin/trylock.h) \
+ $(wildcard include/config/inline/spin/trylock/bh.h) \
+ $(wildcard include/config/uninline/spin/unlock.h) \
+ $(wildcard include/config/inline/spin/unlock/bh.h) \
+ $(wildcard include/config/inline/spin/unlock/irq.h) \
+ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \
+ include/linux/rwlock_api_smp.h \
+ $(wildcard include/config/inline/read/lock.h) \
+ $(wildcard include/config/inline/write/lock.h) \
+ $(wildcard include/config/inline/read/lock/bh.h) \
+ $(wildcard include/config/inline/write/lock/bh.h) \
+ $(wildcard include/config/inline/read/lock/irq.h) \
+ $(wildcard include/config/inline/write/lock/irq.h) \
+ $(wildcard include/config/inline/read/lock/irqsave.h) \
+ $(wildcard include/config/inline/write/lock/irqsave.h) \
+ $(wildcard include/config/inline/read/trylock.h) \
+ $(wildcard include/config/inline/write/trylock.h) \
+ $(wildcard include/config/inline/read/unlock.h) \
+ $(wildcard include/config/inline/write/unlock.h) \
+ $(wildcard include/config/inline/read/unlock/bh.h) \
+ $(wildcard include/config/inline/write/unlock/bh.h) \
+ $(wildcard include/config/inline/read/unlock/irq.h) \
+ $(wildcard include/config/inline/write/unlock/irq.h) \
+ $(wildcard include/config/inline/read/unlock/irqrestore.h) \
+ $(wildcard include/config/inline/write/unlock/irqrestore.h) \
+ include/linux/atomic.h \
+ $(wildcard include/config/arch/has/atomic/or.h) \
+ $(wildcard include/config/generic/atomic64.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/atomic.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/cmpxchg.h \
+ $(wildcard include/config/cpu/sa1100.h) \
+ $(wildcard include/config/cpu/sa110.h) \
+ $(wildcard include/config/cpu/v6.h) \
+ include/asm-generic/cmpxchg-local.h \
+ include/asm-generic/atomic-long.h \
+ include/linux/math64.h \
+ include/linux/kmod.h \
+ include/linux/gfp.h \
+ $(wildcard include/config/kmemcheck.h) \
+ $(wildcard include/config/highmem.h) \
+ $(wildcard include/config/zone/dma.h) \
+ $(wildcard include/config/zone/dma32.h) \
+ $(wildcard include/config/pm/sleep.h) \
+ include/linux/mmzone.h \
+ $(wildcard include/config/force/max/zoneorder.h) \
+ $(wildcard include/config/memory/hotplug.h) \
+ $(wildcard include/config/sparsemem.h) \
+ $(wildcard include/config/have/memblock/node/map.h) \
+ $(wildcard include/config/discontigmem.h) \
+ $(wildcard include/config/flat/node/mem/map.h) \
+ $(wildcard include/config/cgroup/mem/res/ctlr.h) \
+ $(wildcard include/config/no/bootmem.h) \
+ $(wildcard include/config/have/memory/present.h) \
+ $(wildcard include/config/have/memoryless/nodes.h) \
+ $(wildcard include/config/need/node/memmap/size.h) \
+ $(wildcard include/config/have/memblock/node.h) \
+ $(wildcard include/config/need/multiple/nodes.h) \
+ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \
+ $(wildcard include/config/flatmem.h) \
+ $(wildcard include/config/sparsemem/extreme.h) \
+ $(wildcard include/config/have/arch/pfn/valid.h) \
+ $(wildcard include/config/nodes/span/other/nodes.h) \
+ $(wildcard include/config/holes/in/zone.h) \
+ $(wildcard include/config/arch/has/holes/memorymodel.h) \
+ include/linux/wait.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/current.h \
+ include/linux/threads.h \
+ $(wildcard include/config/nr/cpus.h) \
+ $(wildcard include/config/base/small.h) \
+ include/linux/numa.h \
+ $(wildcard include/config/nodes/shift.h) \
+ include/linux/nodemask.h \
+ include/linux/bitmap.h \
+ include/linux/string.h \
+ $(wildcard include/config/binary/printf.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/string.h \
+ include/linux/pageblock-flags.h \
+ $(wildcard include/config/hugetlb/page.h) \
+ $(wildcard include/config/hugetlb/page/size/variable.h) \
+ include/generated/bounds.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/page.h \
+ $(wildcard include/config/cpu/copy/v3.h) \
+ $(wildcard include/config/cpu/copy/v4wt.h) \
+ $(wildcard include/config/cpu/copy/v4wb.h) \
+ $(wildcard include/config/cpu/copy/feroceon.h) \
+ $(wildcard include/config/cpu/copy/fa.h) \
+ $(wildcard include/config/cpu/xscale.h) \
+ $(wildcard include/config/cpu/copy/v6.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/glue.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/pgtable-2level-types.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/memory.h \
+ $(wildcard include/config/need/mach/memory/h.h) \
+ $(wildcard include/config/page/offset.h) \
+ $(wildcard include/config/dram/size.h) \
+ $(wildcard include/config/dram/base.h) \
+ $(wildcard include/config/have/tcm.h) \
+ $(wildcard include/config/arm/patch/phys/virt.h) \
+ $(wildcard include/config/phys/offset.h) \
+ arch/arm/include/generated/asm/sizes.h \
+ include/asm-generic/sizes.h \
+ include/asm-generic/memory_model.h \
+ $(wildcard include/config/sparsemem/vmemmap.h) \
+ include/asm-generic/getorder.h \
+ include/linux/memory_hotplug.h \
+ $(wildcard include/config/memory/hotremove.h) \
+ $(wildcard include/config/have/arch/nodedata/extension.h) \
+ include/linux/notifier.h \
+ include/linux/errno.h \
+ arch/arm/include/generated/asm/errno.h \
+ include/asm-generic/errno.h \
+ include/asm-generic/errno-base.h \
+ include/linux/mutex.h \
+ $(wildcard include/config/debug/mutexes.h) \
+ $(wildcard include/config/have/arch/mutex/cpu/relax.h) \
+ include/linux/rwsem.h \
+ $(wildcard include/config/rwsem/generic/spinlock.h) \
+ include/linux/rwsem-spinlock.h \
+ include/linux/srcu.h \
+ include/linux/rcupdate.h \
+ $(wildcard include/config/rcu/torture/test.h) \
+ $(wildcard include/config/tree/rcu.h) \
+ $(wildcard include/config/tree/preempt/rcu.h) \
+ $(wildcard include/config/rcu/trace.h) \
+ $(wildcard include/config/preempt/rcu.h) \
+ $(wildcard include/config/tiny/rcu.h) \
+ $(wildcard include/config/tiny/preempt/rcu.h) \
+ $(wildcard include/config/debug/objects/rcu/head.h) \
+ $(wildcard include/config/hotplug/cpu.h) \
+ $(wildcard include/config/preempt/rt.h) \
+ include/linux/cpumask.h \
+ $(wildcard include/config/cpumask/offstack.h) \
+ $(wildcard include/config/debug/per/cpu/maps.h) \
+ $(wildcard include/config/disable/obsolete/cpumask/functions.h) \
+ include/linux/bug.h \
+ include/linux/completion.h \
+ include/linux/debugobjects.h \
+ $(wildcard include/config/debug/objects.h) \
+ $(wildcard include/config/debug/objects/free.h) \
+ include/linux/rcutree.h \
+ include/linux/topology.h \
+ $(wildcard include/config/sched/smt.h) \
+ $(wildcard include/config/sched/mc.h) \
+ $(wildcard include/config/sched/book.h) \
+ $(wildcard include/config/use/percpu/numa/node/id.h) \
+ include/linux/smp.h \
+ $(wildcard include/config/use/generic/smp/helpers.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/smp.h \
+ $(wildcard include/config/otzone/async/notify/support.h) \
+ include/linux/percpu.h \
+ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \
+ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \
+ $(wildcard include/config/have/setup/per/cpu/area.h) \
+ include/linux/pfn.h \
+ arch/arm/include/generated/asm/percpu.h \
+ include/asm-generic/percpu.h \
+ include/linux/percpu-defs.h \
+ $(wildcard include/config/debug/force/weak/per/cpu.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/topology.h \
+ $(wildcard include/config/arm/cpu/topology.h) \
+ include/asm-generic/topology.h \
+ include/linux/mmdebug.h \
+ $(wildcard include/config/debug/vm.h) \
+ $(wildcard include/config/debug/virtual.h) \
+ include/linux/workqueue.h \
+ $(wildcard include/config/debug/objects/work.h) \
+ $(wildcard include/config/freezer.h) \
+ include/linux/timer.h \
+ $(wildcard include/config/timer/stats.h) \
+ $(wildcard include/config/debug/objects/timers.h) \
+ include/linux/ktime.h \
+ $(wildcard include/config/ktime/scalar.h) \
+ include/linux/jiffies.h \
+ include/linux/timex.h \
+ include/linux/param.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/param.h \
+ $(wildcard include/config/hz.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/timex.h \
+ arch/arm/mach-wmt/include/mach/timex.h \
+ include/linux/sysctl.h \
+ $(wildcard include/config/sysctl.h) \
+ include/linux/rbtree.h \
+ include/linux/elf.h \
+ include/linux/elf-em.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/elf.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/user.h \
+ include/linux/kobject.h \
+ include/linux/sysfs.h \
+ include/linux/kobject_ns.h \
+ include/linux/kref.h \
+ include/linux/moduleparam.h \
+ $(wildcard include/config/alpha.h) \
+ $(wildcard include/config/ia64.h) \
+ $(wildcard include/config/ppc64.h) \
+ include/linux/tracepoint.h \
+ include/linux/static_key.h \
+ include/linux/jump_label.h \
+ $(wildcard include/config/jump/label.h) \
+ include/linux/export.h \
+ $(wildcard include/config/symbol/prefix.h) \
+ $(wildcard include/config/modversions.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/module.h \
+ $(wildcard include/config/arm/unwind.h) \
+ include/linux/vermagic.h \
+ include/generated/utsrelease.h \
+
+drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o: $(deps_drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o)
+
+$(deps_drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o):
diff --git a/drivers/media/video/wmt/encode/.g_wmt_ve_h264.o.cmd b/drivers/media/video/wmt/encode/.g_wmt_ve_h264.o.cmd
new file mode 100644
index 00000000..d839af42
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.g_wmt_ve_h264.o.cmd
@@ -0,0 +1 @@
+cmd_drivers/media/video/wmt/encode/g_wmt_ve_h264.o := arm_1103_le-ld -EL -r -o drivers/media/video/wmt/encode/g_wmt_ve_h264.o drivers/media/video/wmt/encode/h264/wmt-h264enc.o drivers/media/video/wmt/encode/h264/header.o drivers/media/video/wmt/encode/h264/vlc.o
diff --git a/drivers/media/video/wmt/encode/.g_wmt_ve_jenc.ko.cmd b/drivers/media/video/wmt/encode/.g_wmt_ve_jenc.ko.cmd
new file mode 100644
index 00000000..8d46c76c
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.g_wmt_ve_jenc.ko.cmd
@@ -0,0 +1 @@
+cmd_drivers/media/video/wmt/encode/g_wmt_ve_jenc.ko := arm_1103_le-ld -EL -r -T /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/scripts/module-common.lds --build-id -o drivers/media/video/wmt/encode/g_wmt_ve_jenc.ko drivers/media/video/wmt/encode/g_wmt_ve_jenc.o drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o
diff --git a/drivers/media/video/wmt/encode/.g_wmt_ve_jenc.mod.o.cmd b/drivers/media/video/wmt/encode/.g_wmt_ve_jenc.mod.o.cmd
new file mode 100644
index 00000000..6b6eaa49
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.g_wmt_ve_jenc.mod.o.cmd
@@ -0,0 +1,371 @@
+cmd_drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o := arm_1103_le-gcc -Wp,-MD,drivers/media/video/wmt/encode/.g_wmt_ve_jenc.mod.o.d -nostdinc -isystem /home/srikant/stuff/kernels/wm8880/apc-rock-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.2/include -I/home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include -Iarch/arm/include/generated -Iinclude -include /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-wmt/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -marm -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(g_wmt_ve_jenc.mod)" -D"KBUILD_MODNAME=KBUILD_STR(g_wmt_ve_jenc)" -DMODULE -c -o drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.c
+
+source_drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o := drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.c
+
+deps_drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o := \
+ $(wildcard include/config/module/unload.h) \
+ include/linux/module.h \
+ $(wildcard include/config/sysfs.h) \
+ $(wildcard include/config/modules.h) \
+ $(wildcard include/config/unused/symbols.h) \
+ $(wildcard include/config/generic/bug.h) \
+ $(wildcard include/config/kallsyms.h) \
+ $(wildcard include/config/smp.h) \
+ $(wildcard include/config/tracepoints.h) \
+ $(wildcard include/config/tracing.h) \
+ $(wildcard include/config/event/tracing.h) \
+ $(wildcard include/config/ftrace/mcount/record.h) \
+ $(wildcard include/config/constructors.h) \
+ $(wildcard include/config/debug/set/module/ronx.h) \
+ include/linux/list.h \
+ $(wildcard include/config/debug/list.h) \
+ include/linux/types.h \
+ $(wildcard include/config/uid16.h) \
+ $(wildcard include/config/lbdaf.h) \
+ $(wildcard include/config/arch/dma/addr/t/64bit.h) \
+ $(wildcard include/config/phys/addr/t/64bit.h) \
+ $(wildcard include/config/64bit.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/types.h \
+ include/asm-generic/int-ll64.h \
+ arch/arm/include/generated/asm/bitsperlong.h \
+ include/asm-generic/bitsperlong.h \
+ include/linux/posix_types.h \
+ include/linux/stddef.h \
+ include/linux/compiler.h \
+ $(wildcard include/config/sparse/rcu/pointer.h) \
+ $(wildcard include/config/trace/branch/profiling.h) \
+ $(wildcard include/config/profile/all/branches.h) \
+ $(wildcard include/config/enable/must/check.h) \
+ $(wildcard include/config/enable/warn/deprecated.h) \
+ include/linux/compiler-gcc.h \
+ $(wildcard include/config/arch/supports/optimized/inlining.h) \
+ $(wildcard include/config/optimize/inlining.h) \
+ include/linux/compiler-gcc4.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/posix_types.h \
+ include/asm-generic/posix_types.h \
+ include/linux/poison.h \
+ $(wildcard include/config/illegal/pointer/value.h) \
+ include/linux/const.h \
+ include/linux/stat.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/stat.h \
+ include/linux/time.h \
+ $(wildcard include/config/arch/uses/gettimeoffset.h) \
+ include/linux/cache.h \
+ $(wildcard include/config/arch/has/cache/line/size.h) \
+ include/linux/kernel.h \
+ $(wildcard include/config/preempt/voluntary.h) \
+ $(wildcard include/config/debug/atomic/sleep.h) \
+ $(wildcard include/config/prove/locking.h) \
+ $(wildcard include/config/ring/buffer.h) \
+ $(wildcard include/config/numa.h) \
+ $(wildcard include/config/compaction.h) \
+ include/linux/sysinfo.h \
+ /home/srikant/stuff/kernels/wm8880/apc-rock-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.2/include/stdarg.h \
+ include/linux/linkage.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/linkage.h \
+ include/linux/bitops.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/bitops.h \
+ include/linux/irqflags.h \
+ $(wildcard include/config/trace/irqflags.h) \
+ $(wildcard include/config/irqsoff/tracer.h) \
+ $(wildcard include/config/preempt/tracer.h) \
+ $(wildcard include/config/trace/irqflags/support.h) \
+ include/linux/typecheck.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/irqflags.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/ptrace.h \
+ $(wildcard include/config/cpu/endian/be8.h) \
+ $(wildcard include/config/arm/thumb.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/hwcap.h \
+ include/asm-generic/bitops/non-atomic.h \
+ include/asm-generic/bitops/fls64.h \
+ include/asm-generic/bitops/sched.h \
+ include/asm-generic/bitops/hweight.h \
+ include/asm-generic/bitops/arch_hweight.h \
+ include/asm-generic/bitops/const_hweight.h \
+ include/asm-generic/bitops/lock.h \
+ include/asm-generic/bitops/le.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/byteorder.h \
+ include/linux/byteorder/little_endian.h \
+ include/linux/swab.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/swab.h \
+ include/linux/byteorder/generic.h \
+ include/asm-generic/bitops/ext2-atomic-setbit.h \
+ include/linux/log2.h \
+ $(wildcard include/config/arch/has/ilog2/u32.h) \
+ $(wildcard include/config/arch/has/ilog2/u64.h) \
+ include/linux/printk.h \
+ $(wildcard include/config/printk.h) \
+ $(wildcard include/config/dynamic/debug.h) \
+ include/linux/init.h \
+ $(wildcard include/config/hotplug.h) \
+ include/linux/dynamic_debug.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/div64.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/compiler.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/bug.h \
+ $(wildcard include/config/bug.h) \
+ $(wildcard include/config/thumb2/kernel.h) \
+ $(wildcard include/config/debug/bugverbose.h) \
+ $(wildcard include/config/arm/lpae.h) \
+ include/asm-generic/bug.h \
+ $(wildcard include/config/generic/bug/relative/pointers.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/cache.h \
+ $(wildcard include/config/arm/l1/cache/shift.h) \
+ $(wildcard include/config/aeabi.h) \
+ include/linux/seqlock.h \
+ include/linux/spinlock.h \
+ $(wildcard include/config/debug/spinlock.h) \
+ $(wildcard include/config/generic/lockbreak.h) \
+ $(wildcard include/config/preempt.h) \
+ $(wildcard include/config/debug/lock/alloc.h) \
+ include/linux/preempt.h \
+ $(wildcard include/config/debug/preempt.h) \
+ $(wildcard include/config/preempt/count.h) \
+ $(wildcard include/config/preempt/notifiers.h) \
+ include/linux/thread_info.h \
+ $(wildcard include/config/compat.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/thread_info.h \
+ $(wildcard include/config/arm/thumbee.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/fpstate.h \
+ $(wildcard include/config/vfpv3.h) \
+ $(wildcard include/config/iwmmxt.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/domain.h \
+ $(wildcard include/config/io/36.h) \
+ $(wildcard include/config/cpu/use/domains.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/barrier.h \
+ $(wildcard include/config/cpu/32v6k.h) \
+ $(wildcard include/config/cpu/xsc3.h) \
+ $(wildcard include/config/cpu/fa526.h) \
+ $(wildcard include/config/arch/has/barriers.h) \
+ $(wildcard include/config/arm/dma/mem/bufferable.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/outercache.h \
+ $(wildcard include/config/outer/cache/sync.h) \
+ $(wildcard include/config/outer/cache.h) \
+ include/linux/stringify.h \
+ include/linux/bottom_half.h \
+ include/linux/spinlock_types.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/spinlock_types.h \
+ include/linux/lockdep.h \
+ $(wildcard include/config/lockdep.h) \
+ $(wildcard include/config/lock/stat.h) \
+ $(wildcard include/config/prove/rcu.h) \
+ include/linux/rwlock_types.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/spinlock.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/processor.h \
+ $(wildcard include/config/have/hw/breakpoint.h) \
+ $(wildcard include/config/mmu.h) \
+ $(wildcard include/config/arm/errata/754327.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/hw_breakpoint.h \
+ include/linux/rwlock.h \
+ include/linux/spinlock_api_smp.h \
+ $(wildcard include/config/inline/spin/lock.h) \
+ $(wildcard include/config/inline/spin/lock/bh.h) \
+ $(wildcard include/config/inline/spin/lock/irq.h) \
+ $(wildcard include/config/inline/spin/lock/irqsave.h) \
+ $(wildcard include/config/inline/spin/trylock.h) \
+ $(wildcard include/config/inline/spin/trylock/bh.h) \
+ $(wildcard include/config/uninline/spin/unlock.h) \
+ $(wildcard include/config/inline/spin/unlock/bh.h) \
+ $(wildcard include/config/inline/spin/unlock/irq.h) \
+ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \
+ include/linux/rwlock_api_smp.h \
+ $(wildcard include/config/inline/read/lock.h) \
+ $(wildcard include/config/inline/write/lock.h) \
+ $(wildcard include/config/inline/read/lock/bh.h) \
+ $(wildcard include/config/inline/write/lock/bh.h) \
+ $(wildcard include/config/inline/read/lock/irq.h) \
+ $(wildcard include/config/inline/write/lock/irq.h) \
+ $(wildcard include/config/inline/read/lock/irqsave.h) \
+ $(wildcard include/config/inline/write/lock/irqsave.h) \
+ $(wildcard include/config/inline/read/trylock.h) \
+ $(wildcard include/config/inline/write/trylock.h) \
+ $(wildcard include/config/inline/read/unlock.h) \
+ $(wildcard include/config/inline/write/unlock.h) \
+ $(wildcard include/config/inline/read/unlock/bh.h) \
+ $(wildcard include/config/inline/write/unlock/bh.h) \
+ $(wildcard include/config/inline/read/unlock/irq.h) \
+ $(wildcard include/config/inline/write/unlock/irq.h) \
+ $(wildcard include/config/inline/read/unlock/irqrestore.h) \
+ $(wildcard include/config/inline/write/unlock/irqrestore.h) \
+ include/linux/atomic.h \
+ $(wildcard include/config/arch/has/atomic/or.h) \
+ $(wildcard include/config/generic/atomic64.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/atomic.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/cmpxchg.h \
+ $(wildcard include/config/cpu/sa1100.h) \
+ $(wildcard include/config/cpu/sa110.h) \
+ $(wildcard include/config/cpu/v6.h) \
+ include/asm-generic/cmpxchg-local.h \
+ include/asm-generic/atomic-long.h \
+ include/linux/math64.h \
+ include/linux/kmod.h \
+ include/linux/gfp.h \
+ $(wildcard include/config/kmemcheck.h) \
+ $(wildcard include/config/highmem.h) \
+ $(wildcard include/config/zone/dma.h) \
+ $(wildcard include/config/zone/dma32.h) \
+ $(wildcard include/config/pm/sleep.h) \
+ include/linux/mmzone.h \
+ $(wildcard include/config/force/max/zoneorder.h) \
+ $(wildcard include/config/memory/hotplug.h) \
+ $(wildcard include/config/sparsemem.h) \
+ $(wildcard include/config/have/memblock/node/map.h) \
+ $(wildcard include/config/discontigmem.h) \
+ $(wildcard include/config/flat/node/mem/map.h) \
+ $(wildcard include/config/cgroup/mem/res/ctlr.h) \
+ $(wildcard include/config/no/bootmem.h) \
+ $(wildcard include/config/have/memory/present.h) \
+ $(wildcard include/config/have/memoryless/nodes.h) \
+ $(wildcard include/config/need/node/memmap/size.h) \
+ $(wildcard include/config/have/memblock/node.h) \
+ $(wildcard include/config/need/multiple/nodes.h) \
+ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \
+ $(wildcard include/config/flatmem.h) \
+ $(wildcard include/config/sparsemem/extreme.h) \
+ $(wildcard include/config/have/arch/pfn/valid.h) \
+ $(wildcard include/config/nodes/span/other/nodes.h) \
+ $(wildcard include/config/holes/in/zone.h) \
+ $(wildcard include/config/arch/has/holes/memorymodel.h) \
+ include/linux/wait.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/current.h \
+ include/linux/threads.h \
+ $(wildcard include/config/nr/cpus.h) \
+ $(wildcard include/config/base/small.h) \
+ include/linux/numa.h \
+ $(wildcard include/config/nodes/shift.h) \
+ include/linux/nodemask.h \
+ include/linux/bitmap.h \
+ include/linux/string.h \
+ $(wildcard include/config/binary/printf.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/string.h \
+ include/linux/pageblock-flags.h \
+ $(wildcard include/config/hugetlb/page.h) \
+ $(wildcard include/config/hugetlb/page/size/variable.h) \
+ include/generated/bounds.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/page.h \
+ $(wildcard include/config/cpu/copy/v3.h) \
+ $(wildcard include/config/cpu/copy/v4wt.h) \
+ $(wildcard include/config/cpu/copy/v4wb.h) \
+ $(wildcard include/config/cpu/copy/feroceon.h) \
+ $(wildcard include/config/cpu/copy/fa.h) \
+ $(wildcard include/config/cpu/xscale.h) \
+ $(wildcard include/config/cpu/copy/v6.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/glue.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/pgtable-2level-types.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/memory.h \
+ $(wildcard include/config/need/mach/memory/h.h) \
+ $(wildcard include/config/page/offset.h) \
+ $(wildcard include/config/dram/size.h) \
+ $(wildcard include/config/dram/base.h) \
+ $(wildcard include/config/have/tcm.h) \
+ $(wildcard include/config/arm/patch/phys/virt.h) \
+ $(wildcard include/config/phys/offset.h) \
+ arch/arm/include/generated/asm/sizes.h \
+ include/asm-generic/sizes.h \
+ include/asm-generic/memory_model.h \
+ $(wildcard include/config/sparsemem/vmemmap.h) \
+ include/asm-generic/getorder.h \
+ include/linux/memory_hotplug.h \
+ $(wildcard include/config/memory/hotremove.h) \
+ $(wildcard include/config/have/arch/nodedata/extension.h) \
+ include/linux/notifier.h \
+ include/linux/errno.h \
+ arch/arm/include/generated/asm/errno.h \
+ include/asm-generic/errno.h \
+ include/asm-generic/errno-base.h \
+ include/linux/mutex.h \
+ $(wildcard include/config/debug/mutexes.h) \
+ $(wildcard include/config/have/arch/mutex/cpu/relax.h) \
+ include/linux/rwsem.h \
+ $(wildcard include/config/rwsem/generic/spinlock.h) \
+ include/linux/rwsem-spinlock.h \
+ include/linux/srcu.h \
+ include/linux/rcupdate.h \
+ $(wildcard include/config/rcu/torture/test.h) \
+ $(wildcard include/config/tree/rcu.h) \
+ $(wildcard include/config/tree/preempt/rcu.h) \
+ $(wildcard include/config/rcu/trace.h) \
+ $(wildcard include/config/preempt/rcu.h) \
+ $(wildcard include/config/tiny/rcu.h) \
+ $(wildcard include/config/tiny/preempt/rcu.h) \
+ $(wildcard include/config/debug/objects/rcu/head.h) \
+ $(wildcard include/config/hotplug/cpu.h) \
+ $(wildcard include/config/preempt/rt.h) \
+ include/linux/cpumask.h \
+ $(wildcard include/config/cpumask/offstack.h) \
+ $(wildcard include/config/debug/per/cpu/maps.h) \
+ $(wildcard include/config/disable/obsolete/cpumask/functions.h) \
+ include/linux/bug.h \
+ include/linux/completion.h \
+ include/linux/debugobjects.h \
+ $(wildcard include/config/debug/objects.h) \
+ $(wildcard include/config/debug/objects/free.h) \
+ include/linux/rcutree.h \
+ include/linux/topology.h \
+ $(wildcard include/config/sched/smt.h) \
+ $(wildcard include/config/sched/mc.h) \
+ $(wildcard include/config/sched/book.h) \
+ $(wildcard include/config/use/percpu/numa/node/id.h) \
+ include/linux/smp.h \
+ $(wildcard include/config/use/generic/smp/helpers.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/smp.h \
+ $(wildcard include/config/otzone/async/notify/support.h) \
+ include/linux/percpu.h \
+ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \
+ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \
+ $(wildcard include/config/have/setup/per/cpu/area.h) \
+ include/linux/pfn.h \
+ arch/arm/include/generated/asm/percpu.h \
+ include/asm-generic/percpu.h \
+ include/linux/percpu-defs.h \
+ $(wildcard include/config/debug/force/weak/per/cpu.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/topology.h \
+ $(wildcard include/config/arm/cpu/topology.h) \
+ include/asm-generic/topology.h \
+ include/linux/mmdebug.h \
+ $(wildcard include/config/debug/vm.h) \
+ $(wildcard include/config/debug/virtual.h) \
+ include/linux/workqueue.h \
+ $(wildcard include/config/debug/objects/work.h) \
+ $(wildcard include/config/freezer.h) \
+ include/linux/timer.h \
+ $(wildcard include/config/timer/stats.h) \
+ $(wildcard include/config/debug/objects/timers.h) \
+ include/linux/ktime.h \
+ $(wildcard include/config/ktime/scalar.h) \
+ include/linux/jiffies.h \
+ include/linux/timex.h \
+ include/linux/param.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/param.h \
+ $(wildcard include/config/hz.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/timex.h \
+ arch/arm/mach-wmt/include/mach/timex.h \
+ include/linux/sysctl.h \
+ $(wildcard include/config/sysctl.h) \
+ include/linux/rbtree.h \
+ include/linux/elf.h \
+ include/linux/elf-em.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/elf.h \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/user.h \
+ include/linux/kobject.h \
+ include/linux/sysfs.h \
+ include/linux/kobject_ns.h \
+ include/linux/kref.h \
+ include/linux/moduleparam.h \
+ $(wildcard include/config/alpha.h) \
+ $(wildcard include/config/ia64.h) \
+ $(wildcard include/config/ppc64.h) \
+ include/linux/tracepoint.h \
+ include/linux/static_key.h \
+ include/linux/jump_label.h \
+ $(wildcard include/config/jump/label.h) \
+ include/linux/export.h \
+ $(wildcard include/config/symbol/prefix.h) \
+ $(wildcard include/config/modversions.h) \
+ /home/srikant/stuff/wm8880-stuff/wm8880_4_4_kernel/ANDROID_3.4.5/arch/arm/include/asm/module.h \
+ $(wildcard include/config/arm/unwind.h) \
+ include/linux/vermagic.h \
+ include/generated/utsrelease.h \
+
+drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o: $(deps_drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o)
+
+$(deps_drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o):
diff --git a/drivers/media/video/wmt/encode/.g_wmt_ve_jenc.o.cmd b/drivers/media/video/wmt/encode/.g_wmt_ve_jenc.o.cmd
new file mode 100644
index 00000000..9760811a
--- /dev/null
+++ b/drivers/media/video/wmt/encode/.g_wmt_ve_jenc.o.cmd
@@ -0,0 +1 @@
+cmd_drivers/media/video/wmt/encode/g_wmt_ve_jenc.o := arm_1103_le-ld -EL -r -o drivers/media/video/wmt/encode/g_wmt_ve_jenc.o drivers/media/video/wmt/encode/jpeg/hw-jenc.o drivers/media/video/wmt/encode/jpeg/wmt-jenc.o
diff --git a/drivers/media/video/wmt/encode/Kconfig b/drivers/media/video/wmt/encode/Kconfig
new file mode 100755
index 00000000..f79a822d
--- /dev/null
+++ b/drivers/media/video/wmt/encode/Kconfig
@@ -0,0 +1,15 @@
+#
+# Multimedia Video device configuration
+#
+
+
+config WMT_VIDEO_ENCODE_H264
+ tristate "WonderMedia Hardware H264 encoder"
+ ---help---
+ Say Y here to use hardware to encode H264 files
+
+config WMT_VIDEO_ENCODE_JPEG
+ tristate "WonderMedia Hardware JPEG encoder"
+ ---help---
+ Say Y here to use hardware to encode JPEG image
+ \ No newline at end of file
diff --git a/drivers/media/video/wmt/encode/Makefile b/drivers/media/video/wmt/encode/Makefile
new file mode 100755
index 00000000..b107ce1a
--- /dev/null
+++ b/drivers/media/video/wmt/encode/Makefile
@@ -0,0 +1,11 @@
+#
+# Makefile for the video encode device drivers.
+#
+
+g_wmt_ve_com-y := wmt-ve.o
+g_wmt_ve_h264-y := h264/wmt-h264enc.o h264/header.o h264/vlc.o
+g_wmt_ve_jenc-y := jpeg/hw-jenc.o jpeg/wmt-jenc.o
+
+obj-$(CONFIG_WMT_VIDEO_ENCODE) += g_wmt_ve_com.o
+obj-$(CONFIG_WMT_VIDEO_ENCODE_H264) += g_wmt_ve_h264.o
+obj-$(CONFIG_WMT_VIDEO_ENCODE_H264) += g_wmt_ve_jenc.o
diff --git a/drivers/media/video/wmt/encode/built-in.o b/drivers/media/video/wmt/encode/built-in.o
new file mode 100644
index 00000000..8b277f0d
--- /dev/null
+++ b/drivers/media/video/wmt/encode/built-in.o
@@ -0,0 +1 @@
+!<arch>
diff --git a/drivers/media/video/wmt/encode/g_wmt_ve_com.mod.c b/drivers/media/video/wmt/encode/g_wmt_ve_com.mod.c
new file mode 100644
index 00000000..0a64292d
--- /dev/null
+++ b/drivers/media/video/wmt/encode/g_wmt_ve_com.mod.c
@@ -0,0 +1,54 @@
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = KBUILD_MODNAME,
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+ .arch = MODULE_ARCH_INIT,
+};
+
+MODULE_INFO(intree, "Y");
+
+static const struct modversion_info ____versions[]
+__used
+__attribute__((section("__versions"))) = {
+ { 0x57a42d88, "module_layout" },
+ { 0xb509ece8, "cdev_alloc" },
+ { 0x8888fdc7, "cdev_del" },
+ { 0x193eaea8, "cdev_init" },
+ { 0xd8e484f0, "register_chrdev_region" },
+ { 0xdcefeadd, "device_destroy" },
+ { 0xb91cfb43, "platform_bus_type" },
+ { 0x7485e15e, "unregister_chrdev_region" },
+ { 0x74c97f9c, "_raw_spin_unlock_irqrestore" },
+ { 0x27e1a049, "printk" },
+ { 0x95687190, "dma_free_coherent" },
+ { 0x609a1f02, "down" },
+ { 0xfb2dff80, "device_create" },
+ { 0x4c6a3efe, "platform_device_unregister" },
+ { 0x2072ee9b, "request_threaded_irq" },
+ { 0x8c22622f, "platform_driver_register" },
+ { 0x29f8b407, "dma_alloc_coherent" },
+ { 0xb39b257, "cdev_add" },
+ { 0xc5433fa, "platform_device_register" },
+ { 0x8e2e7ff8, "create_proc_entry" },
+ { 0xbd7083bc, "_raw_spin_lock_irqsave" },
+ { 0x2eb22412, "up" },
+ { 0x27d66eb3, "class_destroy" },
+ { 0xc23dbae6, "platform_driver_unregister" },
+ { 0x9cadc595, "__class_create" },
+ { 0xf20dabd8, "free_irq" },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=";
+
diff --git a/drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o b/drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o
new file mode 100644
index 00000000..a9559053
--- /dev/null
+++ b/drivers/media/video/wmt/encode/g_wmt_ve_com.mod.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/g_wmt_ve_com.o b/drivers/media/video/wmt/encode/g_wmt_ve_com.o
new file mode 100644
index 00000000..24435675
--- /dev/null
+++ b/drivers/media/video/wmt/encode/g_wmt_ve_com.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.c b/drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.c
new file mode 100644
index 00000000..1dcc85e0
--- /dev/null
+++ b/drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.c
@@ -0,0 +1,64 @@
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = KBUILD_MODNAME,
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+ .arch = MODULE_ARCH_INIT,
+};
+
+MODULE_INFO(intree, "Y");
+
+static const struct modversion_info ____versions[]
+__used
+__attribute__((section("__versions"))) = {
+ { 0x57a42d88, "module_layout" },
+ { 0x8d028e48, "wmt_codec_timer_start" },
+ { 0xff178f6, "__aeabi_idivmod" },
+ { 0x17a142df, "__copy_from_user" },
+ { 0x4dca3e92, "wmt_ve_register" },
+ { 0x311b7963, "_raw_spin_unlock" },
+ { 0x98082893, "__copy_to_user" },
+ { 0xc8b57c27, "autoremove_wake_function" },
+ { 0xe2f241de, "wmt_codec_timer_stop" },
+ { 0xd63e03ec, "mb_do_free" },
+ { 0xcc3bef4d, "wmt_codec_timer_init" },
+ { 0x7f4c1551, "wmt_codec_write_prd" },
+ { 0xf3a8558d, "wmt_ve_unregister" },
+ { 0xfa2a45e, "__memzero" },
+ { 0x74c97f9c, "_raw_spin_unlock_irqrestore" },
+ { 0x27e1a049, "printk" },
+ { 0x89237345, "mb_do_phys_to_virt" },
+ { 0x2196324, "__aeabi_idiv" },
+ { 0x6e5ef1f4, "wmt_codec_msvd_reset" },
+ { 0x375d4852, "wmt_ve_free_sram" },
+ { 0xab4bc36c, "wmt_ve_request_sram" },
+ { 0x8fda82cc, "module_put" },
+ { 0xc2018d04, "wmt_codec_pmc_ctl" },
+ { 0x3bd1b1f6, "msecs_to_jiffies" },
+ { 0xd62c833f, "schedule_timeout" },
+ { 0xc2161e33, "_raw_spin_lock" },
+ { 0xbd7083bc, "_raw_spin_lock_irqsave" },
+ { 0x72542c85, "__wake_up" },
+ { 0x425456c9, "cpu_cache" },
+ { 0x2aca9e60, "wmt_codec_timer_exit" },
+ { 0x9d669763, "memcpy" },
+ { 0x32f80ea9, "prepare_to_wait" },
+ { 0xf83178bd, "finish_wait" },
+ { 0x75349d4a, "mb_do_alloc" },
+ { 0xac8f37b2, "outer_cache" },
+ { 0xd5d62366, "wmt_codec_clock_en" },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=g_wmt_vd_com,g_wmt_ve_com";
+
diff --git a/drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o b/drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o
new file mode 100644
index 00000000..1c12542d
--- /dev/null
+++ b/drivers/media/video/wmt/encode/g_wmt_ve_h264.mod.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/g_wmt_ve_h264.o b/drivers/media/video/wmt/encode/g_wmt_ve_h264.o
new file mode 100644
index 00000000..ee3c5b77
--- /dev/null
+++ b/drivers/media/video/wmt/encode/g_wmt_ve_h264.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.c b/drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.c
new file mode 100644
index 00000000..3529f83c
--- /dev/null
+++ b/drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.c
@@ -0,0 +1,69 @@
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = KBUILD_MODNAME,
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+ .arch = MODULE_ARCH_INIT,
+};
+
+MODULE_INFO(intree, "Y");
+
+static const struct modversion_info ____versions[]
+__used
+__attribute__((section("__versions"))) = {
+ { 0x57a42d88, "module_layout" },
+ { 0x8d028e48, "wmt_codec_timer_start" },
+ { 0x6ea2670a, "wmt_codec_dump_prd" },
+ { 0x1d122fd8, "kmalloc_caches" },
+ { 0x17a142df, "__copy_from_user" },
+ { 0x4dca3e92, "wmt_ve_register" },
+ { 0x98082893, "__copy_to_user" },
+ { 0xc8b57c27, "autoremove_wake_function" },
+ { 0xa56971f, "wmt_mmu_table_destroy" },
+ { 0xe2f241de, "wmt_codec_timer_stop" },
+ { 0xd63e03ec, "mb_do_free" },
+ { 0xcc3bef4d, "wmt_codec_timer_init" },
+ { 0x7f4c1551, "wmt_codec_write_prd" },
+ { 0xf3a8558d, "wmt_ve_unregister" },
+ { 0x4467122a, "__init_waitqueue_head" },
+ { 0xe707d823, "__aeabi_uidiv" },
+ { 0xfa2a45e, "__memzero" },
+ { 0x27e1a049, "printk" },
+ { 0x89237345, "mb_do_phys_to_virt" },
+ { 0x606db7f2, "wmt_codec_unlock" },
+ { 0x2072ee9b, "request_threaded_irq" },
+ { 0x2196324, "__aeabi_idiv" },
+ { 0x6e5ef1f4, "wmt_codec_msvd_reset" },
+ { 0x375d4852, "wmt_ve_free_sram" },
+ { 0xab4bc36c, "wmt_ve_request_sram" },
+ { 0xe87acce2, "kmem_cache_alloc" },
+ { 0x64a7627d, "wmt_mmu_table_create" },
+ { 0xc2018d04, "wmt_codec_pmc_ctl" },
+ { 0x3bd1b1f6, "msecs_to_jiffies" },
+ { 0xd62c833f, "schedule_timeout" },
+ { 0x72542c85, "__wake_up" },
+ { 0x425456c9, "cpu_cache" },
+ { 0x2aca9e60, "wmt_codec_timer_exit" },
+ { 0x37a0cba, "kfree" },
+ { 0xa0fde0d9, "wmt_codec_lock" },
+ { 0x32f80ea9, "prepare_to_wait" },
+ { 0xf83178bd, "finish_wait" },
+ { 0x75349d4a, "mb_do_alloc" },
+ { 0xac8f37b2, "outer_cache" },
+ { 0xd5d62366, "wmt_codec_clock_en" },
+ { 0xf20dabd8, "free_irq" },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=g_wmt_vd_com,g_wmt_ve_com";
+
diff --git a/drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o b/drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o
new file mode 100644
index 00000000..410d186b
--- /dev/null
+++ b/drivers/media/video/wmt/encode/g_wmt_ve_jenc.mod.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/g_wmt_ve_jenc.o b/drivers/media/video/wmt/encode/g_wmt_ve_jenc.o
new file mode 100644
index 00000000..0e1952de
--- /dev/null
+++ b/drivers/media/video/wmt/encode/g_wmt_ve_jenc.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/h264/header.o b/drivers/media/video/wmt/encode/h264/header.o
new file mode 100755
index 00000000..61381a46
--- /dev/null
+++ b/drivers/media/video/wmt/encode/h264/header.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/h264/vlc.o b/drivers/media/video/wmt/encode/h264/vlc.o
new file mode 100755
index 00000000..f336c553
--- /dev/null
+++ b/drivers/media/video/wmt/encode/h264/vlc.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/h264/wmt-h264enc.o b/drivers/media/video/wmt/encode/h264/wmt-h264enc.o
new file mode 100755
index 00000000..b8ff2a58
--- /dev/null
+++ b/drivers/media/video/wmt/encode/h264/wmt-h264enc.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/jpeg/Kbuild b/drivers/media/video/wmt/encode/jpeg/Kbuild
new file mode 100755
index 00000000..4bcf92f6
--- /dev/null
+++ b/drivers/media/video/wmt/encode/jpeg/Kbuild
@@ -0,0 +1,3 @@
+obj-m += g_wmt_ve_jpeg.o
+g_wmt_ve_jpeg-y := hw-jenc.o wmt-jenc.o
+
diff --git a/drivers/media/video/wmt/encode/jpeg/hw-jenc.o b/drivers/media/video/wmt/encode/jpeg/hw-jenc.o
new file mode 100755
index 00000000..8462cfe9
--- /dev/null
+++ b/drivers/media/video/wmt/encode/jpeg/hw-jenc.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/jpeg/wmt-jenc.o b/drivers/media/video/wmt/encode/jpeg/wmt-jenc.o
new file mode 100755
index 00000000..888a1b2f
--- /dev/null
+++ b/drivers/media/video/wmt/encode/jpeg/wmt-jenc.o
Binary files differ
diff --git a/drivers/media/video/wmt/encode/modules.order b/drivers/media/video/wmt/encode/modules.order
new file mode 100644
index 00000000..99a668a5
--- /dev/null
+++ b/drivers/media/video/wmt/encode/modules.order
@@ -0,0 +1,3 @@
+kernel/drivers/media/video/wmt/encode/g_wmt_ve_com.ko
+kernel/drivers/media/video/wmt/encode/g_wmt_ve_h264.ko
+kernel/drivers/media/video/wmt/encode/g_wmt_ve_jenc.ko
diff --git a/drivers/media/video/wmt/encode/wmt-ve.o b/drivers/media/video/wmt/encode/wmt-ve.o
new file mode 100755
index 00000000..c0efea96
--- /dev/null
+++ b/drivers/media/video/wmt/encode/wmt-ve.o
Binary files differ
diff --git a/drivers/media/video/wmt/g_wmt_lock.mod.c b/drivers/media/video/wmt/g_wmt_lock.mod.c
new file mode 100644
index 00000000..21d9cb22
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_lock.mod.c
@@ -0,0 +1,52 @@
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = KBUILD_MODNAME,
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+ .arch = MODULE_ARCH_INIT,
+};
+
+MODULE_INFO(intree, "Y");
+
+static const struct modversion_info ____versions[]
+__used
+__attribute__((section("__versions"))) = {
+ { 0x57a42d88, "module_layout" },
+ { 0x8888fdc7, "cdev_del" },
+ { 0x193eaea8, "cdev_init" },
+ { 0xd8e484f0, "register_chrdev_region" },
+ { 0x38f42821, "down_interruptible" },
+ { 0xb5b6bed6, "remove_proc_entry" },
+ { 0xdcefeadd, "device_destroy" },
+ { 0x7485e15e, "unregister_chrdev_region" },
+ { 0x91715312, "sprintf" },
+ { 0x5f754e5a, "memset" },
+ { 0x74c97f9c, "_raw_spin_unlock_irqrestore" },
+ { 0x2f7962a1, "down_trylock" },
+ { 0x27e1a049, "printk" },
+ { 0xfb2dff80, "device_create" },
+ { 0xb39b257, "cdev_add" },
+ { 0x3bd1b1f6, "msecs_to_jiffies" },
+ { 0x8e2e7ff8, "create_proc_entry" },
+ { 0xbd7083bc, "_raw_spin_lock_irqsave" },
+ { 0x2eb22412, "up" },
+ { 0x27d66eb3, "class_destroy" },
+ { 0xb742fd7, "simple_strtol" },
+ { 0x9cadc595, "__class_create" },
+ { 0x3c3e55e, "wmt_getsyspara" },
+ { 0x635b340, "down_timeout" },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=";
+
diff --git a/drivers/media/video/wmt/g_wmt_lock.mod.o b/drivers/media/video/wmt/g_wmt_lock.mod.o
new file mode 100644
index 00000000..6ec2573f
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_lock.mod.o
Binary files differ
diff --git a/drivers/media/video/wmt/g_wmt_lock.o b/drivers/media/video/wmt/g_wmt_lock.o
new file mode 100644
index 00000000..1b0894ea
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_lock.o
Binary files differ
diff --git a/drivers/media/video/wmt/g_wmt_msvd.mod.c b/drivers/media/video/wmt/g_wmt_msvd.mod.c
new file mode 100644
index 00000000..768ade71
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_msvd.mod.c
@@ -0,0 +1,92 @@
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = KBUILD_MODNAME,
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+ .arch = MODULE_ARCH_INIT,
+};
+
+MODULE_INFO(intree, "Y");
+
+static const struct modversion_info ____versions[]
+__used
+__attribute__((section("__versions"))) = {
+ { 0x57a42d88, "module_layout" },
+ { 0x8d028e48, "wmt_codec_timer_start" },
+ { 0x8888fdc7, "cdev_del" },
+ { 0x1d122fd8, "kmalloc_caches" },
+ { 0x193eaea8, "cdev_init" },
+ { 0x17a142df, "__copy_from_user" },
+ { 0x311b7963, "_raw_spin_unlock" },
+ { 0x15692c87, "param_ops_int" },
+ { 0x98082893, "__copy_to_user" },
+ { 0xd8e484f0, "register_chrdev_region" },
+ { 0xc6c50923, "dma_release_declared_memory" },
+ { 0xc8b57c27, "autoremove_wake_function" },
+ { 0xdcefeadd, "device_destroy" },
+ { 0x353e3fa5, "__get_user_4" },
+ { 0xe2f241de, "wmt_codec_timer_stop" },
+ { 0xaab4b6f0, "mutex_unlock" },
+ { 0x7485e15e, "unregister_chrdev_region" },
+ { 0xf1a02a62, "wmt_get_codec_clock_count" },
+ { 0xd63e03ec, "mb_do_free" },
+ { 0xcc3bef4d, "wmt_codec_timer_init" },
+ { 0x7d11c268, "jiffies" },
+ { 0x4467122a, "__init_waitqueue_head" },
+ { 0x2e89d1f5, "dma_declare_coherent_memory" },
+ { 0xfa2a45e, "__memzero" },
+ { 0x4873c22f, "__mutex_init" },
+ { 0x27e1a049, "printk" },
+ { 0x89237345, "mb_do_phys_to_virt" },
+ { 0x65f4a251, "wmt_reset_codec_clock_count" },
+ { 0xb8ea94a9, "fasync_helper" },
+ { 0x95687190, "dma_free_coherent" },
+ { 0xadc6f1fa, "mutex_lock" },
+ { 0xe66c5f60, "platform_get_resource" },
+ { 0xfb2dff80, "device_create" },
+ { 0x4c6a3efe, "platform_device_unregister" },
+ { 0x2072ee9b, "request_threaded_irq" },
+ { 0x8c22622f, "platform_driver_register" },
+ { 0x6e5ef1f4, "wmt_codec_msvd_reset" },
+ { 0x29f8b407, "dma_alloc_coherent" },
+ { 0xb39b257, "cdev_add" },
+ { 0xe87acce2, "kmem_cache_alloc" },
+ { 0xc5433fa, "platform_device_register" },
+ { 0xc2018d04, "wmt_codec_pmc_ctl" },
+ { 0x3bd1b1f6, "msecs_to_jiffies" },
+ { 0xd62c833f, "schedule_timeout" },
+ { 0xc2165d85, "__arm_iounmap" },
+ { 0xc2161e33, "_raw_spin_lock" },
+ { 0x72542c85, "__wake_up" },
+ { 0x425456c9, "cpu_cache" },
+ { 0x2aca9e60, "wmt_codec_timer_exit" },
+ { 0x37a0cba, "kfree" },
+ { 0x2921f3a5, "remap_pfn_range" },
+ { 0x9d669763, "memcpy" },
+ { 0x32f80ea9, "prepare_to_wait" },
+ { 0x27d66eb3, "class_destroy" },
+ { 0x59865b90, "kill_fasync" },
+ { 0xf83178bd, "finish_wait" },
+ { 0x40a6f522, "__arm_ioremap" },
+ { 0xc23dbae6, "platform_driver_unregister" },
+ { 0x75349d4a, "mb_do_alloc" },
+ { 0xe5d95985, "param_ops_ulong" },
+ { 0xac8f37b2, "outer_cache" },
+ { 0x9cadc595, "__class_create" },
+ { 0xd5d62366, "wmt_codec_clock_en" },
+ { 0xf20dabd8, "free_irq" },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=g_wmt_vd_com";
+
diff --git a/drivers/media/video/wmt/g_wmt_msvd.mod.o b/drivers/media/video/wmt/g_wmt_msvd.mod.o
new file mode 100644
index 00000000..8593ce3e
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_msvd.mod.o
Binary files differ
diff --git a/drivers/media/video/wmt/g_wmt_msvd.o b/drivers/media/video/wmt/g_wmt_msvd.o
new file mode 100644
index 00000000..9292f325
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_msvd.o
Binary files differ
diff --git a/drivers/media/video/wmt/g_wmt_vd_com.mod.c b/drivers/media/video/wmt/g_wmt_vd_com.mod.c
new file mode 100644
index 00000000..a5f703af
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_vd_com.mod.c
@@ -0,0 +1,71 @@
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = KBUILD_MODNAME,
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+ .arch = MODULE_ARCH_INIT,
+};
+
+MODULE_INFO(intree, "Y");
+
+static const struct modversion_info ____versions[]
+__used
+__attribute__((section("__versions"))) = {
+ { 0x57a42d88, "module_layout" },
+ { 0xb509ece8, "cdev_alloc" },
+ { 0x8888fdc7, "cdev_del" },
+ { 0x1d122fd8, "kmalloc_caches" },
+ { 0x193eaea8, "cdev_init" },
+ { 0xd8e484f0, "register_chrdev_region" },
+ { 0x38f42821, "down_interruptible" },
+ { 0xdcefeadd, "device_destroy" },
+ { 0xb91cfb43, "platform_bus_type" },
+ { 0xaab4b6f0, "mutex_unlock" },
+ { 0x7485e15e, "unregister_chrdev_region" },
+ { 0xe707d823, "__aeabi_uidiv" },
+ { 0xfa2a45e, "__memzero" },
+ { 0x5f754e5a, "memset" },
+ { 0x74c97f9c, "_raw_spin_unlock_irqrestore" },
+ { 0x2f7962a1, "down_trylock" },
+ { 0x27e1a049, "printk" },
+ { 0x95687190, "dma_free_coherent" },
+ { 0xadc6f1fa, "mutex_lock" },
+ { 0x609a1f02, "down" },
+ { 0xfb2dff80, "device_create" },
+ { 0x4c6a3efe, "platform_device_unregister" },
+ { 0x2072ee9b, "request_threaded_irq" },
+ { 0x8c22622f, "platform_driver_register" },
+ { 0x29f8b407, "dma_alloc_coherent" },
+ { 0xb39b257, "cdev_add" },
+ { 0xe87acce2, "kmem_cache_alloc" },
+ { 0xc5433fa, "platform_device_register" },
+ { 0x3bd1b1f6, "msecs_to_jiffies" },
+ { 0x8e2e7ff8, "create_proc_entry" },
+ { 0xbd7083bc, "_raw_spin_lock_irqsave" },
+ { 0x4f68e5c9, "do_gettimeofday" },
+ { 0x37a0cba, "kfree" },
+ { 0x2eb22412, "up" },
+ { 0x27d66eb3, "class_destroy" },
+ { 0xb742fd7, "simple_strtol" },
+ { 0xc23dbae6, "platform_driver_unregister" },
+ { 0x9cadc595, "__class_create" },
+ { 0x3c3e55e, "wmt_getsyspara" },
+ { 0x635b340, "down_timeout" },
+ { 0xf20dabd8, "free_irq" },
+ { 0xd15ada1d, "auto_pll_divisor" },
+ { 0xe914e41e, "strcpy" },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=";
+
diff --git a/drivers/media/video/wmt/g_wmt_vd_com.mod.o b/drivers/media/video/wmt/g_wmt_vd_com.mod.o
new file mode 100644
index 00000000..390d23e1
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_vd_com.mod.o
Binary files differ
diff --git a/drivers/media/video/wmt/g_wmt_vd_com.o b/drivers/media/video/wmt/g_wmt_vd_com.o
new file mode 100644
index 00000000..9ca82901
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_vd_com.o
Binary files differ
diff --git a/drivers/media/video/wmt/g_wmt_vd_jdec.mod.c b/drivers/media/video/wmt/g_wmt_vd_jdec.mod.c
new file mode 100644
index 00000000..299a5fd6
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_vd_jdec.mod.c
@@ -0,0 +1,68 @@
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = KBUILD_MODNAME,
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+ .arch = MODULE_ARCH_INIT,
+};
+
+MODULE_INFO(intree, "Y");
+
+static const struct modversion_info ____versions[]
+__used
+__attribute__((section("__versions"))) = {
+ { 0x57a42d88, "module_layout" },
+ { 0x8d028e48, "wmt_codec_timer_start" },
+ { 0x1d122fd8, "kmalloc_caches" },
+ { 0x17a142df, "__copy_from_user" },
+ { 0x311b7963, "_raw_spin_unlock" },
+ { 0xaaf31686, "wmt_vd_register" },
+ { 0x98082893, "__copy_to_user" },
+ { 0xc8b57c27, "autoremove_wake_function" },
+ { 0x288cb6b7, "wmt_codec_timer_reset" },
+ { 0xf7802486, "__aeabi_uidivmod" },
+ { 0xe2f241de, "wmt_codec_timer_stop" },
+ { 0x91715312, "sprintf" },
+ { 0xd63e03ec, "mb_do_free" },
+ { 0xcc3bef4d, "wmt_codec_timer_init" },
+ { 0x7f4c1551, "wmt_codec_write_prd" },
+ { 0xe707d823, "__aeabi_uidiv" },
+ { 0xfa2a45e, "__memzero" },
+ { 0x5f754e5a, "memset" },
+ { 0x27e1a049, "printk" },
+ { 0x89237345, "mb_do_phys_to_virt" },
+ { 0x606db7f2, "wmt_codec_unlock" },
+ { 0x2072ee9b, "request_threaded_irq" },
+ { 0x6e5ef1f4, "wmt_codec_msvd_reset" },
+ { 0x8fda82cc, "module_put" },
+ { 0xe87acce2, "kmem_cache_alloc" },
+ { 0xc2018d04, "wmt_codec_pmc_ctl" },
+ { 0x3bd1b1f6, "msecs_to_jiffies" },
+ { 0xd62c833f, "schedule_timeout" },
+ { 0x82b4b450, "wmt_vd_unregister" },
+ { 0xc2161e33, "_raw_spin_lock" },
+ { 0x72542c85, "__wake_up" },
+ { 0x2aca9e60, "wmt_codec_timer_exit" },
+ { 0x37a0cba, "kfree" },
+ { 0xa0fde0d9, "wmt_codec_lock" },
+ { 0x32f80ea9, "prepare_to_wait" },
+ { 0xf83178bd, "finish_wait" },
+ { 0x75349d4a, "mb_do_alloc" },
+ { 0xac8f37b2, "outer_cache" },
+ { 0xd5d62366, "wmt_codec_clock_en" },
+ { 0xf20dabd8, "free_irq" },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=g_wmt_vd_com";
+
diff --git a/drivers/media/video/wmt/g_wmt_vd_jdec.mod.o b/drivers/media/video/wmt/g_wmt_vd_jdec.mod.o
new file mode 100644
index 00000000..33d737d6
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_vd_jdec.mod.o
Binary files differ
diff --git a/drivers/media/video/wmt/g_wmt_vd_jdec.o b/drivers/media/video/wmt/g_wmt_vd_jdec.o
new file mode 100644
index 00000000..964a5cdf
--- /dev/null
+++ b/drivers/media/video/wmt/g_wmt_vd_jdec.o
Binary files differ
diff --git a/drivers/media/video/wmt/jpeg/hw-jdec.o b/drivers/media/video/wmt/jpeg/hw-jdec.o
new file mode 100755
index 00000000..31676e3d
--- /dev/null
+++ b/drivers/media/video/wmt/jpeg/hw-jdec.o
Binary files differ
diff --git a/drivers/media/video/wmt/jpeg/wmt-jdec.o b/drivers/media/video/wmt/jpeg/wmt-jdec.o
new file mode 100755
index 00000000..85b538bf
--- /dev/null
+++ b/drivers/media/video/wmt/jpeg/wmt-jdec.o
Binary files differ
diff --git a/drivers/media/video/wmt/modules.order b/drivers/media/video/wmt/modules.order
new file mode 100644
index 00000000..2ee858f8
--- /dev/null
+++ b/drivers/media/video/wmt/modules.order
@@ -0,0 +1,4 @@
+kernel/drivers/media/video/wmt/g_wmt_lock.ko
+kernel/drivers/media/video/wmt/g_wmt_vd_com.ko
+kernel/drivers/media/video/wmt/g_wmt_msvd.ko
+kernel/drivers/media/video/wmt/g_wmt_vd_jdec.ko
diff --git a/drivers/media/video/wmt/msvd/vpu.o b/drivers/media/video/wmt/msvd/vpu.o
new file mode 100755
index 00000000..9b1f7253
--- /dev/null
+++ b/drivers/media/video/wmt/msvd/vpu.o
Binary files differ
diff --git a/drivers/media/video/wmt/wmt-codec.c b/drivers/media/video/wmt/wmt-codec.c
new file mode 100644
index 00000000..393281b1
--- /dev/null
+++ b/drivers/media/video/wmt/wmt-codec.c
@@ -0,0 +1,857 @@
+/*++
+ * Common interface for WonderMedia SoC hardware encoder and decoder drivers
+ *
+ * Copyright (c) 2008-2013 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+#ifndef CODEC_C
+#define CODEC_C
+
+#include <linux/device.h> /* For EXPORT_SYMBOL() */
+#include <linux/spinlock.h>
+#include <mach/hardware.h>
+#include <linux/module.h>
+#include <linux/slab.h> /* for kmalloc and kfree */
+#include <linux/semaphore.h> /* for semaphore */
+
+#include "wmt-codec.h"
+
+#define CFG_CODEC_PERFORM_EN /* Flag for codec performance analysis */
+
+
+/*#define CODEC_DEBUG*/
+#undef CODEC_DEBUG
+#ifdef CODEC_DEBUG
+#define DBG_MSG(fmt, args...) \
+ do {\
+ printk(KERN_INFO "{%s} " fmt, __func__, ## args);\
+ } while (0)
+#else
+#define DBG_MSG(fmt, args...)
+#endif
+
+#undef DBG_ERR
+#define DBG_ERR(fmt, args...) \
+ do {\
+ printk(KERN_ERR "*E* {%s} " fmt, __func__, ## args);\
+ } while (0)
+
+#undef PRINTK
+#define PRINTK(fmt, args...) printk(KERN_INFO "{%s} " fmt, __func__, ## args)
+
+/*#define CODEC_REG_TRACE*/
+#ifdef CODEC_REG_TRACE
+#define REG_WRITE(addr, val) \
+ do {\
+ PRINTK("REG_SET:0x%x -> 0x%0x\n", addr, val);\
+ REG32_VAL(addr) = (val);\
+ } while (0)
+#else
+#define REG_WRITE(addr, val) (REG32_VAL(addr) = (val))
+#endif
+
+
+struct codec_lock {
+ struct semaphore sem;
+ unsigned int is_init;
+ unsigned int is_locked;
+};
+
+static struct codec_lock codec_lock[CODEC_MAX];
+static int msvd_clk_enable_cnt;
+DEFINE_MUTEX(wmt_clk_mutex);
+
+
+#ifdef CFG_CODEC_PERFORM_EN
+static int wmt_codec_debug;
+
+struct wmt_tm {
+ unsigned long seq_id; /* seqence number */
+ char name[16]; /* name */
+ unsigned int initial; /* initial flag */
+ unsigned int total_tm; /* total time */
+ unsigned int interval_tm; /* interval time */
+ unsigned int reset; /* reset counter */
+ unsigned int total_cnt; /* total counter */
+ unsigned int count; /* interval counter */
+ unsigned int max; /* max time */
+ unsigned int min; /* min time */
+ unsigned int threshold;
+ struct timeval start; /* start time */
+ struct timeval end; /* end time */
+} ;
+#endif
+
+/*!*************************************************************************
+* wmt_power_en
+*
+* Private Function
+*
+* \retval 0 if success
+*/
+static int wmt_power_en(int enable)
+{
+ static DEFINE_SPINLOCK(wmt_power_lock);
+ unsigned long flags = 0;
+ unsigned int value;
+ int ret = 0;
+ static int wmt_open_cnt=0;
+
+ if(enable){
+ spin_lock_irqsave(&wmt_power_lock, flags);
+ wmt_open_cnt++;
+ spin_unlock_irqrestore(&wmt_power_lock, flags);
+ if(wmt_open_cnt == 1){
+ value = REG32_VAL(PM_CTRL_BASE_ADDR + 0x0604);
+ *(volatile unsigned int *)(PM_CTRL_BASE_ADDR + 0x0604) = (value | 0x1);
+ while((REG32_VAL(PM_CTRL_BASE_ADDR + 0x0604) & 0xf5) != 0xf1){};
+ }
+ }else {
+ spin_lock_irqsave(&wmt_power_lock, flags);
+ if( wmt_open_cnt >= 1) {
+ wmt_open_cnt--;
+ }else {
+ DBG_ERR("Unexpected WMT Codec power off, ignore it!\n");
+ ret = -1;
+ }
+ spin_unlock_irqrestore(&wmt_power_lock, flags);
+ if(wmt_open_cnt == 0){
+ value = REG32_VAL(PM_CTRL_BASE_ADDR + 0x0604);
+ *(volatile unsigned char *)(PM_CTRL_BASE_ADDR + 0x0604) = (value & ~(0x1));
+ while((REG32_VAL(PM_CTRL_BASE_ADDR + 0x0604) & 0xf5) != 0x00){};
+ }
+ }
+ return ret;
+} /* End of wmt_power_en() */
+
+/*!*************************************************************************
+* msvd_power_en
+*
+* Private Function
+*
+* \retval 0 if success
+*/
+static int msvd_power_en(int enable)
+{
+ static DEFINE_SPINLOCK(msvd_power_lock);
+ unsigned long flags = 0;
+ unsigned int value;
+ int ret = 0;
+ static int msvd_open_cnt = 0;
+
+ if (enable) {
+ spin_lock_irqsave(&msvd_power_lock, flags);
+ msvd_open_cnt++;
+ spin_unlock_irqrestore(&msvd_power_lock, flags);
+ if(msvd_open_cnt == 1){
+ value = REG32_VAL(PM_CTRL_BASE_ADDR + 0x062C);
+ *(volatile unsigned int *)(PM_CTRL_BASE_ADDR + 0x062C) = (value | 0x1);
+ while((REG32_VAL(PM_CTRL_BASE_ADDR + 0x062C) & 0xf5) != 0xf1){};
+ }
+ } else {
+ spin_lock_irqsave(&msvd_power_lock, flags);
+ if( msvd_open_cnt >= 1) {
+ msvd_open_cnt--;
+ }else {
+ DBG_ERR("Unexpected MSVD Codec power off, ignore it!\n");
+ ret = -1;
+ }
+ spin_unlock_irqrestore(&msvd_power_lock, flags);
+ if(msvd_open_cnt == 0){
+ value = REG32_VAL(PM_CTRL_BASE_ADDR + 0x062C);
+ *(volatile unsigned int *)(PM_CTRL_BASE_ADDR + 0x062C) = (value & ~(0x1));
+ while((REG32_VAL(PM_CTRL_BASE_ADDR + 0x062C) & 0xf5) != 0x00){};
+ }
+ }
+ return 0;
+} /* End of msvd_power_en() */
+
+/*!*************************************************************************
+* wmt_clock_en
+*
+* Public Function
+*/
+/*!
+* \brief
+* Set source PRD table
+*
+* \retval 0 if success
+*/
+int wmt_clock_en(int codec_type, int enable)
+{
+ static DEFINE_SPINLOCK(clk_lock);
+ unsigned long flags = 0;
+
+ if ((codec_type < 0 ) || (codec_type >= CODEC_MAX)) {
+ DBG_ERR("Unsupported codec ID %d\n", codec_type);
+ return -1;
+ }
+
+ if (codec_type == CODEC_VD_JPEG) {
+ spin_lock_irqsave(&clk_lock, flags);
+ if (enable) {
+ auto_pll_divisor(DEV_JDEC, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_MSVD, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTVDU, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTNA, CLK_ENABLE, 0, 0);
+ } else {
+ auto_pll_divisor(DEV_WMTNA, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTVDU, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_MSVD, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_JDEC, CLK_DISABLE, 0, 0);
+ }
+ spin_unlock_irqrestore(&clk_lock, flags);
+ } else if (codec_type == CODEC_VD_MSVD) {
+ mutex_lock(&wmt_clk_mutex);
+ if (enable) {
+ auto_pll_divisor(DEV_WMTNA, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_CNMNA, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_MSVD, CLK_ENABLE, 0, 0);
+ } else {
+ auto_pll_divisor(DEV_MSVD, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_CNMNA, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTNA, CLK_DISABLE, 0, 0);
+ }
+ mutex_unlock(&wmt_clk_mutex);
+ } else if (codec_type == CODEC_VE_H264) {
+ spin_lock_irqsave(&clk_lock, flags);
+ if (enable) {
+ auto_pll_divisor(DEV_WMTNA, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_MSVD, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTVDU, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_H264, CLK_ENABLE, 0, 0);
+ } else {
+ auto_pll_divisor(DEV_H264, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_MSVD, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTNA, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTVDU, CLK_DISABLE, 0, 0);
+ }
+ spin_unlock_irqrestore(&clk_lock, flags);
+ } else if (codec_type == CODEC_VE_JPEG) {
+ spin_lock_irqsave(&clk_lock, flags);
+ if (enable) {
+ auto_pll_divisor(DEV_JENC, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_MSVD, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTVDU, CLK_ENABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTNA, CLK_ENABLE, 0, 0);
+ } else {
+ auto_pll_divisor(DEV_WMTNA, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_WMTVDU, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_MSVD, CLK_DISABLE, 0, 0);
+ auto_pll_divisor(DEV_JENC, CLK_DISABLE, 0, 0);
+ }
+ spin_unlock_irqrestore(&clk_lock, flags);
+ }
+ return 0;
+} /* End of wmt_clock_en() */
+
+/*!*************************************************************************
+* wmt_get_codec_clock_count
+*
+* Private Function
+*
+* \retval 0 if success
+*/
+int wmt_get_codec_clock_count(void)
+{
+ return msvd_clk_enable_cnt;
+}
+EXPORT_SYMBOL(wmt_get_codec_clock_count);
+
+/*!*************************************************************************
+* wmt_reset_codec_clock_count
+*
+* Private Function
+*
+* \retval 0 if success
+*/
+void wmt_reset_codec_clock_count(void)
+{
+ msvd_clk_enable_cnt = 0;
+}
+EXPORT_SYMBOL(wmt_reset_codec_clock_count);
+
+/*!*************************************************************************
+* wmt_codec_clock_en
+*
+* Public Function
+*/
+/*!
+* \brief
+*
+* \retval 0 if success
+*/
+int wmt_codec_clock_en(int codec_type, int enable)
+{
+ static DEFINE_SPINLOCK(clk_lock);
+ unsigned long flags = 0;
+ int ret = 0;
+
+ if ((codec_type < 0 ) || (codec_type >= CODEC_MAX)) {
+ DBG_ERR("Unsupported codec ID %d\n", codec_type);
+ return -1;
+ }
+ if (codec_type == CODEC_VD_JPEG) {
+ spin_lock_irqsave(&clk_lock, flags);
+ if (enable) {
+ REG_WRITE(MSVD_BASE_ADDR + 0x020, 0x0F);
+ } else {
+ REG_WRITE(MSVD_BASE_ADDR + 0x020, 0x00);
+ }
+ spin_unlock_irqrestore(&clk_lock, flags);
+ } else if (codec_type == CODEC_VD_MSVD) {
+ mutex_lock(&wmt_clk_mutex);
+ if(enable) {
+ msvd_clk_enable_cnt++;
+ if(msvd_clk_enable_cnt == 1){
+ auto_pll_divisor(DEV_CNMVDU, CLK_ENABLE, 0, 0);
+ REG_WRITE(MSVD_BASE_ADDR + 0x000, 0x07);
+ }
+ }else {
+ if( msvd_clk_enable_cnt >= 1) {
+ msvd_clk_enable_cnt--;
+ if(msvd_clk_enable_cnt == 0){
+ REG_WRITE(MSVD_BASE_ADDR + 0x000, 0x00);
+ auto_pll_divisor(DEV_CNMVDU, CLK_DISABLE, 0, 0);
+ }
+ }else {
+ DBG_ERR("Unexpected MSVD Codec power off, ignore it!\n");
+ ret = -1;
+ }
+ }
+ mutex_unlock(&wmt_clk_mutex);
+ } else if (codec_type == CODEC_VE_H264 ) {
+ spin_lock_irqsave(&clk_lock, flags);
+ if(enable) {
+ REG_WRITE(MSVD_BASE_ADDR + 0x040, 0x0F);
+ }else {
+ REG_WRITE(MSVD_BASE_ADDR + 0x040, 0x00);
+ }
+ spin_unlock_irqrestore(&clk_lock, flags);
+ } else if (codec_type == CODEC_VE_JPEG) {
+ spin_lock_irqsave(&clk_lock, flags);
+ if (enable) {
+ REG_WRITE(MSVD_BASE_ADDR + 0x060, 0x0F);
+ } else {
+ REG_WRITE(MSVD_BASE_ADDR + 0x060, 0x00);
+ }
+ spin_unlock_irqrestore(&clk_lock, flags);
+ }
+ return ret;
+} /* End of wmt_codec_clock_en() */
+EXPORT_SYMBOL(wmt_codec_clock_en);
+
+/*!*************************************************************************
+* wmt_codec_pmc_ctl
+*
+* Public Function
+*/
+/*!
+* \brief
+*
+* \retval 0 if success
+*/
+int wmt_codec_pmc_ctl(int codec_type, int enable)
+{
+
+ if ((codec_type < 0 ) || (codec_type >= CODEC_MAX)) {
+ DBG_ERR("Unsupported codec ID %d\n", codec_type);
+ return -1;
+ }
+ if (enable){
+ wmt_clock_en(codec_type, 1); /* WMT clock on */
+ wmt_power_en(1); /* WMT Codec power cotrol *//*PMC.0x604 */
+ if (codec_type == CODEC_VD_MSVD)
+ msvd_power_en(1); /* MSVD Codec power control */ /*PMC.0x62c */
+ }else{
+ if (codec_type == CODEC_VD_MSVD)
+ msvd_power_en(0); /* MSVD Codec power control */ /*PMC.0x62c */
+ wmt_power_en(0); /* WMT Codec power cotrol *//*PMC.0x604 */
+
+ wmt_clock_en(codec_type, 0); /* WMT clock on */
+ }
+ return 0;
+} /* End of wmt_codec_pmc_ctl() */
+EXPORT_SYMBOL(wmt_codec_pmc_ctl);
+
+/*!*************************************************************************
+* wmt_codec_msvd_reset
+*
+* Public Function
+*/
+/*!
+* \brief
+*
+* \retval 0 if success
+*/
+int wmt_codec_msvd_reset(int codec_type)
+{
+ if (codec_type == CODEC_VD_MSVD) {
+ /* Do MSVD SW reset */
+ REG_WRITE(MSVD_BASE_ADDR + 0x008, 0x07);
+ REG_WRITE(MSVD_BASE_ADDR + 0x008, 0x00);
+
+ /* automatic disable clock , BIT0 AHB, BIT1 core, BIT2 NA bus*/
+ REG_WRITE(MSVD_BASE_ADDR + 0x004, 0x00);
+
+ /* Disable SRAM Power Down */
+ REG_WRITE(MSVD_BASE_ADDR + 0x00C, 0x00);
+ } else if (codec_type == CODEC_VD_JPEG) {
+ REG_WRITE(MSVD_BASE_ADDR + 0x028, 0xF); /* Enable MSVD SW reset */
+ REG_WRITE(MSVD_BASE_ADDR + 0x028, 0x0); /* Disable MSVD SW reset */
+ REG_WRITE(MSVD_BASE_ADDR + 0x02C, 0x0); /* Disable MSVD SW reset */
+ } else if (codec_type == CODEC_VE_H264) {
+ REG_WRITE(MSVD_BASE_ADDR + 0x048, 0xF); /* Enable MSVD SW reset */
+ REG_WRITE(MSVD_BASE_ADDR + 0x048, 0x0); /* Disable MSVD SW reset */
+ REG_WRITE(MSVD_BASE_ADDR + 0x044, 0xC); /* Enable Auto disable clock */
+ REG_WRITE(MSVD_BASE_ADDR + 0x04C, 0x0); /* Disable SRAM Power down */
+ } else if (codec_type == CODEC_VE_JPEG) {
+ REG_WRITE(MSVD_BASE_ADDR + 0x068, 0x0F);
+ REG_WRITE(MSVD_BASE_ADDR + 0x068, 0x00);
+ REG_WRITE(MSVD_BASE_ADDR + 0x06C, 0x00);
+ }
+ return 0;
+} /* End of wmt_codec_msvd_reset() */
+EXPORT_SYMBOL(wmt_codec_msvd_reset);
+
+/*!*************************************************************************
+* wmt_codec_lock
+*
+* Public Function
+*/
+/*!
+* \brief
+*
+* \retval 0 if success
+*/
+int wmt_codec_lock(int codec_type, int timeout)
+{
+ struct semaphore *sem;
+ int ret = ret;
+
+ if ((codec_type != CODEC_VD_JPEG) && (codec_type != CODEC_VE_JPEG))
+ return -1;
+
+ if (codec_lock[codec_type].is_init != 1) {
+ sema_init(&codec_lock[codec_type].sem, 1);
+
+ codec_lock[codec_type].is_init = 1;
+ }
+ sem = &codec_lock[codec_type].sem;
+
+ if (timeout == 0) {
+ ret = down_trylock(sem);
+ if (ret)
+ ret = -ETIME; /* reasonable if lock holded by other */
+ } else if (timeout == -1) {
+ ret = down_interruptible(sem);
+ if (ret)
+ DBG_ERR("<%d> down_interruptible fail (ret: %d)\n",
+ codec_type, ret);
+ } else {
+ ret = down_timeout(sem, msecs_to_jiffies(timeout));
+ if (ret)
+ DBG_MSG("<%d> down_timeout(%d ms) fail (ret: %d)\n",
+ codec_type, timeout, ret);
+ }
+ if (ret == 0)
+ codec_lock[codec_type].is_locked = 1;
+ return ret;
+} /* End of wmt_codec_lock() */
+EXPORT_SYMBOL(wmt_codec_lock);
+
+/*!*************************************************************************
+* wmt_codec_unlock
+*
+* Public Function
+*/
+/*!
+* \brief
+*
+* \retval 0 if success
+*/
+int wmt_codec_unlock(int codec_type)
+{
+ if ((codec_type != CODEC_VD_JPEG) && (codec_type != CODEC_VE_JPEG))
+ return -1;
+
+ if (codec_lock[codec_type].is_locked == 1) {
+ up(&codec_lock[codec_type].sem);
+ codec_lock[codec_type].is_locked = 0;
+ } else {
+ DBG_ERR("Try to unlock non-locked sem (%s)",
+ (codec_type == CODEC_VD_JPEG) ? "jdec" : "jenc");
+ return -1;
+ }
+ return 0;
+} /* End of wmt_codec_unlock() */
+EXPORT_SYMBOL(wmt_codec_unlock);
+
+/*!*************************************************************************
+* wmt_codec_write_prd
+*
+* Public Function
+*/
+/*!
+* \brief
+* Transfer the buffer address as PRD foramt
+*
+* \parameter
+* prd_addr [IN] Phyical address
+*
+* \retval 0 if success
+*/
+int wmt_codec_write_prd(
+ unsigned int src_buf,
+ unsigned int src_size,
+ unsigned int prd_addr_in,
+ unsigned int prd_buf_size)
+{
+ #define PRD_MAX_SIZE (60*1024)
+
+ unsigned char *buf_addr = (unsigned char *)src_buf;
+ unsigned int buf_size = src_size;
+ unsigned int *prd_addr = (unsigned int *)prd_addr_in;
+ unsigned int items;
+ unsigned int count = 0;
+ /*----------------------------------------------------------------------
+ Transfer the input address as PRD foramt
+ ----------------------------------------------------------------------*/
+ DBG_MSG("src_buf: 0x%x, src_size: %d, prd_addr_in: 0x%x\n",
+ src_buf, src_size, prd_addr_in);
+ items = prd_buf_size/8;
+ while (buf_size > 0) {
+ if (buf_size > PRD_MAX_SIZE) {
+ *prd_addr++ = (unsigned int)buf_addr;
+ *prd_addr++ = PRD_MAX_SIZE;
+ buf_size -= PRD_MAX_SIZE;
+ buf_addr += PRD_MAX_SIZE;
+ } else {
+ *prd_addr++ = (unsigned int)buf_addr;
+ *prd_addr++ = (0x80000000 | buf_size);
+ buf_size = 0;
+ }
+ count++;
+ if (count > items)
+ return -1;
+ }
+ return 0;
+} /* End of wmt_codec_write_prd() */
+EXPORT_SYMBOL(wmt_codec_write_prd);
+
+/*!*************************************************************************
+* wmt_codec_dump_prd
+*
+* Public Function
+*/
+/*!
+* \brief
+* Dump data in PRD foramt for buffer
+*
+* \parameter
+* prd_addr [IN] Phyical address
+*
+* \retval 0 if success
+*/
+int wmt_codec_dump_prd(unsigned int prd_virt_in, int dump_data)
+{
+ unsigned int prd_addr_in, prd_data_size = 0;
+ unsigned int addr, len;
+ int i, j;
+
+ prd_addr_in = prd_virt_in;
+ for (i = 0; ; i += 2) {
+ addr = *(unsigned int *)(prd_addr_in + i * 4);
+ len = *(unsigned int *)(prd_addr_in + (i + 1) * 4);
+ prd_data_size += (len & 0xFFFF);
+
+ PRINTK("[%02d]Addr: 0x%08x\n", i, addr);
+ PRINTK(" Len: 0x%08x (%d)\n", len, (len & 0xFFFF));
+
+ if (dump_data) {
+ unsigned char *ptr;
+
+ ptr = (unsigned char *)phys_to_virt(addr);
+ for (j = 0; j < (len & 0xFFFF); j++) {
+ if ((j%16) == 15)
+ PRINTK("0x%02x\n", *ptr);
+ else
+ PRINTK("0x%02x ", *ptr);
+ ptr++;
+ }
+ }
+ if (len & 0x80000000)
+ break;
+ } /* for(i=0; ; i+=2) */
+ PRINTK("Data size in PRD table: %d\n", prd_data_size);
+
+ return 0;
+} /* End of wmt_codec_dump_prd() */
+EXPORT_SYMBOL(wmt_codec_dump_prd);
+
+/*!*************************************************************************
+* check_debug_option
+*
+* Private Function
+*/
+/*!
+* \brief
+* Initial VD timer
+*
+* \retval 0 if success
+*/
+#ifdef CFG_CODEC_PERFORM_EN
+static void check_debug_option(void)
+{
+ extern int wmt_getsyspara(char *varname, unsigned char *varval, int *varlen);
+
+ static int s_first_run;
+
+ if (s_first_run == 0) {
+ char buf[80] = {0};
+ int varlen = 80;
+
+ /* Read u-boot parameter to decide value of wmt_codec_debug */
+ if (wmt_getsyspara("wmt.codec.debug", buf, &varlen) == 0)
+ wmt_codec_debug = simple_strtol(buf, NULL, 10);
+
+ s_first_run = 1;
+ }
+} /* End of check_debug_option() */
+#endif /* #ifdef CFG_CODEC_PERFORM_EN */
+
+/*!*************************************************************************
+* wmt_codec_timer_init
+*
+* API Function
+*/
+/*!
+* \brief
+* Initial VD timer
+*
+* \retval 0 if success
+*/
+int wmt_codec_timer_init(
+ void **pphandle,
+ const char *name,
+ unsigned int count,
+ int threshold_ms)
+{
+#ifdef CFG_CODEC_PERFORM_EN
+ static atomic_t s_Seq_id = ATOMIC_INIT(0);
+ struct wmt_tm *pcodec;
+
+ check_debug_option();
+
+ if (wmt_codec_debug == 0)
+ return 0;
+
+ pcodec = kmalloc(sizeof(struct wmt_tm), GFP_KERNEL);
+ if (pcodec == 0)
+ DBG_ERR("Allocate %d bytes fail\n", sizeof(struct wmt_tm));
+
+ memset(pcodec, 0, sizeof(struct wmt_tm));
+
+ pcodec->reset = count;
+ pcodec->threshold = threshold_ms * 1000; /* us */
+ pcodec->max = 0;
+ pcodec->min = 0xFFFFFFF;
+ pcodec->initial = 1;
+ strcpy(pcodec->name, name);
+
+ pcodec->seq_id = (unsigned long)(atomic_add_return(1, &s_Seq_id));
+
+ *pphandle = pcodec;
+#endif /* #ifdef CFG_CODEC_PERFORM_EN */
+ return 0;
+} /* End of wmt_codec_timer_init() */
+EXPORT_SYMBOL(wmt_codec_timer_init);
+
+/*!*************************************************************************
+* wmt_codec_timer_reset_count
+*
+* API Function
+*/
+/*!
+* \brief
+* Release VD timer
+*
+* \retval 0 if success
+*/
+int wmt_codec_timer_reset(void *phandle, unsigned int count, int threshold_ms)
+{
+#ifdef CFG_CODEC_PERFORM_EN
+ struct wmt_tm *pcodec = (struct wmt_tm *)phandle;
+
+ if (pcodec) {
+ pcodec->reset = count;
+ pcodec->threshold = threshold_ms * 1000; /* us */
+ }
+#endif /* #ifdef CFG_CODEC_PERFORM_EN */
+ return 0;
+} /* End of wmt_codec_timer_reset_count() */
+EXPORT_SYMBOL(wmt_codec_timer_reset);
+
+/*!*************************************************************************
+* wmt_codec_timer_start
+*
+* API Function
+*/
+/*!
+* \brief
+* Start a VD timer
+*
+* \retval 0 if success
+*/
+int wmt_codec_timer_start(void *phandle)
+{
+#ifdef CFG_CODEC_PERFORM_EN
+ struct wmt_tm *pcodec = (struct wmt_tm *)phandle;
+
+ if (wmt_codec_debug == 0)
+ return 0;
+
+ if (pcodec->initial != 1) {
+ DBG_ERR("Timer was not initialized!\n");
+ return -1;
+ }
+ do_gettimeofday(&pcodec->start);
+#endif
+ return 0;
+} /* End of wmt_codec_timer_start()*/
+EXPORT_SYMBOL(wmt_codec_timer_start);
+
+/*!*************************************************************************
+* wmt_codec_timer_stop
+*
+* API Function
+*/
+/*!
+* \brief
+* Stop a VD timer
+*
+* \retval 0 if success
+*/
+int wmt_codec_timer_stop(void *phandle)
+{
+#ifdef CFG_CODEC_PERFORM_EN
+ struct wmt_tm *pcodec = (struct wmt_tm *)phandle;
+ int this_time;
+
+ if (wmt_codec_debug == 0)
+ return 0;
+
+ if (pcodec->initial != 1) {
+ DBG_ERR("timer was not initialized!\n");
+ return -1;
+ }
+ do_gettimeofday(&pcodec->end);
+
+ /* unit in us */
+ if (pcodec->start.tv_sec == pcodec->end.tv_sec) {
+ this_time = pcodec->end.tv_usec - pcodec->start.tv_usec;
+ } else {
+ this_time = (pcodec->end.tv_sec - pcodec->start.tv_sec)*1000000
+ + (pcodec->end.tv_usec - pcodec->start.tv_usec);
+ }
+ if (this_time < 0) {
+ PRINTK("Start sec: %ld, usec: %ld\n",
+ pcodec->start.tv_sec, pcodec->start.tv_usec);
+ PRINTK("End sec: %ld, usec: %ld\n",
+ pcodec->end.tv_sec, pcodec->end.tv_usec);
+ }
+
+ pcodec->total_tm += this_time;
+ pcodec->interval_tm += this_time;
+ pcodec->total_cnt++;
+
+ if (this_time >= pcodec->max)
+ pcodec->max = this_time;
+ if (this_time <= pcodec->min)
+ pcodec->min = this_time;
+
+ if (pcodec->threshold && (this_time > pcodec->threshold)) {
+ PRINTK("[%s] (%d) Decode time(%d) over %d (usec)\n",
+ pcodec->name, pcodec->total_cnt,
+ this_time, pcodec->threshold);
+ }
+ pcodec->count++;
+ if ((pcodec->reset != 0) && (pcodec->count >= pcodec->reset)) {
+ PRINTK("=================================================\n");
+ PRINTK("[%s] Avg. time = %d (usec)\n",
+ pcodec->name, pcodec->interval_tm/pcodec->count);
+ PRINTK("(~ %d) Decode Time Range[%d ~ %d](usec)\n",
+ pcodec->total_cnt, pcodec->min, pcodec->max);
+ pcodec->interval_tm = 0;
+ pcodec->count = 0;
+ }
+#endif /* #ifdef CFG_CODEC_PERFORM_EN */
+ return 0;
+} /* End of wmt_codec_timer_stop()*/
+EXPORT_SYMBOL(wmt_codec_timer_stop);
+
+/*!*************************************************************************
+* wmt_codec_timer_exit
+*
+* API Function
+*/
+/*!
+* \brief
+* Release VD timer
+*
+* \retval 0 if success
+*/
+int wmt_codec_timer_exit(void *phandle)
+{
+#ifdef CFG_CODEC_PERFORM_EN
+ struct wmt_tm *pcodec = (struct wmt_tm *)phandle;
+
+ if (wmt_codec_debug == 0)
+ return 0;
+
+ if (pcodec == 0)
+ DBG_ERR("Illegal NULL handle!\n");
+
+ if (pcodec->initial != 1) {
+ DBG_ERR("Codec(%s) timer was not initialized!\n", pcodec->name);
+ return -1;
+ }
+ if (pcodec->total_cnt) {
+ unsigned int avg_tm = pcodec->total_tm/pcodec->total_cnt;
+ PRINTK("=== [seq_id: %ld %s] Timer status:\n",
+ pcodec->seq_id, pcodec->name);
+ PRINTK("Total count = %d\n", pcodec->total_cnt);
+ PRINTK("Total time = %d (usec)\n", pcodec->total_tm);
+ PRINTK("Avg. time = %d (usec)\n", avg_tm);
+ PRINTK("Max time = %d (usec)\n", pcodec->max);
+ PRINTK("Min time = %d (usec)\n", pcodec->min);
+ PRINTK("==========================================\n");
+ }
+ /* reset all */
+ memset(pcodec, 0, sizeof(struct wmt_tm));
+ kfree(pcodec);
+#endif /* #ifdef CFG_CODEC_PERFORM_EN */
+ return 0;
+} /* End of wmt_codec_timer_exit()*/
+EXPORT_SYMBOL(wmt_codec_timer_exit);
+
+MODULE_AUTHOR("WonderMedia Technologies, Inc.");
+MODULE_LICENSE("GPL");
+
+/*--------------------End of Function Body -----------------------------------*/
+#endif /* ifndef CODEC_C */
diff --git a/drivers/media/video/wmt/wmt-codec.h b/drivers/media/video/wmt/wmt-codec.h
new file mode 100644
index 00000000..86e62f20
--- /dev/null
+++ b/drivers/media/video/wmt/wmt-codec.h
@@ -0,0 +1,72 @@
+/*++
+ * Common interface for WonderMedia SoC hardware encoder and decoder drivers
+ *
+ * Copyright (c) 2008-2013 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+#ifndef CODEC_H
+#define CODEC_H
+
+/*-------------------- MODULE DEPENDENCY ---------------------------------*/
+
+enum {
+ CODEC_VD_JPEG,
+ CODEC_VD_MSVD,
+ CODEC_VE_H264,
+ CODEC_VE_JPEG,
+ CODEC_MAX
+}; /* codec_type */
+
+/*--------------------- EXPORTED PRIVATE FUNCTIONS ----------------------*/
+
+int wmt_get_codec_clock_count(void);
+void wmt_reset_codec_clock_count(void);
+
+int wmt_codec_pmc_ctl(int codec_type, int enable);
+int wmt_codec_clock_en(int codec_type, int enable);
+int wmt_codec_msvd_reset(int codec_type);
+
+int wmt_codec_lock(int codec_type, int timeout);
+int wmt_codec_unlock(int codec_type);
+
+int wmt_codec_write_prd(
+ unsigned int src_buf,
+ unsigned int src_size,
+ unsigned int prd_addr_in,
+ unsigned int prd_buf_size);
+
+int wmt_codec_dump_prd(unsigned int prd_virt_in, int dump_data);
+
+int wmt_codec_timer_init(
+ void **ppcodec,
+ const char *name,
+ unsigned int count,
+ int threshold_ms);
+
+int wmt_codec_timer_reset(
+ void *phandle,
+ unsigned int count,
+ int threshold_ms);
+
+int wmt_codec_timer_start(void *pcodec);
+int wmt_codec_timer_stop(void *pcodec);
+int wmt_codec_timer_exit(void *pcodec);
+
+/*=== END wmt-codec.h ====================================================*/
+#endif /* #ifndef CODEC_H */
+
diff --git a/drivers/media/video/wmt/wmt-codec.o b/drivers/media/video/wmt/wmt-codec.o
new file mode 100755
index 00000000..44b4f126
--- /dev/null
+++ b/drivers/media/video/wmt/wmt-codec.o
Binary files differ
diff --git a/drivers/media/video/wmt/wmt-lock.c b/drivers/media/video/wmt/wmt-lock.c
new file mode 100644
index 00000000..7bf72ce9
--- /dev/null
+++ b/drivers/media/video/wmt/wmt-lock.c
@@ -0,0 +1,512 @@
+/*++
+ * WonderMedia Codec Lock driver
+ *
+ * Copyright (c) 2008-2013 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+
+#include <linux/fs.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/cdev.h>
+#include <linux/pci.h>
+#include <asm/uaccess.h>
+#include <linux/proc_fs.h>
+#include <linux/sched.h>
+#include <linux/major.h>
+
+#include "com-lock.h"
+
+#define WMT_LOCK_NAME "wmt-lock"
+#define WMT_LOCK_MAJOR MB_MAJOR /* same as memblock driver */
+#define WMT_LOCK_MINOR 1 /* 0 is /dev/mbdev, 1 is /dev/wmt-lock */
+
+#define MAX_LOCK_JDEC 1 /* Max lock number for JPEG decoder */
+
+/* Even for multi-decoding, this value should <= 4 */
+#define MAX_LOCK_VDEC 4
+
+#define MAX_LOCK_TYPE 3 /* JPEG, MSVD & encoders */
+
+#define MAX_LOCK_OWNER (MAX_LOCK_JDEC + MAX_LOCK_VDEC)
+
+
+static struct class *wmt_lock_class;
+
+
+#undef WMT_LOCK_DEBUG
+/*#define WMT_LOCK_DEBUG*/
+
+#ifdef WMT_LOCK_DEBUG
+#define P_DEBUG(fmt, args...) printk(KERN_INFO "["WMT_LOCK_NAME"] " fmt , ## args)
+#else
+#define P_DEBUG(fmt, args...) ((void)(0))
+#endif
+
+#define P_INFO(fmt, args...) printk(KERN_INFO "[wmt-lock] " fmt , ## args)
+#define P_WARN(fmt, args...) printk(KERN_WARNING "[wmt-lock] *W* " fmt, ## args)
+#define P_ERROR(fmt, args...) printk(KERN_ERR "[wmt-lock] *E* " fmt , ## args)
+
+
+static struct cdev wmt_lock_cdev;
+
+struct lock_owner {
+ pid_t pid;
+ void *private_data;
+ char comm[TASK_COMM_LEN];
+ const char *type;
+};
+
+struct semaphore lock_sem_jpeg;
+struct semaphore lock_sem_video;
+struct semaphore lock_sem_encoder;
+
+struct lock_owner_s {
+ const char *type;
+ struct semaphore *sem;
+ unsigned int max_lock_num;
+ struct lock_owner owners[MAX_LOCK_OWNER];
+};
+
+struct lock_owner_s gLockers[MAX_LOCK_TYPE];
+
+static spinlock_t gSpinlock;
+
+
+/*!*************************************************************************
+* get_sema
+*
+* Private Function
+*
+* \brief
+*
+* \retval ponters to specified semaphore
+*/
+static struct semaphore *get_sema(long lock_type)
+{
+ return gLockers[lock_type].sem;
+}
+
+/*!*************************************************************************
+* set_owner
+*
+* Private Function
+*
+* \brief
+*
+* \retval 0 if success, error code if fail
+*/
+static struct lock_owner *set_owner(long lock_type, struct file *filp)
+{
+ struct lock_owner *o;
+ int i;
+
+ for (i = 0; i < gLockers[lock_type].max_lock_num; i++) {
+ if (gLockers[lock_type].owners[i].pid == 0) {
+ o = &gLockers[lock_type].owners[i];
+ o->private_data = filp->private_data;
+ o->pid = current->pid;
+ memcpy(o->comm, current->comm, TASK_COMM_LEN);
+ return o;
+ }
+ }
+ P_ERROR("Set owner fail because of %s lock full\n",
+ gLockers[lock_type].type);
+ return 0;
+}
+
+/*!*************************************************************************
+* get_owner
+*
+* Private Function
+*
+* \brief
+*
+* \retval 0 if success, error code if fail
+*/
+static struct lock_owner *get_owner(long lock_type)
+{
+ struct lock_owner *o;
+ int i;
+
+ for (i = 0; i < gLockers[lock_type].max_lock_num; i++) {
+ o = &gLockers[lock_type].owners[i];
+ if (o->pid == current->pid)
+ return o;
+ }
+ return NULL;
+}
+
+/*!*************************************************************************
+* check_busy
+*
+* Private Function
+*
+* \brief
+*
+* \retval 0 if not busy, otherwise return 1
+*/
+static int check_busy(long lock_type)
+{
+ struct lock_owner *o;
+ int i;
+
+ for (i = 0; i < gLockers[lock_type].max_lock_num; i++) {
+ o = &gLockers[lock_type].owners[i];
+ if (o->pid == current->pid)
+ return 1; /* Busy */
+ }
+ return 0;
+}
+
+/*!*************************************************************************
+* lock_read_proc
+*
+* Private Function
+*
+* \brief
+*
+* \retval 0 if success, error code if fail
+*/
+static int lock_read_proc(
+ char *page, char **start,
+ off_t offset,
+ int len,
+ int *eof,
+ void *data)
+{
+ char *p = page;
+ struct lock_owner *o;
+ int i, j;
+
+ for (i = 0; i < MAX_LOCK_TYPE; i++) {
+ p += sprintf(p, "------ %s lock ------\n", gLockers[i].type);
+ for (j = 0; j < gLockers[i].max_lock_num; j++) {
+ o = &gLockers[i].owners[j];
+ if (o->pid != 0)
+ p += sprintf(p, "%s lock : occupied by [%s,%d]\n",
+ gLockers[i].type, o->comm, o->pid);
+ else
+ p += sprintf(p, "%s lock : Free\n", gLockers[i].type);
+ }
+ }
+ return p - page;
+}
+
+/*!*************************************************************************
+* wmt_lock_ioctl
+*
+* Private Function
+*
+* \brief
+*
+* \retval 0 if success, error code if fail
+*/
+static long wmt_lock_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+{
+ int ret = 0;
+ struct lock_owner *o;
+ struct semaphore *sem;
+ struct wmt_lock *lock_arg;
+ long timeout;
+ unsigned long flags = 0;
+
+ /* check ioctl type and number, if fail return EINVAL */
+ if (_IOC_TYPE(cmd) != LOCK_IOC_MAGIC) {
+ P_WARN("ioctl unknown cmd %X, type %X by [%s,%d]\n",
+ cmd, _IOC_TYPE(cmd), current->comm, current->pid);
+ return -EINVAL;
+ }
+
+ if (!access_ok(VERIFY_READ, (void __user *)arg, sizeof(struct wmt_lock))) {
+ P_WARN("ioctl access_ok failed, cmd %X, type %X by [%s,%d]\n",
+ cmd, _IOC_TYPE(cmd), current->comm, current->pid);
+ return -EFAULT;
+ }
+
+ lock_arg = (struct wmt_lock *)arg;
+
+ if (lock_arg->lock_type >= MAX_LOCK_TYPE || lock_arg->lock_type < 0) {
+ P_WARN("invalid lock type %ld by [%s,%d]\n",
+ lock_arg->lock_type, current->comm, current->pid);
+ return -E2BIG;
+ }
+
+ spin_lock_irqsave(&gSpinlock, flags);
+ sem = get_sema(lock_arg->lock_type);
+
+ switch (cmd) {
+ case IO_WMT_LOCK:
+ timeout = lock_arg->arg2;
+ /* check if the current thread already get the lock */
+ if (check_busy(lock_arg->lock_type)) {
+ P_WARN("Recursive %s lock by [%s,%d]\n",
+ gLockers[lock_arg->lock_type].type,
+ current->comm, current->pid);
+ return -EBUSY;
+ }
+
+ if (timeout == 0) {
+ ret = down_trylock(sem);
+ if (ret)
+ ret = -ETIME; /* reasonable if lock holded by other */
+ } else if (timeout == -1) {
+ ret = down_interruptible(sem);
+ if (ret)
+ P_INFO("Require %s lock error %d by [%s,%d]\n",
+ gLockers[lock_arg->lock_type].type, ret,
+ current->comm, current->pid);
+ } else {
+ /* require lock with a timeout value, please beware
+ this function can't exit when interrupt */
+ spin_unlock_irqrestore(&gSpinlock, flags);
+ ret = down_timeout(sem, msecs_to_jiffies(timeout));
+ spin_lock_irqsave(&gSpinlock, flags);
+ }
+ if (ret == 0) {
+ o = set_owner(lock_arg->lock_type, filp);
+ if (o)
+ P_DEBUG("%s is locked by [%s,%d], seq %d\n",
+ o->type, o->comm, o->pid, (int)filp->private_data);
+ }
+ break;
+
+ case IO_WMT_UNLOCK:
+ o = get_owner(lock_arg->lock_type);
+ if (o == NULL) {
+ P_WARN("Unnecessary %s unlock from [%s,%d] when lock is free\n",
+ gLockers[lock_arg->lock_type].type,
+ current->comm, current->pid);
+ ret = -EACCES;
+ } else if (filp->private_data == o->private_data) {
+ P_DEBUG("%s is unlocked by [%s,%d], seq %d\n",
+ o->type, o->comm, o->pid, (int)filp->private_data);
+ o->pid = 0;
+ o->private_data = 0;
+ up(sem);
+ ret = 0;
+ } else{
+ P_WARN("Unexpected %s unlock from [%s,%d], hold by [%s,%d] now\n",
+ o->type, current->comm, current->pid, o->comm, o->pid);
+ ret = -EACCES;
+ }
+ break;
+
+ case IO_WMT_CHECK_WAIT:
+ if (sem->count > 0)
+ lock_arg->is_wait = 0;
+ else {
+ if ((sem->wait_list.prev == 0) && (sem->wait_list.next == 0))
+ lock_arg->is_wait = 0;
+ else
+ lock_arg->is_wait = 1;
+ }
+ P_INFO("sem->count: %d\n", sem->count);
+ P_INFO("lock_arg->is_wait: %d\n", lock_arg->is_wait);
+ break;
+
+ default:
+ P_WARN("ioctl unknown cmd 0x%X by [%s,%d]\n",
+ cmd, current->comm, current->pid);
+ ret = -EINVAL;
+ }
+ spin_unlock_irqrestore(&gSpinlock, flags);
+
+ return ret;
+}
+
+/*!*************************************************************************
+* wmt_lock_open
+*
+* Private Function
+*
+* \brief
+*
+* \retval 0 if success, error code if fail
+*/
+static int wmt_lock_open(struct inode *inode, struct file *filp)
+{
+ static atomic_t lock_seq_id = ATOMIC_INIT(0);
+
+ /* use a sequence number as the file open id */
+ filp->private_data = (void *)(atomic_add_return(1, &lock_seq_id));
+ P_DEBUG("open by [%s,%d], seq %d\n",
+ current->comm, current->pid, (int)filp->private_data);
+ return 0;
+}
+
+/*!*************************************************************************
+* wmt_lock_release
+*
+* Private Function
+*
+* \brief
+*
+* \retval 0 if success, error code if fail
+*/
+static int wmt_lock_release(struct inode *inode, struct file *filp)
+{
+ int i, j;
+
+ for (i = 0; i < MAX_LOCK_TYPE; i++) {
+ for (j = 0; j < gLockers[i].max_lock_num; j++) {
+ struct lock_owner *o = &gLockers[i].owners[j];
+ if (o->pid != 0 && filp->private_data == o->private_data) {
+ P_WARN("Auto free %s lock hold by [%s,%d]\n",
+ o->type, o->comm, o->pid);
+ o->pid = 0;
+ o->private_data = 0;
+ up(get_sema(i));
+ }
+ }
+ }
+ P_DEBUG("Release by [%s,%d], seq %d\n",
+ current->comm, current->pid, (int)filp->private_data);
+ return 0;
+}
+
+static const struct file_operations wmt_lock_fops = {
+ .owner = THIS_MODULE,
+ .open = wmt_lock_open,
+ .unlocked_ioctl = wmt_lock_ioctl,
+ .release = wmt_lock_release,
+};
+
+static void check_multi_vd_count(int *max_vd_count)
+{
+ extern int wmt_getsyspara(char *varname, unsigned char *varval, int *varlen);
+
+ char buf[80] = {0};
+ int varlen = 80;
+ int max_count = 1;
+
+ /* Read u-boot parameter to decide value of wmt_codec_debug */
+ /*----------------------------------------------------------------------
+ Check wmt.codec.debug
+ ----------------------------------------------------------------------*/
+ if (wmt_getsyspara("wmt.multi.vd.max", buf, &varlen) == 0)
+ max_count = simple_strtol(buf, NULL, 10);
+
+ if (max_count < 1)
+ max_count = 1;
+ if (max_count > MAX_LOCK_VDEC)
+ max_count = MAX_LOCK_VDEC;
+
+ *max_vd_count = max_count;
+
+ return;
+} /* End of check_debug_option() */
+
+/*!*************************************************************************
+* wmt_lock_init
+*
+* Private Function
+*
+* \brief
+*
+* \retval 0 if success, error code if fail
+*/
+static int __init wmt_lock_init(void)
+{
+ dev_t dev_id;
+ int max_vd_count;
+ int ret, i, j;
+
+ dev_id = MKDEV(WMT_LOCK_MAJOR, WMT_LOCK_MINOR);
+ ret = register_chrdev_region(dev_id, 1, WMT_LOCK_NAME);
+ if (ret < 0) {
+ P_ERROR("can't register %s device %d:%d, ret %d\n",
+ WMT_LOCK_NAME, WMT_LOCK_MAJOR, WMT_LOCK_MINOR, ret);
+ return ret;
+ }
+
+ cdev_init(&wmt_lock_cdev, &wmt_lock_fops);
+ ret = cdev_add(&wmt_lock_cdev, dev_id, 1);
+ if (ret) {
+ P_ERROR("cdev add error(%d).\n", ret);
+ unregister_chrdev_region(dev_id, 1);
+ return ret;
+ }
+
+ /* let udev to handle /dev/wmt-lock */
+ wmt_lock_class = class_create(THIS_MODULE, WMT_LOCK_NAME);
+ device_create(wmt_lock_class, NULL, dev_id, NULL, "%s", WMT_LOCK_NAME);
+
+ create_proc_read_entry(WMT_LOCK_NAME, 0, NULL, lock_read_proc, NULL);
+ P_INFO("init ok, major=%d, minor=%d\n", WMT_LOCK_MAJOR, WMT_LOCK_MINOR);
+
+ spin_lock_init(&gSpinlock);
+
+ check_multi_vd_count(&max_vd_count);
+
+ /* Init sema for JPEG decoder */
+ sema_init(&lock_sem_jpeg, MAX_LOCK_JDEC);
+ gLockers[lock_jpeg].type = "jdec";
+ gLockers[lock_jpeg].sem = &lock_sem_jpeg;
+ gLockers[lock_jpeg].max_lock_num = MAX_LOCK_JDEC;
+
+ /* Init sema for MSVD decoders */
+ sema_init(&lock_sem_video, max_vd_count);
+ gLockers[lock_video].type = "vdec";
+ gLockers[lock_video].sem = &lock_sem_video;
+ gLockers[lock_video].max_lock_num = max_vd_count;
+
+ for (i = 0; i < MAX_LOCK_TYPE; i++) {
+ for (j = 0; j < gLockers[i].max_lock_num; j++) {
+ struct lock_owner *o = &gLockers[i].owners[j];
+ o->type = gLockers[i].type;
+ }
+ }
+ return ret;
+}
+
+/*!*************************************************************************
+* wmt_lock_cleanup
+*
+* Private Function
+*
+* \brief
+*
+* \retval 0 if success, error code if fail
+*/
+static void __exit wmt_lock_cleanup(void)
+{
+ dev_t dev_id = MKDEV(WMT_LOCK_MAJOR, WMT_LOCK_MINOR);
+
+ cdev_del(&wmt_lock_cdev);
+
+ /* let udev to handle /dev/wmt-lock */
+ device_destroy(wmt_lock_class, dev_id);
+ class_destroy(wmt_lock_class);
+
+ unregister_chrdev_region(dev_id, 1);
+ remove_proc_entry(WMT_LOCK_NAME, NULL);
+
+ P_INFO("cleanup done\n");
+}
+
+module_init(wmt_lock_init);
+module_exit(wmt_lock_cleanup);
+
+
+MODULE_AUTHOR("WonderMedia Technologies, Inc.");
+MODULE_DESCRIPTION("WMT Codec Lock device driver");
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/media/video/wmt/wmt-lock.h b/drivers/media/video/wmt/wmt-lock.h
new file mode 100644
index 00000000..cf15aee3
--- /dev/null
+++ b/drivers/media/video/wmt/wmt-lock.h
@@ -0,0 +1,45 @@
+/*++
+ * Common interface for WonderMedia SoC hardware decoder drivers
+ *
+ * Copyright (c) 2008-2013 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+#ifndef WMTLOCK_H
+#define WMTLOCK_H
+
+/*-------------------- MODULE DEPENDENCY -------------------------------------*/
+
+/* Even for multi-decoding, this value should <= 4 */
+#define MAX_LOCK_NUM_VDEC 4 /* Max lock number for MSVD decoders */
+
+
+
+/*-------------------- EXPORTED PRIVATE VARIABLES -----------------------------*/
+#ifdef WMTLOCK_C
+ #define EXTERN
+#else
+ #define EXTERN extern
+#endif /* ifdef WMTLOCK_C */
+
+#undef EXTERN
+
+/*--------------------- EXPORTED PRIVATE FUNCTIONS ---------------------------*/
+
+/*=== END wmt-lock.h ==========================================================*/
+#endif /* #ifndef WMTLOCK_H */
+
diff --git a/drivers/media/video/wmt/wmt-lock.o b/drivers/media/video/wmt/wmt-lock.o
new file mode 100755
index 00000000..8cc27ba5
--- /dev/null
+++ b/drivers/media/video/wmt/wmt-lock.o
Binary files differ
diff --git a/drivers/media/video/wmt/wmt-vd.c b/drivers/media/video/wmt/wmt-vd.c
new file mode 100644
index 00000000..435c375c
--- /dev/null
+++ b/drivers/media/video/wmt/wmt-vd.c
@@ -0,0 +1,541 @@
+/*++
+ * Common interface for WonderMedia SoC hardware decoder drivers
+ *
+ * Copyright (c) 2008-2013 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+
+#include "wmt-vd.h"
+
+#define THE_MB_USER "WMT-VD"
+
+#define DRIVER_NAME "wmt-vd"
+
+#define VD_DEV_NAME "wmt-vd"
+
+/*#define VD_DEBUG_DEF*/
+/*#define VD_WORDY_DEF*/
+
+
+#define VD_INFO(fmt, args...) \
+ do {\
+ printk(KERN_INFO "[wmt-vd] " fmt , ## args);\
+ } while (0)
+
+#define VD_WARN(fmt, args...) \
+ do {\
+ printk(KERN_WARNING "[wmt-vd] " fmt , ## args);\
+ } while (0)
+
+#define VD_ERROR(fmt, args...) \
+ do {\
+ printk(KERN_ERR "[wmt-vd] " fmt , ## args);\
+ } while (0)
+
+#ifdef VD_DEBUG_DEF
+#define VD_DBG(fmt, args...) \
+ do {\
+ printk(KERN_DEBUG "[wmt-vd] %s: " fmt, __func__ , ## args);\
+ } while (0)
+#else
+#define VD_DBG(fmt, args...)
+#undef VD_WORDY_DEF
+#endif
+
+#ifdef VD_WORDY_DEF
+#define VD_WDBG(fmt, args...) VD_DBG(fmt, args...)
+#else
+#define VD_WDBG(fmt, args...)
+#endif
+
+
+static struct class *vd_class;
+static int videodecoder_minor;
+static int videodecoder_dev_nr = 1;
+static struct cdev *videodecoder_cdev;
+
+static struct videodecoder *decoders[VD_MAX] = {0};
+
+static struct vd_resource vd_res = {
+ .prdt = { NULL, 0x0, MAX_INPUT_BUF_SIZE},
+};
+
+static DEFINE_SEMAPHORE(vd_sem);
+
+static int wmt_vd_open(struct inode *inode, struct file *filp)
+{
+ int ret = -EINVAL;
+ unsigned int idx = VD_MAX;
+
+ down(&vd_sem);
+ idx = iminor(inode);
+
+ if (idx < VD_MAX && decoders[idx]) {
+ struct videodecoder *vd = decoders[idx];
+
+ if (vd && vd->fops.open) {
+ if (idx == VD_JPEG)
+ filp->private_data = (void *)&(vd_res.prdt);
+ ret = vd->fops.open(inode, filp);
+ }
+ VD_DBG("decoder %s opened.\n", vd->name);
+ }
+ up(&vd_sem);
+
+ return ret;
+} /* End of wmt_vd_open() */
+
+static int wmt_vd_release(struct inode *inode, struct file *filp)
+{
+ int ret = -EINVAL;
+ unsigned int idx = VD_MAX;
+
+ down(&vd_sem);
+ idx = iminor(inode);
+
+ if (idx < VD_MAX && decoders[idx]) {
+ struct videodecoder *vd = decoders[idx];
+ if (vd && vd->fops.release)
+ ret = vd->fops.release(inode, filp);
+ VD_DBG("decoder %s closed.\n", vd->name);
+ }
+ up(&vd_sem);
+
+ return ret;
+} /* End of wmt_vd_release() */
+
+static long wmt_vd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+{
+ int ret = -EINVAL;
+ unsigned int idx = VD_MAX;
+ struct inode *inode = filp->f_mapping->host;
+
+ /* check type and number, if fail return ENOTTY */
+ if ((_IOC_TYPE(cmd) != VD_IOC_MAGIC) || (_IOC_NR(cmd) > VD_IOC_MAXNR))
+ return -ENOTTY;
+
+ /* check argument area */
+ if (_IOC_DIR(cmd) & _IOC_READ)
+ ret = !access_ok(VERIFY_WRITE, (void __user *)arg,
+ _IOC_SIZE(cmd));
+ else if (_IOC_DIR(cmd) & _IOC_WRITE)
+ ret = !access_ok(VERIFY_READ, (void __user *)arg,
+ _IOC_SIZE(cmd));
+
+ if (ret)
+ return -EFAULT;
+
+ down(&vd_sem);
+ idx = iminor(inode);
+ if (idx < VD_MAX && decoders[idx]) {
+ struct videodecoder *vd = decoders[idx];
+
+ if (vd && vd->fops.unlocked_ioctl)
+ ret = vd->fops.unlocked_ioctl(filp, cmd, arg);
+ }
+ up(&vd_sem);
+
+ return ret;
+} /* End of wmt_vd_ioctl() */
+
+static int wmt_vd_mmap(struct file *filp, struct vm_area_struct *vma)
+{
+ int ret = -EINVAL;
+ unsigned int idx = VD_MAX;
+
+ down(&vd_sem);
+ if (filp && filp->f_dentry && filp->f_dentry->d_inode)
+ idx = iminor(filp->f_dentry->d_inode);
+
+ if (idx < VD_MAX && decoders[idx]) {
+ struct videodecoder *vd = decoders[idx];
+ if (vd && vd->fops.mmap)
+ ret = vd->fops.mmap(filp, vma);
+ }
+ up(&vd_sem);
+
+ return ret;
+}
+
+const struct file_operations videodecoder_fops = {
+ .owner = THIS_MODULE,
+ .open = wmt_vd_open,
+ .release = wmt_vd_release,
+ .unlocked_ioctl = wmt_vd_ioctl,
+ .mmap = wmt_vd_mmap,
+};
+
+static int wmt_vd_probe(struct platform_device *dev)
+{
+ dev_t dev_no;
+ int ret;
+
+ dev_no = MKDEV(VD_MAJOR, videodecoder_minor);
+
+ /* register char device */
+ videodecoder_cdev = cdev_alloc();
+ if (!videodecoder_cdev) {
+ VD_ERROR("alloc dev error.\n");
+ return -ENOMEM;
+ }
+
+ cdev_init(videodecoder_cdev, &videodecoder_fops);
+ ret = cdev_add(videodecoder_cdev, dev_no, 1);
+
+ if (ret) {
+ VD_ERROR("reg char dev error(%d).\n", ret);
+ cdev_del(videodecoder_cdev);
+ return ret;
+ }
+
+ vd_res.prdt.virt = dma_alloc_coherent(NULL, vd_res.prdt.size,
+ &vd_res.prdt.phys, GFP_KERNEL | GFP_DMA);
+ if (!vd_res.prdt.virt) {
+ VD_ERROR("allocate video PRDT buffer error.\n");
+ cdev_del(videodecoder_cdev);
+ vd_res.prdt.virt = NULL;
+ vd_res.prdt.phys = 0;
+ return -ENOMEM;
+ }
+
+ VD_DBG("prob /dev/%s major %d, minor %d, Resource:\n",
+ DRIVER_NAME, VD_MAJOR, videodecoder_minor);
+
+ VD_DBG("PRDT %p/%x, size %d KB\n",
+ vd_res.prdt.virt, vd_res.prdt.phys, vd_res.prdt.size/1024);
+
+ return ret;
+}
+
+static int wmt_vd_remove(struct platform_device *dev)
+{
+ unsigned int idx = 0;
+
+ down(&vd_sem);
+ while (idx < VD_MAX) {
+ if (decoders[idx] && decoders[idx]->remove) {
+ decoders[idx]->remove();
+ decoders[idx] = NULL;
+ }
+ idx++;
+ }
+ up(&vd_sem);
+
+ if (vd_res.prdt.virt)
+ dma_free_coherent(NULL, MAX_INPUT_BUF_SIZE,
+ vd_res.prdt.virt, vd_res.prdt.phys);
+
+ return 0;
+}
+
+static int wmt_vd_suspend(struct platform_device *dev, pm_message_t state)
+{
+ int ret;
+ unsigned int idx = 0;
+
+ down(&vd_sem);
+ while (idx < VD_MAX) {
+ if (decoders[idx] && decoders[idx]->suspend) {
+ ret = decoders[idx]->suspend(state);
+ if (ret < 0)
+ VD_WARN("vdec %s suspend fail. ret:%d\n",
+ decoders[idx]->name, ret);
+ }
+ idx++;
+ }
+ up(&vd_sem);
+
+ return 0;
+}
+
+static int wmt_vd_resume(struct platform_device *dev)
+{
+ int ret;
+ unsigned int idx = 0;
+
+ down(&vd_sem);
+ while (idx < VD_MAX) {
+ if (decoders[idx] && decoders[idx]->resume) {
+ ret = decoders[idx]->resume();
+ if (ret < 0) {
+ VD_WARN("vdec %s resume fail. ret:%d\n",
+ decoders[idx]->name, ret);
+ }
+ }
+ idx++;
+ }
+ up(&vd_sem);
+
+ return 0;
+}
+
+static void wmt_vd_elease(struct device *device)
+{
+ unsigned int idx = 0;
+
+ down(&vd_sem);
+ while (idx < VD_MAX) {
+ if (decoders[idx] && decoders[idx]->remove) {
+ decoders[idx]->remove();
+ decoders[idx] = NULL;
+ }
+ idx++;
+ }
+ up(&vd_sem);
+
+ if (vd_res.prdt.virt)
+ dma_free_coherent(NULL, MAX_INPUT_BUF_SIZE,
+ vd_res.prdt.virt, vd_res.prdt.phys);
+
+ return;
+}
+
+static struct platform_driver videodecoder_driver = {
+ .driver = {
+ .name = "wmt-vd",
+ .bus = &platform_bus_type,
+ },
+ .probe = wmt_vd_probe,
+ .remove = wmt_vd_remove,
+ .suspend = wmt_vd_suspend,
+ .resume = wmt_vd_resume
+};
+
+static struct platform_device videodecoder_device = {
+ .name = "wmt-vd",
+ .id = 0,
+ .dev = {
+ .release = wmt_vd_elease,
+ },
+ .num_resources = 0, /* ARRAY_SIZE(spi_resources), */
+ .resource = NULL, /* spi_resources, */
+};
+
+#ifdef CONFIG_PROC_FS
+static int wmt_vd_read_proc(
+ char *page,
+ char **start,
+ off_t off,
+ int count,
+ int *eof,
+ void *data)
+{
+ int size;
+ unsigned int idx = 0;
+ char *p;
+
+ down(&vd_sem);
+ p = page;
+ p += sprintf(p, "***** video decoder information *****\n");
+
+ while (idx < VD_MAX) {
+ if (decoders[idx] && decoders[idx]->get_info) {
+ size = decoders[idx]->get_info(p, start, off, count);
+ count -= size;
+ if (count <= 40)
+ break;
+ p += size;
+ }
+ idx++;
+ }
+ p += sprintf(p, "**************** end ****************\n");
+ up(&vd_sem);
+
+ *eof = 1;
+
+ return p - page;
+}
+#endif
+
+int wmt_vd_register(struct videodecoder *dec)
+{
+ int ret = 0;
+ dev_t dev_no;
+
+ if (!dec || dec->id >= VD_MAX) {
+ VD_WARN("register invalid video decoder\n");
+ return -1;
+ }
+
+ if (decoders[dec->id]) {
+ VD_WARN("video decoder (ID=%d) exist.(E:%32s, N:%32s)\n",
+ dec->id, decoders[dec->id]->name, dec->name);
+ return -1;
+ }
+
+ dev_no = MKDEV(VD_MAJOR, dec->id);
+ ret = register_chrdev_region(dev_no, videodecoder_dev_nr, dec->name);
+ if (ret < 0) {
+ VD_ERROR("can't get %s device minor %d\n", dec->name, dec->id);
+ return ret;
+ }
+
+ dec->device = cdev_alloc();
+ if (!dec->device) {
+ unregister_chrdev_region(dev_no, videodecoder_dev_nr);
+ VD_ERROR("alloc dev error\n");
+ return -ENOMEM;
+ }
+
+ cdev_init(dec->device, &videodecoder_fops);
+ ret = cdev_add(dec->device, dev_no, 1);
+ if (ret) {
+ VD_ERROR("reg char dev error(%d)\n", ret);
+ unregister_chrdev_region(dev_no, videodecoder_dev_nr);
+ cdev_del(dec->device);
+ dec->device = NULL;
+ return ret;
+ }
+
+ if (dec->irq_num && dec->isr) {
+ ret = request_irq(dec->irq_num, dec->isr,
+ IRQF_SHARED, dec->name, dec->isr_data);
+ VD_INFO("%s Request IRQ %d %s.\n",
+ dec->name, dec->irq_num, (ret < 0) ? "Fail " : "Ok");
+ if (ret) {
+ VD_ERROR("isr: 0x%p, isr_data: 0x%p (ret: %d)\n",
+ dec->isr, dec->isr_data, ret);
+ goto EXIT_wmt_vd_register;
+ }
+ }
+
+ if (!ret) {
+ if (dec->setup)
+ ret = dec->setup();
+ }
+
+ if (ret >= 0) {
+ down(&vd_sem);
+ decoders[dec->id] = dec;
+ up(&vd_sem);
+ VD_INFO("%s registered major %d minor %d\n",
+ dec->name, VD_MAJOR, dec->id);
+
+ /* let udev to handle /dev/ node */
+ dec->vd_class = class_create(dec->fops.owner, dec->name);
+ device_create(dec->vd_class, 0, dev_no, 0, "%s", dec->name);
+ } else {
+ VD_ERROR("%s register major %d minor %d fail\n",
+ dec->name, VD_MAJOR, dec->id);
+ free_irq(dec->irq_num, (void *)dec->isr_data);
+ unregister_chrdev_region(dev_no, videodecoder_dev_nr);
+ cdev_del(dec->device);
+ dec->device = NULL;
+ }
+EXIT_wmt_vd_register:
+ return ret;
+}
+EXPORT_SYMBOL(wmt_vd_register);
+
+int wmt_vd_unregister(struct videodecoder *dec)
+{
+ int ret = 0;
+ dev_t dev_no;
+
+ if (!dec || dec->id >= VD_MAX || !dec->device) {
+ VD_WARN("unregister invalid video decoder\n");
+ return -1;
+ }
+
+ if (decoders[dec->id] != dec) {
+ VD_WARN("unregiseter wrong video decoder. (E:%32s, R:%32s)\n",
+ decoders[dec->id]->name, dec->name);
+ return -1;
+ }
+
+ down(&vd_sem);
+ decoders[dec->id] = NULL;
+ up(&vd_sem);
+
+ if (dec->remove)
+ ret = dec->remove();
+
+ dev_no = MKDEV(VD_MAJOR, dec->id);
+ free_irq(dec->irq_num, (void *)dec->isr_data);
+
+ /* let udev to handle /dev/ node */
+ device_destroy(dec->vd_class, dev_no);
+ class_destroy(dec->vd_class);
+
+ unregister_chrdev_region(dev_no, videodecoder_dev_nr);
+ cdev_del(dec->device);
+ dec->device = NULL;
+
+ return ret;
+}
+EXPORT_SYMBOL(wmt_vd_unregister);
+
+static int __init videodecoder_init(void)
+{
+ int ret;
+ dev_t dev_no;
+
+ dev_no = MKDEV(VD_MAJOR, videodecoder_minor);
+ ret = register_chrdev_region(dev_no, videodecoder_dev_nr, "wmt-vd");
+ if (ret < 0) {
+ VD_ERROR("can't get %s major %d\n", DRIVER_NAME, VD_MAJOR);
+ return ret;
+ }
+
+#ifdef CONFIG_PROC_FS
+ create_proc_read_entry("wmt-vd", 0, NULL, wmt_vd_read_proc, NULL);
+ VD_DBG("create video decoder proc\n");
+#endif
+
+ ret = platform_driver_register(&videodecoder_driver);
+ if (!ret) {
+ ret = platform_device_register(&videodecoder_device);
+ if (ret)
+ platform_driver_unregister(&videodecoder_driver);
+ }
+
+ /* let udev to handle /dev/wmt-vd */
+ vd_class = class_create(THIS_MODULE, VD_DEV_NAME);
+ device_create(vd_class, NULL, dev_no, NULL, "%s", VD_DEV_NAME);
+
+ VD_INFO("WonderMedia HW decoder driver inited\n");
+
+ return ret;
+}
+
+void __exit videodecoder_exit(void)
+{
+ dev_t dev_no;
+
+ platform_driver_unregister(&videodecoder_driver);
+ platform_device_unregister(&videodecoder_device);
+ dev_no = MKDEV(VD_MAJOR, videodecoder_minor);
+
+ /* let udev to handle /dev/wmt-vd */
+ device_destroy(vd_class, dev_no);
+ class_destroy(vd_class);
+
+ unregister_chrdev_region(dev_no, videodecoder_dev_nr);
+
+ VD_INFO("WonderMedia HW decoder driver exit\n");
+
+ return;
+}
+
+fs_initcall(videodecoder_init);
+module_exit(videodecoder_exit);
+
+MODULE_AUTHOR("WonderMedia Technologies, Inc.");
+MODULE_DESCRIPTION("Video Codec device driver");
+MODULE_LICENSE("GPL");
+
diff --git a/drivers/media/video/wmt/wmt-vd.h b/drivers/media/video/wmt/wmt-vd.h
new file mode 100644
index 00000000..a981650b
--- /dev/null
+++ b/drivers/media/video/wmt/wmt-vd.h
@@ -0,0 +1,106 @@
+/*++
+ * Common interface for WonderMedia SoC hardware decoder drivers
+ *
+ * Copyright (c) 2008-2013 WonderMedia Technologies, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ *
+ * WonderMedia Technologies, Inc.
+ * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
+--*/
+#ifndef WMT_VD_H
+#define WMT_VD_H
+
+/*-------------------- MODULE DEPENDENCY -------------------------------------*/
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/fs.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/errno.h>
+#include <asm/uaccess.h>
+#include <linux/kdev_t.h>
+#include <linux/cdev.h>
+#include <linux/major.h>
+#include <linux/interrupt.h>
+#include <linux/spinlock.h>
+#include <linux/mm.h>
+#include <asm/page.h>
+
+
+#include <linux/dma-mapping.h>
+#include <linux/irqreturn.h>
+
+#include <mach/irqs.h>
+#include <mach/hardware.h>
+#include <linux/sched.h> /* for 2.6.32 wait_event_interruptible() */
+
+#include <linux/wmt-mb.h>
+
+#ifdef CONFIG_PROC_FS
+#include <linux/proc_fs.h>
+ #include <linux/uaccess.h>
+#endif
+
+#include "com-vd.h"
+
+
+/*-------------------- EXPORTED PRIVATE CONSTANTS ------------------------*/
+
+/*--------------------------------------------------------------------------
+ Since the page size in kernel is 4 KB, so we may assume the max buffer
+ size as input buffer size = (prd_size/8)*4KB
+ In short, 1 KB PRD size could store about 0.5 MB data.
+ If we support maximun input buffer size is 50 MB, we must set prd_size
+ as 100 KB.
+---------------------------------------------------------------------------*/
+#define MAX_INPUT_BUF_SIZE (100*1024) /* 100 KB */
+
+struct vd_mem_set {
+ void *virt;
+ dma_addr_t phys;
+ unsigned int size;
+};
+
+struct vd_resource {
+ struct vd_mem_set prdt;
+ struct vd_mem_set cnm_fw_real;
+ struct vd_mem_set cnm_fw_align;
+};
+
+struct videodecoder {
+ char name[32];
+ int id;
+ int (*setup)(void);
+ int (*remove)(void);
+ int (*suspend)(pm_message_t state);
+ int (*resume)(void);
+ const struct file_operations fops;
+ int (*get_info)(char *, char **, off_t, int);
+ struct cdev *device;
+ int irq_num;
+ irqreturn_t (*isr)(int irq, void *isr_data);
+ void *isr_data;
+
+ struct class *vd_class; /* for udev */
+};
+
+int wmt_vd_register(struct videodecoder *);
+int wmt_vd_unregister(struct videodecoder *);
+
+#endif
+
diff --git a/drivers/media/video/wmt/wmt-vd.o b/drivers/media/video/wmt/wmt-vd.o
new file mode 100755
index 00000000..bc32b45f
--- /dev/null
+++ b/drivers/media/video/wmt/wmt-vd.o
Binary files differ