]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
media: rcar-csi2: Move setting of Field Detection Control Register
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 10 Apr 2019 14:27:15 +0000 (10:27 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 22 Apr 2019 16:14:19 +0000 (12:14 -0400)
Later datasheet versions (rev 1.00) clarifies that the FLD register
should be set after LINKCNT.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/rcar-vin/rcar-csi2.c

index 73c51e9d4a1adcba0f72c23951d993f0089a524d..799e526fd3df555441a0821a8948e35166f575b4 100644 (file)
@@ -519,8 +519,6 @@ static int rcsi2_start_receiver(struct rcar_csi2 *priv)
        rcsi2_write(priv, PHTC_REG, 0);
 
        /* Configure */
-       rcsi2_write(priv, FLD_REG, FLD_FLD_NUM(2) | FLD_FLD_EN4 |
-                   FLD_FLD_EN3 | FLD_FLD_EN2 | FLD_FLD_EN);
        rcsi2_write(priv, VCDT_REG, vcdt);
        if (vcdt2)
                rcsi2_write(priv, VCDT2_REG, vcdt2);
@@ -551,6 +549,8 @@ static int rcsi2_start_receiver(struct rcar_csi2 *priv)
        rcsi2_write(priv, PHYCNT_REG, phycnt);
        rcsi2_write(priv, LINKCNT_REG, LINKCNT_MONITOR_EN |
                    LINKCNT_REG_MONI_PACT_EN | LINKCNT_ICLK_NONSTOP);
+       rcsi2_write(priv, FLD_REG, FLD_FLD_NUM(2) | FLD_FLD_EN4 |
+                   FLD_FLD_EN3 | FLD_FLD_EN2 | FLD_FLD_EN);
        rcsi2_write(priv, PHYCNT_REG, phycnt | PHYCNT_SHUTDOWNZ);
        rcsi2_write(priv, PHYCNT_REG, phycnt | PHYCNT_SHUTDOWNZ | PHYCNT_RSTZ);