summaryrefslogtreecommitdiff
path: root/drivers/media/sprd_isp/isp2.0/tshark2/inc/isp_drv.h
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
committerYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
commit8e4bff4cab0ddac6060645b0715210484d02ff40 (patch)
tree3a5c3024371a04692a3a6d9974d001cdff8ebf84 /drivers/media/sprd_isp/isp2.0/tshark2/inc/isp_drv.h
Initial file dump from open source releaseHEADmaster
Diffstat (limited to 'drivers/media/sprd_isp/isp2.0/tshark2/inc/isp_drv.h')
-rw-r--r--drivers/media/sprd_isp/isp2.0/tshark2/inc/isp_drv.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/drivers/media/sprd_isp/isp2.0/tshark2/inc/isp_drv.h b/drivers/media/sprd_isp/isp2.0/tshark2/inc/isp_drv.h
new file mode 100644
index 00000000..444a1b27
--- /dev/null
+++ b/drivers/media/sprd_isp/isp2.0/tshark2/inc/isp_drv.h
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+
+#ifndef _ISP_DRV_HEADER_
+#define _ISP_DRV_HEADER_
+
+#include <linux/semaphore.h>
+#include <linux/spinlock_types.h>
+
+#define ISP_QUEUE_LENGTH 16
+#define ISP_BING4AWB_NUM 2
+
+
+struct isp_node {
+ uint32_t irq_val0;
+ uint32_t irq_val1;
+ uint32_t irq_val2;
+ uint32_t irq_val3;
+ uint32_t reserved;
+ struct isp_time time;
+};
+
+struct isp_queue {
+ struct isp_node node[ISP_QUEUE_LENGTH];
+ struct isp_node *write;
+ struct isp_node *read;
+};
+
+struct isp_b4awb_buf {
+ uint32_t buf_id;
+ uint32_t buf_flag;
+ unsigned long buf_phys_addr;
+};
+
+struct isp_k_private {
+ atomic_t users;
+ struct device_node *dn;
+ struct clk *clock;
+ struct semaphore device_lock;
+ struct semaphore ioctl_lock;
+ unsigned long block_buf_addr;
+ uint32_t block_buf_len;
+ unsigned long reg_buf_addr;
+ uint32_t reg_buf_len;
+ uint32_t lsc_load_buf_id;
+ uint32_t lsc_update_buf_id;
+ unsigned long raw_aem_buf_addr;
+ uint32_t raw_aem_buf_len;
+ uint32_t ct_load_buf_id;
+ unsigned long full_gamma_buf_addr;
+ uint32_t full_gamma_buf_len;
+ uint32_t full_gamma_buf_id;
+ unsigned long yuv_ygamma_buf_addr;
+ uint32_t yuv_ygamma_buf_len;
+ uint32_t yuv_ygamma_buf_id;
+ unsigned long raw_awbm_buf_addr;
+ uint32_t raw_awbm_buf_len;
+ struct isp_b4awb_buf b4awb_buf[ISP_BING4AWB_NUM];
+ uint32_t lsc_buf_phys_addr;
+ unsigned long yiq_antiflicker_buf_addr;
+ uint32_t yiq_antiflicker_len;
+ uint32_t yiq_antiflicker_order;
+ unsigned long yiq_aem_buf_addr;
+ uint32_t yiq_aem_buf_len;
+};
+
+struct isp_drv_private {
+ spinlock_t isr_lock;
+ struct semaphore isr_done_lock;
+ struct isp_queue queue;
+};
+
+struct isp_k_file {
+ struct isp_k_private *isp_private;
+ struct isp_drv_private drv_private;
+};
+
+int32_t isp_get_int_num(struct isp_node *node);
+void isp_clr_int(void);
+void isp_en_irq(uint32_t irq_mode);
+int32_t isp_axi_bus_waiting(void);
+int32_t isp_capability(void *param);
+int32_t isp_cfg_param(void *param, struct isp_k_private *isp_private);
+
+#endif