mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
vdin & tvafe: probe log clear [1/1]
PD#SWPL-140697 Problem: For tvafe and vdinstartup and runtime print cleanup Solution: reduce printing Verify: txhd2 kernel5.15 Change-Id: I54979201d98fd930ac117e0a667bc5d4d2d7942d Signed-off-by: mingxiu.sun <mingxiu.sun@amlogic.com>
This commit is contained in:
@@ -1606,20 +1606,22 @@ static void tvafe_user_parameters_config(struct device_node *of_node)
|
||||
tvafe_pr_err("Can't get cutwindow_val_v\n");
|
||||
ret = of_property_read_u32_array(of_node, "horizontal_dir0",
|
||||
tvafe_user_param.horizontal_dir0, 5);
|
||||
if (ret)
|
||||
tvafe_pr_err("Can't get horizontal_dir0\n");
|
||||
ret = of_property_read_u32_array(of_node, "horizontal_dir1",
|
||||
tvafe_user_param.horizontal_dir1, 5);
|
||||
if (ret)
|
||||
tvafe_pr_err("Can't get horizontal_dir1\n");
|
||||
ret = of_property_read_u32_array(of_node, "horizontal_stp0",
|
||||
tvafe_user_param.horizontal_stp0, 5);
|
||||
if (ret)
|
||||
tvafe_pr_err("Can't get horizontal_stp0\n");
|
||||
ret = of_property_read_u32_array(of_node, "horizontal_stp1",
|
||||
tvafe_user_param.horizontal_stp1, 5);
|
||||
if (ret)
|
||||
tvafe_pr_err("Can't get horizontal_stp1\n");
|
||||
if (tvafe_dbg_print & TVAFE_DBG_HORSTP_REGBASE) {
|
||||
if (ret)
|
||||
tvafe_pr_err("Can't get horizontal_dir0\n");
|
||||
ret = of_property_read_u32_array(of_node, "horizontal_dir1",
|
||||
tvafe_user_param.horizontal_dir1, 5);
|
||||
if (ret)
|
||||
tvafe_pr_err("Can't get horizontal_dir1\n");
|
||||
ret = of_property_read_u32_array(of_node, "horizontal_stp0",
|
||||
tvafe_user_param.horizontal_stp0, 5);
|
||||
if (ret)
|
||||
tvafe_pr_err("Can't get horizontal_stp0\n");
|
||||
ret = of_property_read_u32_array(of_node, "horizontal_stp1",
|
||||
tvafe_user_param.horizontal_stp1, 5);
|
||||
if (ret)
|
||||
tvafe_pr_err("Can't get horizontal_stp1\n");
|
||||
}
|
||||
|
||||
ret = of_property_read_u32(of_node, "auto_adj_en", &val[0]);
|
||||
if (ret == 0) {
|
||||
@@ -1924,8 +1926,9 @@ static int tvafe_drv_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
size_io_reg = resource_size(res);
|
||||
tvafe_pr_info("%s:tvafe reg base=%p,size=0x%x\n",
|
||||
__func__, (void *)res->start, size_io_reg);
|
||||
if (tvafe_dbg_print & TVAFE_DBG_HORSTP_REGBASE)
|
||||
tvafe_pr_info("%s:tvafe reg base=%p,size=0x%x\n",
|
||||
__func__, (void *)res->start, size_io_reg);
|
||||
if (!devm_request_mem_region(&pdev->dev,
|
||||
res->start, size_io_reg, pdev->name)) {
|
||||
dev_err(&pdev->dev, "Memory region busy\n");
|
||||
@@ -1937,22 +1940,25 @@ static int tvafe_drv_probe(struct platform_device *pdev)
|
||||
dev_err(&pdev->dev, "tvafe ioremap failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
tvafe_pr_info("%s: tvafe maped reg_base =%p, size=0x%x\n",
|
||||
__func__, tvafe_reg_base, size_io_reg);
|
||||
if (tvafe_dbg_print & TVAFE_DBG_HORSTP_REGBASE)
|
||||
tvafe_pr_info("%s: tvafe maped reg_base =%p, size=0x%x\n",
|
||||
__func__, tvafe_reg_base, size_io_reg);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
if (res) {
|
||||
size_io_reg = resource_size(res);
|
||||
tvafe_pr_info("%s: hiu reg base=0x%p,size=0x%x\n",
|
||||
__func__, (void *)res->start, size_io_reg);
|
||||
if (tvafe_dbg_print & TVAFE_DBG_HORSTP_REGBASE)
|
||||
tvafe_pr_info("%s: hiu reg base=0x%p,size=0x%x\n",
|
||||
__func__, (void *)res->start, size_io_reg);
|
||||
hiu_reg_base =
|
||||
devm_ioremap(&pdev->dev, res->start, size_io_reg);
|
||||
if (!hiu_reg_base) {
|
||||
dev_err(&pdev->dev, "hiu ioremap failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
tvafe_pr_info("%s: hiu maped reg_base =0x%p, size=0x%x\n",
|
||||
__func__, hiu_reg_base, size_io_reg);
|
||||
if (tvafe_dbg_print & TVAFE_DBG_HORSTP_REGBASE)
|
||||
tvafe_pr_info("%s: hiu maped reg_base =0x%p, size=0x%x\n",
|
||||
__func__, hiu_reg_base, size_io_reg);
|
||||
} else {
|
||||
dev_err(&pdev->dev, "missing hiu memory resource\n");
|
||||
hiu_reg_base = NULL;
|
||||
|
||||
@@ -176,15 +176,16 @@ extern bool tvafe_atv_search_channel;
|
||||
|
||||
extern unsigned int force_nostd;
|
||||
|
||||
#define TVAFE_DBG_NORMAL BIT(0)
|
||||
#define TVAFE_DBG_ISR BIT(4)
|
||||
#define TVAFE_DBG_SMR BIT(8)
|
||||
#define TVAFE_DBG_SMR2 BIT(9)
|
||||
#define TVAFE_DBG_NOSTD BIT(12)
|
||||
#define TVAFE_DBG_NOSTD2 BIT(13)
|
||||
#define TVAFE_DBG_AUTO_VS BIT(14)
|
||||
#define TVAFE_DBG_AUTO_HS BIT(15)
|
||||
#define TVAFE_DBG_WSS BIT(16)
|
||||
#define TVAFE_DBG_NORMAL BIT(0)
|
||||
#define TVAFE_DBG_ISR BIT(4)
|
||||
#define TVAFE_DBG_SMR BIT(8)
|
||||
#define TVAFE_DBG_SMR2 BIT(9)
|
||||
#define TVAFE_DBG_NOSTD BIT(12)
|
||||
#define TVAFE_DBG_NOSTD2 BIT(13)
|
||||
#define TVAFE_DBG_AUTO_VS BIT(14)
|
||||
#define TVAFE_DBG_AUTO_HS BIT(15)
|
||||
#define TVAFE_DBG_WSS BIT(16)
|
||||
#define TVAFE_DBG_HORSTP_REGBASE BIT(17)
|
||||
extern unsigned int tvafe_dbg_print;
|
||||
|
||||
#endif /* _TVAFE_H */
|
||||
|
||||
@@ -1913,7 +1913,7 @@ int vdin_v4l2_probe(struct platform_device *pl_dev,
|
||||
|
||||
ret = of_property_read_u32(pl_dev->dev.of_node, "v4l_vd_num",
|
||||
&v4l_vd_num);
|
||||
dprintk(0, "vdin%d,ret = %d,v4l_vd_num=%d\n",
|
||||
dprintk(1, "vdin%d,ret = %d,v4l_vd_num=%d\n",
|
||||
devp->index, ret, v4l_vd_num);
|
||||
if (ret)
|
||||
v4l_vd_num = VDIN_VD_NUMBER + (devp->index);
|
||||
@@ -1943,15 +1943,15 @@ int vdin_v4l2_probe(struct platform_device *pl_dev,
|
||||
video_dev->dev.of_node = pl_dev->dev.of_node;
|
||||
ret = of_reserved_mem_device_init(&video_dev->dev);
|
||||
if (ret == 0)
|
||||
dprintk(0, "rev memory resource ok\n");
|
||||
dprintk(1, "rev memory resource ok\n");
|
||||
else
|
||||
dprintk(0, "rev memory resource undefined!!!\n");
|
||||
dprintk(1, "rev memory resource undefined!!!\n");
|
||||
|
||||
vdin_v4l2_init(devp, pl_dev);
|
||||
|
||||
dprintk(0, "dev registered as %s\n",
|
||||
dprintk(1, "dev registered as %s\n",
|
||||
video_device_node_name(video_dev));
|
||||
dprintk(0, "vdin[%d] %s ok\n", devp->index, __func__);
|
||||
dprintk(1, "vdin[%d] %s ok\n", devp->index, __func__);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -2135,12 +2135,12 @@ void vdin_v4l2_init(struct vdin_dev_s *devp, struct platform_device *pl_dev)
|
||||
ret = of_property_read_u32_index(pl_dev->dev.of_node, "fe_ports", i,
|
||||
&tmp_u32);
|
||||
if (ret || tmp_u32 <= TVIN_PORT_NULL || tmp_u32 >= TVIN_PORT_MAX) {
|
||||
dprintk(0, "Invalid fe_port:%#x in property\n", tmp_u32);
|
||||
dprintk(1, "Invalid fe_port:%#x in property\n", tmp_u32);
|
||||
continue;
|
||||
}
|
||||
devp->v4l2_port[devp->v4l2_port_num] = tmp_u32;
|
||||
devp->v4l2_port_num++;
|
||||
dprintk(0, "index:%d,fe_port[%d]:%#x\n", i, devp->v4l2_port_num,
|
||||
dprintk(1, "index:%d,fe_port[%d]:%#x\n", i, devp->v4l2_port_num,
|
||||
devp->v4l2_port[i]);
|
||||
}
|
||||
/* default port */
|
||||
@@ -2150,39 +2150,39 @@ void vdin_v4l2_init(struct vdin_dev_s *devp, struct platform_device *pl_dev)
|
||||
if (ret == 0) {
|
||||
strscpy(g_vdin_v4l2_cap[devp->index].driver, str,
|
||||
sizeof(g_vdin_v4l2_cap[devp->index].driver));
|
||||
dprintk(0, "vdin%d,driver:%s\n", devp->index, str);
|
||||
dprintk(1, "vdin%d,driver:%s\n", devp->index, str);
|
||||
}
|
||||
|
||||
ret = of_property_read_string(pl_dev->dev.of_node, "card", &str);
|
||||
if (ret == 0) {
|
||||
strscpy(g_vdin_v4l2_cap[devp->index].card, str,
|
||||
sizeof(g_vdin_v4l2_cap[devp->index].card));
|
||||
dprintk(0, "vdin%d,card:%s\n", devp->index, str);
|
||||
dprintk(1, "vdin%d,card:%s\n", devp->index, str);
|
||||
}
|
||||
|
||||
ret = of_property_read_string(pl_dev->dev.of_node, "bus_info", &str);
|
||||
if (ret == 0) {
|
||||
strscpy(g_vdin_v4l2_cap[devp->index].bus_info, str,
|
||||
sizeof(g_vdin_v4l2_cap[devp->index].bus_info));
|
||||
dprintk(0, "vdin%d,bus_info:%s\n", devp->index, str);
|
||||
dprintk(1, "vdin%d,bus_info:%s\n", devp->index, str);
|
||||
}
|
||||
|
||||
ret = of_property_read_u32(pl_dev->dev.of_node, "version", &tmp_u32);
|
||||
if (ret == 0) {
|
||||
g_vdin_v4l2_cap[devp->index].version = tmp_u32;
|
||||
dprintk(0, "vdin%d,version:%#x\n", devp->index, tmp_u32);
|
||||
dprintk(1, "vdin%d,version:%#x\n", devp->index, tmp_u32);
|
||||
}
|
||||
|
||||
ret = of_property_read_u32(pl_dev->dev.of_node, "capabilities", &tmp_u32);
|
||||
if (ret == 0) {
|
||||
g_vdin_v4l2_cap[devp->index].capabilities = tmp_u32;
|
||||
dprintk(0, "vdin%d,capabilities:%#x\n", devp->index, tmp_u32);
|
||||
dprintk(1, "vdin%d,capabilities:%#x\n", devp->index, tmp_u32);
|
||||
}
|
||||
|
||||
ret = of_property_read_u32(pl_dev->dev.of_node, "device_caps", &tmp_u32);
|
||||
if (ret == 0) {
|
||||
g_vdin_v4l2_cap[devp->index].device_caps = tmp_u32;
|
||||
dprintk(0, "vdin%d,device_caps:%#x\n", devp->index, tmp_u32);
|
||||
dprintk(1, "vdin%d,device_caps:%#x\n", devp->index, tmp_u32);
|
||||
}
|
||||
/* fill struct v4l2_ext_capture_capability_info with default value */
|
||||
devp->ext_cap_cap_info.flags =
|
||||
|
||||
Reference in New Issue
Block a user