From: Marek Vasut Date: Tue, 28 Oct 2025 23:28:16 +0000 (+0100) Subject: drm/rcar-du: dsi: Clean up CLOCKSET1 CLKINSEL macros X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b0ec96ba6beb6be67a7e1b7bf68b38649952063;p=thirdparty%2Fkernel%2Flinux.git drm/rcar-du: dsi: Clean up CLOCKSET1 CLKINSEL macros Introduce CLOCKSET1_CLKINSEL_MASK macro and remove bitshift from values to make this bitfield usable with FIELD_PREP(). There are no users of this bitfield, hence no updates to the DSI driver. Do not convert bits and bitfields to BIT() and GENMASK() yet, to be consisten with the current style. Conversion to BIT() and GENMASK() macros is done at the very end of this series in the last two patches. Reviewed-by: Tomi Valkeinen Signed-off-by: Marek Vasut Link: https://patch.msgid.link/20251028232959.109936-7-marek.vasut+renesas@mailbox.org Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h index 2db3dda030dbe..44220c7112315 100644 --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h @@ -269,9 +269,10 @@ #define CLOCKSET1 0x101c #define CLOCKSET1_LOCK_PHY (1 << 17) #define CLOCKSET1_CLKSEL (1 << 8) -#define CLOCKSET1_CLKINSEL_EXTAL (0 << 2) -#define CLOCKSET1_CLKINSEL_DIG (1 << 2) -#define CLOCKSET1_CLKINSEL_DU (1 << 3) +#define CLOCKSET1_CLKINSEL_MASK (3 << 2) +#define CLOCKSET1_CLKINSEL_EXTAL FIELD_PREP(CLOCKSET1_CLKINSEL_MASK, 0) +#define CLOCKSET1_CLKINSEL_DIG FIELD_PREP(CLOCKSET1_CLKINSEL_MASK, 1) +#define CLOCKSET1_CLKINSEL_DU FIELD_PREP(CLOCKSET1_CLKINSEL_MASK, 2) #define CLOCKSET1_SHADOW_CLEAR (1 << 1) #define CLOCKSET1_UPDATEPLL (1 << 0)