Remove build warnings.
Change-Id: Iecca7b0767d47abb01e444b9a34d861917e5e149
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
#define DCAM_RELEASE 0
#define DCAM_QUEUE_LENGTH 16
#define DCAM_TIMING_LEN 16
-#if CONFIG_SC_FPGA
+#ifdef CONFIG_SC_FPGA
#define DCAM_TIMEOUT (2000*100)
#else
#define DCAM_TIMEOUT 1500
struct dcam_dev *dev = (struct dcam_dev*)param;
struct dcam_path_spec *path;
struct dcam_node node;
- uint32_t fmr_index;
+#if 0
struct dcam_img_buf_addr buf_addr;
+#endif
if (NULL == frame || NULL == param || 0 == atomic_read(&dev->stream_on))
return -EINVAL;
{
int ret = DCAM_RTN_SUCCESS;
struct dcam_dev *dev = (struct dcam_dev*)param;
- struct dcam_path_spec *path;
struct dcam_node node;
+#if 0
+ struct dcam_path_spec *path;
struct dcam_img_buf_addr buf_addr;
+#endif
if (NULL == param || 0 == atomic_read(&dev->stream_on))
return -EINVAL;
{
int ret = DCAM_RTN_SUCCESS;
struct dcam_dev *dev = (struct dcam_dev*)param;
- struct dcam_path_spec *path;
struct dcam_node node;
+#if 0
+ struct dcam_path_spec *path;
struct dcam_img_buf_addr buf_addr;
+#endif
if (NULL == param || 0 == atomic_read(&dev->stream_on))
return -EINVAL;
struct dcam_path_spec* path_spec)
{
int ret = DCAM_RTN_SUCCESS;
- uint32_t param, i;
+ uint32_t param;
if (NULL == path_cfg || NULL == path_spec)
return -EINVAL;
struct dcam_path_spec* path_spec)
{
int ret = DCAM_RTN_SUCCESS;
- uint32_t param, i;
+ uint32_t param;
if (NULL == path_cfg || NULL == path_spec)
return -EINVAL;
LOCAL int sprd_img_local_clear_path_buffer(struct dcam_dev *dev, int path_id)
{
- int ret = 0;
struct dcam_path_spec *path = NULL;
if (unlikely(NULL == dev)) {
LOCAL int sprd_img_queue_write(struct dcam_queue *queue, struct dcam_node *node)
{
struct dcam_node *ori_node;
- unsigned long lock_flag;
if (NULL == queue || NULL == node)
return -EINVAL;
LOCAL int sprd_img_queue_enable(struct dcam_queue *queue, uint32_t channel_id)
{
- struct dcam_node *cur_node;
unsigned int i = 0;
if (NULL == queue)
int fmr_index, i;
int ret = 0;
- DCAM_TRACE("SPRD_IMG: sprd_img_read %ld, dev %p \n", cnt, dev);
+ DCAM_TRACE("SPRD_IMG: sprd_img_read %zu, dev %p \n", cnt, dev);
if (!dev)
return -EFAULT;
if (cnt < sizeof(struct sprd_img_read_op)) {
- printk("sprd_img_read: error, cnt %ld read_op %ld \n", cnt, sizeof(struct sprd_img_read_op));
+ printk("sprd_img_read: error, cnt %zu read_op %zu \n", cnt, sizeof(struct sprd_img_read_op));
return -EIO;
}
if (IMG_TX_DONE == read_op.evt || IMG_CANCELED_BUF == read_op.evt) {
read_op.parm.frame.channel_id = node.f_type;
path = &dev->dcam_cxt.dcam_path[read_op.parm.frame.channel_id];
- DCAM_TRACE("SPRD_IMG: node, 0x%x %d %d \n", node, node.index, path->frm_id_base);
+ DCAM_TRACE("SPRD_IMG: node, 0x%x %d %d \n", node.irq_flag, node.index, path->frm_id_base);
read_op.parm.frame.index = path->frm_id_base;//node.index;
read_op.parm.frame.height = node.height;
read_op.parm.frame.length = node.reserved;
uint32_t index;
int ret = 0;
- DCAM_TRACE("SPRD_IMG: sprd_img_write %ld, dev %p \n", cnt, dev);
+ DCAM_TRACE("SPRD_IMG: sprd_img_write %zu, dev %p \n", cnt, dev);
if (!dev)
return -EFAULT;
if (cnt < sizeof(struct sprd_img_write_op)) {
- printk("sprd_img_write: error, cnt %ld read_op %ld \n", cnt, sizeof(struct sprd_img_write_op));
+ printk("sprd_img_write: error, cnt %zu read_op %zu \n", cnt, sizeof(struct sprd_img_write_op));
return -EIO;
}
return;
}
if (dcam_regbase == 0 && strcmp(dn->name, "sprd_dcam") == 0) {
- dcam_regbase = ioremap_nocache(r.start, resource_size(&r));
+ dcam_regbase = (uintptr_t)ioremap_nocache(r.start, resource_size(&r));
PARSE_TRACE("Dcam register base addr: 0x%lx\n", dcam_regbase);
} else if (isp_regbase == 0 && strcmp(dn->name, "sprd_isp") == 0) {
- isp_regbase = ioremap_nocache(r.start, resource_size(&r));
+ isp_regbase = (uintptr_t)ioremap_nocache(r.start, resource_size(&r));
PARSE_TRACE("Isp register base addr: 0x%lx\n", isp_regbase);
} else if (csi_regbase == 0 && strcmp(dn->name, "sprd_sensor") == 0) {
- csi_regbase = ioremap_nocache(r.start, resource_size(&r));
+ csi_regbase = (uintptr_t)ioremap_nocache(r.start, resource_size(&r));
PARSE_TRACE("Csi register base addr: 0x%lx\n", csi_regbase);
}
#endif
REGU_DEV1_CAMMOT,
REGU_DEV2_CAMMOT};
-int get_regulator_name(struct device_node *dn, int *type, uint32_t sensor_id, char **name)
+int get_regulator_name(struct device_node *dn, int *type, uint32_t sensor_id, const char **name)
{
const char *ldostr;
int ret = 0;
break;
}
- if(strcmp(name, "vddcammot")==0) {
+ if(strcmp(*name, "vddcammot")==0) {
*type = REGU_CAMMOT;
- } else if(strcmp(name, "vddcama")==0){
+ } else if(strcmp(*name, "vddcama")==0){
*type = REGU_CAMAVDD;
- } else if(strcmp(name, "vddcamd")==0){
+ } else if(strcmp(*name, "vddcamd")==0){
*type = REGU_CAMDVDD;
- } else if(strcmp(name, "vddcamio")==0){
+ } else if(strcmp(*name, "vddcamio")==0){
*type = REGU_CAMIOVDD;
}
of_node_put(dn);
struct clk * parse_clk(struct device_node *dn, char *clkname);
int get_gpio_id(struct device_node *dn, int *pwn, int *reset, uint32_t sensor_id);
int get_gpio_id_ex(struct device_node *dn, int type, int *id, uint32_t sensor_id);
-int get_regulator_name(struct device_node *dn, int *type, uint32_t sensor_id, char **name);
+int get_regulator_name(struct device_node *dn, int *type, uint32_t sensor_id, const char **name);
LOCAL void _dcam_force_copy(enum dcam_path_index path_index);
LOCAL void _dcam_auto_copy(enum dcam_path_index path_index);
LOCAL void _dcam_reg_trace(void);
+#if 0
LOCAL void _dcam_sensor_sof(void);
+#endif
LOCAL void _dcam_sensor_eof(void);
LOCAL void _dcam_cap_sof(void);
LOCAL void _dcam_cap_eof(void);
case DCAM_CAP_ZOOM_MODE:
{
- uint32_t zoom_mode = *(uint32_t*)param;
-
DCAM_CHECK_PARAM_ZERO_POINTER(param);
//Zoom operation issue fix in Z3. enable smooth_zoom
case DCAM_PATH_FRAME_BASE_ID:
{
- uint32_t base_id = *(uint32_t*)param, i;
+ uint32_t base_id = *(uint32_t*)param;
DCAM_CHECK_PARAM_ZERO_POINTER(param);
case DCAM_PATH_FRAME_BASE_ID:
{
- uint32_t base_id = *(uint32_t*)param, i;
+ uint32_t base_id = *(uint32_t*)param;
DCAM_CHECK_PARAM_ZERO_POINTER(param);
}else{
path->rot_mode = rot_mode;
path->valid_param.rot_mode = 1;
- DCAM_TRACE("zcf dcam_path1_cfg rot:\n",path->rot_mode);
+ DCAM_TRACE("zcf dcam_path1_cfg rot: = %d\n",path->rot_mode);
}
break;
}
case DCAM_PATH_FRAME_BASE_ID:
{
- uint32_t base_id = *(uint32_t*)param, i;
+ uint32_t base_id = *(uint32_t*)param;
DCAM_CHECK_PARAM_ZERO_POINTER(param);
}else{
path->rot_mode = rot_mode;
path->valid_param.rot_mode = 1;
- DCAM_TRACE("zcf dcam_path2_cfg rot:\n",path->rot_mode);
+ DCAM_TRACE("zcf dcam_path2_cfg rot: = %d\n",path->rot_mode);
}
break;
}
if (queue->write == queue->read) {
queue->write = ori_frame;
- printk("DCAM: warning, queue is full, cannot write 0x%lx \n", frame->yaddr);
+ printk("DCAM: warning, queue is full, cannot write 0x%x \n", frame->yaddr);
}
spin_unlock_irqrestore(&queue->lock, flag);
DCAM_TRACE("DCAM: _dcam_buf_queue_write type %d \n", frame->type);
LOCAL void _dcam_frm_clear(enum dcam_path_index path_index)
{
- uint32_t i = 0;
-
DCAM_CHECK_ZERO_VOID(s_p_dcam_mod);
if (DCAM_PATH_IDX_0 & path_index) {
return;
}
-LOCAL void _dcam_frm_pop(enum dcam_path_index path_index)
+LOCAL void __maybe_unused _dcam_frm_pop(enum dcam_path_index path_index)
{
uint32_t i = 0;
struct dcam_frame *frame = NULL;
enum dcam_drv_rtn rtn = DCAM_RTN_SUCCESS;
struct dcam_frame frame;
struct dcam_frame *reserved_frame = NULL;
- struct dcam_frame *orig_frame = NULL;
struct dcam_path_desc *path = NULL;
uint32_t yuv_reg[3] = {0};
uint32_t path_max_frm_cnt;
- uint32_t flag = 0;
struct dcam_frm_queue *p_heap = NULL;
struct dcam_buf_queue *p_buf_queue = NULL;
dcam_isr_func user_func = s_user_func[DCAM_PATH0_SOF];
void *data = s_user_data[DCAM_PATH0_SOF];
struct dcam_path_desc *path;
- struct dcam_sc_coeff *sc_coeff;
DCAM_TRACE("DCAM: 0 sof 1 \n");
printk("mm_clk_reg, part 1 \n");
for (i = 0 ; i <= 0x10; i += 4 ) {
- printk("MMAHB: %x val:%x \b\n",
+ printk("MMAHB: %lx val:%x \b\n",
(SPRD_MMAHB_BASE + i),
REG_RD(SPRD_MMAHB_BASE + i));
}
printk("mm_clk_reg, part 2 \n");
for (i = 0x20 ; i <= 0x38; i += 4 ) {
- printk("MMCKG: %x val:%x \b\n",
+ printk("MMCKG: %lx val:%x \b\n",
(SPRD_MMCKG_BASE + i),
REG_RD(SPRD_MMCKG_BASE + i));
}
static int32_t isp_b4awb_switch_buf(struct isp_k_private *isp_private)
{
int32_t ret = 0;
- int32_t i = 0;
/*first bypass b4awb*/
REG_MWR(ISP_BINNING_PARAM, BIT_0, 0x1);
{
int ret;
int num;
- int i;
int ISP_REG_NUM = 20467;
struct isp_reg_bits *ptr = (struct isp_reg_bits *)vmalloc(ISP_REG_NUM * sizeof(struct isp_reg_bits));
static int isp_wr_addr(struct isp_reg_bits *ptr)
{
+ struct isp_reg_bits *ptr_reg = ptr;
int i;
int sum = 0;
return -1;
}
- struct isp_reg_bits *ptr_reg = ptr;
-
ptr_reg -> reg_addr = 0x0000; /* Interrupt part*/
sum++;
(void)file; (void)cnt; (void)cnt_ret;
if (cnt < sizeof(uint32_t)) {
- printk("scale_k_read error: wrong size of u_data: %ld \n", cnt);
+ printk("scale_k_read error: wrong size of u_data: %zu \n", cnt);
return -1;
}
return -1;
}
- while (buf_len != 0 && reg_addr < (u64)(CSI2_BASE + SPRD_CSI2_REG_SIZE)) {
+ while (buf_len != 0 && (uintptr_t)reg_addr < (uintptr_t)(CSI2_BASE + SPRD_CSI2_REG_SIZE)) {
*reg_buf++ = *(volatile u32*)reg_addr++;
*buf_len -= 4;
}
int ret = SENSOR_K_SUCCESS;
uint32_t volt_value = 0;
uint32_t *poweron_count = NULL;
- char *regu_name;
+ const char *regu_name;
struct sensor_module_tab_tag *p_mod;
struct regulator **p_regulator = NULL;