From f2ebaf336a7b2cc9f54fac3ec9063847bcf65b74 Mon Sep 17 00:00:00 2001 From: Xuhua Zhang Date: Wed, 19 Dec 2018 11:32:30 +0800 Subject: [PATCH] bt656: fix bt656 bugs [1/1] PD#OTT-1022 Problem: bt656 can not work well. Solution: 1. add clock control 2. fix bt656 id bug Verify: G12A U200 Change-Id: I2aaecee33fd590497d5a11cf3618fc07264f02a5 Signed-off-by: Xuhua Zhang --- drivers/amlogic/media/vin/tvin/bt656/bt656_601_in.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/amlogic/media/vin/tvin/bt656/bt656_601_in.c b/drivers/amlogic/media/vin/tvin/bt656/bt656_601_in.c index dc45d75..0feac45 100644 --- a/drivers/amlogic/media/vin/tvin/bt656/bt656_601_in.c +++ b/drivers/amlogic/media/vin/tvin/bt656/bt656_601_in.c @@ -1127,14 +1127,16 @@ static int amvdec_656in_probe(struct platform_device *pdev) BT656PR("%s: start probe .\n", __func__); - if (is_meson_gxtvbb_cpu() || - is_meson_gxl_cpu() || is_meson_gxm_cpu()) { + if (is_meson_gxtvbb_cpu() || is_meson_gxl_cpu() || + is_meson_gxm_cpu() || is_meson_g12a_cpu() || + is_meson_g12b_cpu() || is_meson_tl1_cpu()) { hw_cnt = 1; } else if (is_meson_gxbb_cpu()) { hw_cnt = 2; } else { hw_cnt = 0; } + if (hw_cnt == 0) { BT656ERR("no bt656 support for current chip\n"); return -EFAULT; @@ -1241,10 +1243,9 @@ static int amvdec_656in_probe(struct platform_device *pdev) if (IS_ERR(devp->gate_bt656_pclk)) { BT656ERR("%s: cannot get clk_gate_bt656_pclk1 !!!\n", __func__); - ret = -ENOENT; - goto fail_get_clktree; + //ret = -ENOENT; + //goto fail_get_clktree; } - /* set regmap */ BT656PR("%s: bt656[%d] start get ioremap .\n", __func__, devp->index); @@ -1278,7 +1279,7 @@ static int amvdec_656in_probe(struct platform_device *pdev) * &am656_decoder_ops_s, &am656_machine_ops, pdev->id); */ if (!tvin_frontend_init(&devp->frontend, &am656_decoder_ops_s, - &am656_machine_ops, devp->index)) { + &am656_machine_ops, devp->index-1)) { BT656PR("%s: tvin_frontend_init done :%d\n", __func__, devp->index); if (tvin_reg_frontend(&devp->frontend)) { -- 2.7.4