Commit 9206d3b4 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

media: imx: imx7-media-csi: Replace CSICR*_RESET_VAL with values



The CSICR*_RESET_VAL macros only obfuscate code. Use their value
directly, replacing the numerical value with the macros that describe
register bits.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 61c699bf
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -32,11 +32,6 @@
#define IMX7_CSI_PAD_SRC	1
#define IMX7_CSI_PADS_NUM	2

/* reset values */
#define CSICR1_RESET_VAL	0x40000800
#define CSICR2_RESET_VAL	0x0
#define CSICR3_RESET_VAL	0x0

/* csi control reg 1 */
#define BIT_SWAP16_EN		BIT(31)
#define BIT_EXT_VSYNC		BIT(30)
@@ -211,9 +206,9 @@ static void imx7_csi_hw_reset(struct imx7_csi *csi)
			   imx7_csi_reg_read(csi, CSI_CSICR3) | BIT_FRMCNT_RST,
			   CSI_CSICR3);

	imx7_csi_reg_write(csi, CSICR1_RESET_VAL, CSI_CSICR1);
	imx7_csi_reg_write(csi, CSICR2_RESET_VAL, CSI_CSICR2);
	imx7_csi_reg_write(csi, CSICR3_RESET_VAL, CSI_CSICR3);
	imx7_csi_reg_write(csi, BIT_EXT_VSYNC | BIT_HSYNC_POL, CSI_CSICR1);
	imx7_csi_reg_write(csi, 0, CSI_CSICR2);
	imx7_csi_reg_write(csi, 0, CSI_CSICR3);
}

static u32 imx7_csi_irq_clear(struct imx7_csi *csi)