media: ti-vpe: cal: fix dummy read to phy
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 25 Mar 2020 12:15:04 +0000 (13:15 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 10:50:09 +0000 (12:50 +0200)
After ComplexIO reset, a dummy read to PHY is needed as per CAL spec to
finish the reset. Currently the driver reads a ComplexIO register, not
PHY register. Fix this.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.c

index d8d4555..c7cbb50 100644 (file)
@@ -796,8 +796,8 @@ static void csi2_phy_init(struct cal_ctx *ctx)
                ctx->csi2_port,
                reg_read(ctx->dev, CAL_CSI2_COMPLEXIO_CFG(ctx->csi2_port)));
 
-       /* Dummy read to allow SCP to complete */
-       val = reg_read(ctx->dev, CAL_CSI2_COMPLEXIO_CFG(ctx->csi2_port));
+       /* Dummy read to allow SCP reset to complete */
+       reg_read(ctx->cc, CAL_CSI2_PHY_REG0);
 
        /* 3.A. Program Phy Timing Parameters */
        csi2_phy_config(ctx);