[PATCH 08/24] clk: rockchip: Remove negative error returns from clk_get_rate
    Jonas Karlman 
    jonas at kwiboo.se
       
    Sun Oct 19 22:28:42 CEST 2025
    
    
  
Hi Andrew,
On 10/15/2025 4:32 PM, Andrew Goodbody wrote:
> clk_get_rate() returns a ulong so do not attempt to pass negative error
> codes through it.
On Rockchip the clk drivers only implement support for a subset of all
clocks supported by the hardware, mostly to save space for TPL/SPL and
not having to implement logic for clocks not really needed by U-Boot.
Because support for all clocks is not implemented the existing working
error handling actually help us catch clock issues on the Rockchip
platform. E.g. when a clk is referenced by assigned-clock-rates in DT we
get an error and can fix the issue, or decide if we can safely ignore
setting the clk rate.
I do not understand why you need to change the way the clk ops work,
just check with IS_ERR_VALUE() inside the clk-uclass or similar if you
really must remove working error handling from the callers.
The current working clk error handling has really helped me time and
time again on Rockchip platform during soc and board bring-up.
This is a NAK for me without first having a proper replacement for all
existing working error handling that is just being left ignored after
this patch/series.
Regards,
Jonas
> 
> Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
> ---
>  drivers/clk/rockchip/clk_px30.c   | 24 +++++++--------
>  drivers/clk/rockchip/clk_rk3036.c |  2 +-
>  drivers/clk/rockchip/clk_rk3066.c |  8 ++---
>  drivers/clk/rockchip/clk_rk3128.c |  6 ++--
>  drivers/clk/rockchip/clk_rk3188.c |  6 ++--
>  drivers/clk/rockchip/clk_rk322x.c |  4 +--
>  drivers/clk/rockchip/clk_rk3288.c |  6 ++--
>  drivers/clk/rockchip/clk_rk3308.c | 26 ++++++++--------
>  drivers/clk/rockchip/clk_rk3328.c |  6 ++--
>  drivers/clk/rockchip/clk_rk3368.c |  8 ++---
>  drivers/clk/rockchip/clk_rk3399.c | 12 ++++----
>  drivers/clk/rockchip/clk_rk3528.c | 20 ++++++-------
>  drivers/clk/rockchip/clk_rk3568.c | 62 +++++++++++++++++++--------------------
>  drivers/clk/rockchip/clk_rk3576.c | 36 +++++++++++------------
>  drivers/clk/rockchip/clk_rk3588.c | 32 ++++++++++----------
>  drivers/clk/rockchip/clk_rv1108.c |  4 +--
>  drivers/clk/rockchip/clk_rv1126.c | 52 ++++++++++++++++----------------
>  17 files changed, 157 insertions(+), 157 deletions(-)
    
    
More information about the U-Boot
mailing list