Re: [PATCH 5/6] clk: rockchip: rk3506: Use FIELD_PREP_WM16 macro

Simon Glass <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <CAFLszTi07unpXzmbnAvZBnDEoz5VMFu=Em2yz-Fjja-9S4idMg@mail.gmail.com>
Hi Jonas,

On 2026-08-03T19:09:38, Jonas Karlman <[email protected]> wrote:
> clk: rockchip: rk3506: Use FIELD_PREP_WM16 macro
>
> Change to use writel() together with the FIELD_PREP_WM16() macro
> instead of using the rk_clrsetreg() macro to avoid having to define the
> mask as a parameter to both rk_clrsetreg() and FIELD_PREP(). Also change
> to use u32 variables consistently.
>
> No change in behavior is expected due to this code style change.
>
> Signed-off-by: Jonas Karlman <[email protected]>
>
> drivers/clk/rockchip/clk_rk3506.c | 195 ++++++++++++++++++--------------------
>  1 file changed, 90 insertions(+), 105 deletions(-)

> diff --git a/drivers/clk/rockchip/clk_rk3506.c b/drivers/clk/rockchip/clk_rk3506.c
> @@ -485,6 +479,7 @@ static ulong rk3506_tsadc_get_rate(struct rk3506_clk_priv *priv, ulong clk_id)
>       u32 con, div;
>
>       con = readl(RK3506_CLKSEL_CON(61));
> +
>       switch (clk_id) {

Unrelated to the FIELD_PREP_WM16 conversion - might be best to drop
it. In any case:

Reviewed-by: Simon Glass <[email protected]>

Regards,
Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.