[PATCH] driver: pwm: pwm-imx: fix probing on imx6

Anatolij Gustschin agust at denx.de
Wed Aug 7 11:28:09 CEST 2024


Hi Heiko,

On Wed,  7 Aug 2024 10:58:11 +0200
Heiko Schocher hs at denx.de wrote:

> U-Boot 2024.07 drops on aristainetos2 board the following
> warning:
> 
> 	Failed to enable per_clk
> 
> and bootlogo is not seen on LVDS display.
> 
> This patch uses old behaviour for systems without clock framework
> if CONFIG_CLK is not enabled.
> 
> Fixes: bfc778cb93a3 ("driver: pwm: pwm-imx: get and enable per/ipg clock using dm")
> 
> Signed-off-by: Heiko Schocher <hs at denx.de>
> ---
> 
>  drivers/pwm/pwm-imx.c | 56 ++++++++++++++++++++++++-------------------
>  1 file changed, 31 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
> index 8fbb40cc276..0237ee70977 100644
> --- a/drivers/pwm/pwm-imx.c
> +++ b/drivers/pwm/pwm-imx.c
> @@ -160,7 +160,11 @@ int pwm_dm_imx_get_parms(struct imx_pwm_priv *priv, int period_ns,
>  {
>  	unsigned long long c;
>  
> -	c = clk_get_rate(&priv->per_clk);
> +	if (IS_ENABLED(CONFIG_CLK))

Can we please use if (CONFIG_IS_ENABLED(CLK)) ? So it will also
work with SPL. Thanks!

--
Anatolij


More information about the U-Boot mailing list