From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- drivers/media/sprd_dcam/Kconfig | 48 + drivers/media/sprd_dcam/Makefile | 26 + drivers/media/sprd_dcam/common/Makefile.inc | 15 + drivers/media/sprd_dcam/common/dcam_img.c | 3779 +++++++++++++++ drivers/media/sprd_dcam/common/flash_test.c | 115 + drivers/media/sprd_dcam/common/flash_test.h | 38 + drivers/media/sprd_dcam/common/gen_scale_coef.c | 699 +++ drivers/media/sprd_dcam/common/gen_scale_coef.h | 34 + drivers/media/sprd_dcam/common/parse_hwinfo.c | 353 ++ drivers/media/sprd_dcam/common/parse_hwinfo.h | 72 + .../media/sprd_dcam/common/parse_hwinfo_tshark2.h | 47 + drivers/media/sprd_dcam/common/sin_cos.c | 270 ++ drivers/media/sprd_dcam/common/sin_cos.h | 74 + drivers/media/sprd_dcam/flash/Makefile | 82 + drivers/media/sprd_dcam/flash/flash.h | 22 + drivers/media/sprd_dcam/flash/flash_common.c | 44 + drivers/media/sprd_dcam/flash/flash_gpio.c | 56 + drivers/media/sprd_dcam/flash/flash_kanas_w.c | 66 + .../sprd_dcam/flash/flash_parallel_connect_bg.c | 103 + drivers/media/sprd_dcam/flash/flash_sgm3140.c | 64 + drivers/media/sprd_dcam/flash/flash_sm5701.c | 48 + drivers/media/sprd_dcam/flash/flash_sprd_sm5701.c | 48 + drivers/media/sprd_dcam/flash/flash_vivalto.c | 53 + drivers/media/sprd_dcam/pike/dcam_drv.c | 4549 ++++++++++++++++++ drivers/media/sprd_dcam/pike/dcam_drv.h | 448 ++ drivers/media/sprd_dcam/pike/dcam_reg.h | 192 + drivers/media/sprd_dcam/sc8830/dcam_drv.h | 420 ++ drivers/media/sprd_dcam/sharkl/dcam_drv.c | 4580 ++++++++++++++++++ drivers/media/sprd_dcam/sharkl/dcam_drv.h | 445 ++ drivers/media/sprd_dcam/sharkl/dcam_reg.h | 205 + drivers/media/sprd_dcam/tshark/dcam_drv.c | 4693 +++++++++++++++++++ drivers/media/sprd_dcam/tshark/dcam_drv.h | 449 ++ drivers/media/sprd_dcam/tshark/dcam_reg.h | 197 + drivers/media/sprd_dcam/tshark2/dcam_drv.c | 4913 ++++++++++++++++++++ drivers/media/sprd_dcam/tshark2/dcam_drv.h | 454 ++ drivers/media/sprd_dcam/tshark2/dcam_reg.h | 216 + 36 files changed, 27917 insertions(+) create mode 100644 drivers/media/sprd_dcam/Kconfig create mode 100755 drivers/media/sprd_dcam/Makefile create mode 100644 drivers/media/sprd_dcam/common/Makefile.inc create mode 100755 drivers/media/sprd_dcam/common/dcam_img.c create mode 100644 drivers/media/sprd_dcam/common/flash_test.c create mode 100644 drivers/media/sprd_dcam/common/flash_test.h create mode 100644 drivers/media/sprd_dcam/common/gen_scale_coef.c create mode 100644 drivers/media/sprd_dcam/common/gen_scale_coef.h create mode 100755 drivers/media/sprd_dcam/common/parse_hwinfo.c create mode 100755 drivers/media/sprd_dcam/common/parse_hwinfo.h create mode 100644 drivers/media/sprd_dcam/common/parse_hwinfo_tshark2.h create mode 100644 drivers/media/sprd_dcam/common/sin_cos.c create mode 100644 drivers/media/sprd_dcam/common/sin_cos.h create mode 100755 drivers/media/sprd_dcam/flash/Makefile create mode 100644 drivers/media/sprd_dcam/flash/flash.h create mode 100644 drivers/media/sprd_dcam/flash/flash_common.c create mode 100644 drivers/media/sprd_dcam/flash/flash_gpio.c create mode 100644 drivers/media/sprd_dcam/flash/flash_kanas_w.c create mode 100644 drivers/media/sprd_dcam/flash/flash_parallel_connect_bg.c create mode 100644 drivers/media/sprd_dcam/flash/flash_sgm3140.c create mode 100644 drivers/media/sprd_dcam/flash/flash_sm5701.c create mode 100644 drivers/media/sprd_dcam/flash/flash_sprd_sm5701.c create mode 100644 drivers/media/sprd_dcam/flash/flash_vivalto.c create mode 100644 drivers/media/sprd_dcam/pike/dcam_drv.c create mode 100755 drivers/media/sprd_dcam/pike/dcam_drv.h create mode 100644 drivers/media/sprd_dcam/pike/dcam_reg.h create mode 100755 drivers/media/sprd_dcam/sc8830/dcam_drv.h create mode 100644 drivers/media/sprd_dcam/sharkl/dcam_drv.c create mode 100755 drivers/media/sprd_dcam/sharkl/dcam_drv.h create mode 100644 drivers/media/sprd_dcam/sharkl/dcam_reg.h create mode 100644 drivers/media/sprd_dcam/tshark/dcam_drv.c create mode 100755 drivers/media/sprd_dcam/tshark/dcam_drv.h create mode 100755 drivers/media/sprd_dcam/tshark/dcam_reg.h create mode 100755 drivers/media/sprd_dcam/tshark2/dcam_drv.c create mode 100755 drivers/media/sprd_dcam/tshark2/dcam_drv.h create mode 100755 drivers/media/sprd_dcam/tshark2/dcam_reg.h (limited to 'drivers/media/sprd_dcam') diff --git a/drivers/media/sprd_dcam/Kconfig b/drivers/media/sprd_dcam/Kconfig new file mode 100644 index 00000000..2cc0ee36 --- /dev/null +++ b/drivers/media/sprd_dcam/Kconfig @@ -0,0 +1,48 @@ +if VIDEO_DCAM_SPRD +choice + prompt "Camera resolution" + default CAMERA_5M + +config CAMERA_2M + bool "2M pixels" + +config CAMERA_3M + bool "3M pixels" + +config CAMERA_5M + bool "5M pixels" + +config CAMERA_8M + bool "8M pixels" + + +endchoice + +choice + prompt "Camera capture mode" + default CAMERA_NON_ZSL + +config CAMERA_ZSL + bool "zsl capture" + +config CAMERA_NON_ZSL + bool "non zsl capture" + +endchoice + +choice + prompt "Sensor Output" + default SENSOR_OUTPUT_YUV + +config SENSOR_OUTPUT_RAW + bool "sensor outputs raw" + +config SENSOR_OUTPUT_YUV + bool "sensor outputs yuv" + +endchoice + + +endif + + diff --git a/drivers/media/sprd_dcam/Makefile b/drivers/media/sprd_dcam/Makefile new file mode 100755 index 00000000..f0318e52 --- /dev/null +++ b/drivers/media/sprd_dcam/Makefile @@ -0,0 +1,26 @@ +# SC88XX Platform Support +include drivers/media/sprd_dcam/common/Makefile.inc + +obj-y += sprd_dcam.o +#ccflags-y += -Idrivers/media/sprd_dcam/common +common-file := common/dcam_img.o common/parse_hwinfo.o common/gen_scale_coef.o common/sin_cos.o common/flash_test.o + + +ifeq ($(CONFIG_ARCH_SCX30G),y) + +ifeq ($(CONFIG_ARCH_SCX20),y) +sprd_dcam-objs := pike/dcam_drv.o $(common-file) +else ifeq ($(CONFIG_ARCH_SCX30G2),y) +sprd_dcam-objs := tshark2/dcam_drv.o $(common-file) +else +sprd_dcam-objs := tshark/dcam_drv.o $(common-file) +endif + +else ifeq ($(CONFIG_ARCH_SCX35L),y) +ifeq ($(CONFIG_ARCH_SCX35LT8),y) +sprd_dcam-objs := tshark2/dcam_drv.o $(common-file) +else +sprd_dcam-objs := sharkl/dcam_drv.o $(common-file) +endif +endif +obj-y += flash/ diff --git a/drivers/media/sprd_dcam/common/Makefile.inc b/drivers/media/sprd_dcam/common/Makefile.inc new file mode 100644 index 00000000..16cf7800 --- /dev/null +++ b/drivers/media/sprd_dcam/common/Makefile.inc @@ -0,0 +1,15 @@ +# SC88XX Platform Support + +ifeq ($(CONFIG_ARCH_SCX30G2),y) +ccflags-y += -Idrivers/media/sprd_dcam/tshark +DEFS = -DVERSION3D=1 +else ifeq ($(CONFIG_ARCH_SCX30G),y) +ccflags-y += -Idrivers/media/sprd_dcam/tshark +DEFS = -DVERSION3T=1 +else ifeq ($(CONFIG_ARCH_SCX35L),y) +ccflags-y += -Idrivers/media/sprd_dcam/sharkl +DEFS = -DVERSION3L=1 +endif + +ccflags-y += $(DEFS) +ccflags-y += -Idrivers/media/sprd_dcam/common diff --git a/drivers/media/sprd_dcam/common/dcam_img.c b/drivers/media/sprd_dcam/common/dcam_img.c new file mode 100755 index 00000000..5ca10bd1 --- /dev/null +++ b/drivers/media/sprd_dcam/common/dcam_img.c @@ -0,0 +1,3779 @@ +/* + * Copyright (C) 2012 Spreadtrum Communications Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * 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. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef CONFIG_64BIT +#include +#include +#include +#endif +#include +#include +#include +#include +#include + +#include +#include "dcam_drv.h" + +#include + + +#include <../flash/flash.h> +#include