Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06d690f0 authored by Todor Tomov's avatar Todor Tomov Committed by Mauro Carvalho Chehab
Browse files

media: camss: vfe: Do not disable CAMIF when clearing its status



Use "no change" value when clearing CAMIF status and make sure
this is done before configuring the new command.

Signed-off-by: default avatarTodor Tomov <todor.tomov@linaro.org>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent a93e5f4f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@
#define VFE_0_CAMIF_CMD				0x2f4
#define VFE_0_CAMIF_CMD_DISABLE_FRAME_BOUNDARY	0
#define VFE_0_CAMIF_CMD_ENABLE_FRAME_BOUNDARY	1
#define VFE_0_CAMIF_CMD_NO_CHANGE		3
#define VFE_0_CAMIF_CMD_CLEAR_CAMIF_STATUS	(1 << 2)
#define VFE_0_CAMIF_CFG				0x2f8
#define VFE_0_CAMIF_CFG_VFE_OUTPUT_EN		(1 << 6)
@@ -1021,8 +1022,10 @@ static void vfe_set_camif_cfg(struct vfe_device *vfe, struct vfe_line *line)

static void vfe_set_camif_cmd(struct vfe_device *vfe, u32 cmd)
{
	writel_relaxed(VFE_0_CAMIF_CMD_CLEAR_CAMIF_STATUS,
	writel_relaxed(VFE_0_CAMIF_CMD_CLEAR_CAMIF_STATUS |
		       VFE_0_CAMIF_CMD_NO_CHANGE,
		       vfe->base + VFE_0_CAMIF_CMD);
	wmb();

	writel_relaxed(cmd, vfe->base + VFE_0_CAMIF_CMD);
}