]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
clk: renesas: rzv2h: Use GENMASK for PLL fields
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Wed, 15 Oct 2025 19:26:06 +0000 (20:26 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 27 Oct 2025 10:57:26 +0000 (11:57 +0100)
commita8943f7f0a736e211faa400fa9df1af8dd945347
treea19ea8c3f476ed4f1c3edcfb32e4768cbbf77977
parent36a23904b4def05bfbb589af9fab5bc06144d241
clk: renesas: rzv2h: Use GENMASK for PLL fields

Replace the older FIELD_GET-wrapping helper macros with plain GENMASK
definitions for the PLL CLK1/CLK2 field masks (CPG_PLL_CLK1_KDIV,
CPG_PLL_CLK1_MDIV, CPG_PLL_CLK1_PDIV and CPG_PLL_CLK2_SDIV). Update
rzv2h_cpg_pll_clk_recalc_rate() to explicitly extract those fields with
FIELD_GET and cast the KDIV extraction to s16 to ensure proper sign
extension when computing the PLL output rate.

Co-developed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251015192611.241920-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/clk/renesas/rzv2h-cpg.c