struct device_attribute *attr, const char *buff, size_t count)
{
struct tvafe_dev_s *devp;
- unsigned int argn = 0, addr = 0, value = 0, end = 0;
+ unsigned int argn = 0, addr = 0, value = 0, end = 0, tmp = 0;
char *p, *para, *buf_work, cmd = 0;
char *argv[3];
- long tmp = 0;
devp = dev_get_drvdata(dev);
if (argn < 2) {
tvafe_pr_err("syntax error.\n");
} else{
- if (kstrtol(argv[1], 16, &tmp) == 0)
+ if (kstrtouint(argv[1], 16, &tmp) == 0)
addr = tmp;
else
break;
if (argn < 3) {
tvafe_pr_err("syntax error.\n");
} else{
- if (kstrtol(argv[1], 16, &tmp) == 0)
+ if (kstrtouint(argv[1], 16, &tmp) == 0)
value = tmp;
else
break;
- if (kstrtol(argv[2], 16, &tmp) == 0)
+ if (kstrtouint(argv[2], 16, &tmp) == 0)
addr = tmp;
else
break;
if (argn < 3) {
tvafe_pr_err("syntax error.\n");
} else{
- if (kstrtol(argv[1], 16, &tmp) == 0)
+ if (kstrtouint(argv[1], 16, &tmp) == 0)
addr = tmp;
else
break;
- if (kstrtol(argv[2], 16, &tmp) == 0)
+ if (kstrtouint(argv[2], 16, &tmp) == 0)
end = tmp;
else
break;
W_APB_BIT(TVFE_VAFE_CTRL1, 1,
VAFE_IN_SEL_BIT, VAFE_IN_SEL_WID);
- W_APB_BIT(TVFE_VAFE_CTRL2, 3, 4, 3);
+ if (tvafe_cpu_type() != CPU_TYPE_TL1)
+ W_APB_BIT(TVFE_VAFE_CTRL2, 3, 4, 3);
ret = TVAFE_ADC_CH_0;
} else if (pin == TVAFE_CVBS_IN1) {
W_APB_BIT(TVFE_VAFE_CTRL1, 2,
VAFE_IN_SEL_BIT, VAFE_IN_SEL_WID);
- W_APB_BIT(TVFE_VAFE_CTRL2, 5, 4, 3);
+ if (tvafe_cpu_type() != CPU_TYPE_TL1)
+ W_APB_BIT(TVFE_VAFE_CTRL2, 5, 4, 3);
ret = TVAFE_ADC_CH_1;
} else if (pin == TVAFE_CVBS_IN2) {
(port == TVIN_PORT_CVBS2)) {
W_APB_REG(TVFE_VAFE_CTRL0, 0x00490710);
W_APB_REG(TVFE_VAFE_CTRL1, 0x0000110e);
- W_APB_REG(TVFE_VAFE_CTRL2, 0x1fe09fd3);
+ W_APB_REG(TVFE_VAFE_CTRL2, 0x1fe09f83);
}
} else {
W_APB_REG(TVFE_VAFE_CTRL0, 0x00090b00);
adc_pll_lock_cnt++;
} while (!R_HIU_BIT(HHI_ADC_PLL_CNTL0_TL1, 31, 1) &&
(adc_pll_lock_cnt < 10));
- tvafe_pr_info("b0=0x%x",
+ tvafe_pr_info("b0=0x%x\n",
R_HIU_REG(HHI_ADC_PLL_CNTL0_TL1));
- tvafe_pr_info("b1=0x%x",
+ tvafe_pr_info("b1=0x%x\n",
R_HIU_REG(HHI_ADC_PLL_CNTL1_TL1));
- tvafe_pr_info("b2=0x%x",
+ tvafe_pr_info("b2=0x%x\n",
R_HIU_REG(HHI_ADC_PLL_CNTL2_TL1));
- tvafe_pr_info("b3=0x%x",
+ tvafe_pr_info("b3=0x%x\n",
R_HIU_REG(HHI_ADC_PLL_CNTL3_TL1));
- tvafe_pr_info("b4=0x%x",
+ tvafe_pr_info("b4=0x%x\n",
R_HIU_REG(HHI_ADC_PLL_CNTL4_TL1));
- tvafe_pr_info("b5=0x%x",
+ tvafe_pr_info("b5=0x%x\n",
R_HIU_REG(HHI_ADC_PLL_CNTL5_TL1));
- tvafe_pr_info("b6=0x%x",
+ tvafe_pr_info("b6=0x%x\n",
R_HIU_REG(HHI_ADC_PLL_CNTL6_TL1));
} else {
struct vbi_dev_s *devp = dev_get_drvdata(dev);
struct vbi_slicer_s *vbi_slicer;
struct vbi_ringbuffer_s *vbi_buffer;
- long val;
+ unsigned int val;
int ret = 0;
if (!buff || !devp)
tvafe_pr_info("dump satus done!!\n");
} else if (!strncmp(parm[0], "enable_tasklet",
strlen("enable_tasklet"))) {
- if (kstrtol(parm[1], 10, &val) < 0)
+ if (kstrtouint(parm[1], 10, &val) < 0)
return -EINVAL;
devp->tasklet_enable = val;
tvafe_pr_info("tasklet_enable:%d\n", devp->tasklet_enable);
} else if (!strncmp(parm[0], "data_wmode",
strlen("data_wmode"))) {
- if (kstrtol(parm[1], 10, &val) < 0)
+ if (kstrtouint(parm[1], 10, &val) < 0)
return -EINVAL;
vbi_buffer->data_wmode = val;
tvafe_pr_info("data_wmode:%d\n", vbi_buffer->data_wmode);
tvafe_pr_info(" disable vbi function\n");
tvafe_pr_info("stop done!!!\n");
} else if (!strncmp(parm[0], "set_size", strlen("set_size"))) {
- if (kstrtol(parm[1], 10, &val) < 0)
+ if (kstrtouint(parm[1], 10, &val) < 0)
return -EINVAL;
- vbi_set_buffer_size(devp, (unsigned int)val);
+ vbi_set_buffer_size(devp, val);
tvafe_pr_info(" set buf size to %d\n",
vbi_slicer->buffer.size);
} else if (!strncmp(parm[0], "set_type", strlen("set_type"))) {
- if (kstrtol(parm[1], 16, &val) < 0)
+ if (kstrtouint(parm[1], 16, &val) < 0)
return -EINVAL;
vbi_slicer->type = val;
vbi_slicer_set(devp, vbi_slicer);