[PATCH v3 18/22] video: mxsfb: add enabling of "disp_axi" clock

Giulio Benetti giulio.benetti at benettiengineering.com
Thu May 13 12:21:23 CEST 2021


Sorry for this patch sent twice. My e-mail provider doesn't let me send 
more than 18 e-mail at a time, so I need to send it in 2 times and I've 
left this.

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

On 5/13/21 12:19 PM, Giulio Benetti wrote:
> Some SoC needs "disp_axi" clock to be enabled, so let's try to retrieve it
> and enabling. If it fails it gives only a debug(), but this clock as well
> as "axi" clock is not mandatory.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
> ---
>   drivers/video/mxsfb.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
> index 147bd668fe..523d8a8d98 100644
> --- a/drivers/video/mxsfb.c
> +++ b/drivers/video/mxsfb.c
> @@ -98,6 +98,17 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr,
>   			return;
>   		}
>   	}
> +
> +	ret = clk_get_by_name(dev, "disp_axi", &clk);
> +	if (!ret) {
> +		debug("%s: Failed to get mxs disp_axi clk: %d\n", __func__, ret);
> +	} else {
> +		ret = clk_enable(&clk);
> +		if (ret < 0) {
> +			dev_err(dev, "Failed to enable mxs disp_axi clk: %d\n", ret);
> +			return;
> +		}
> +	}
>   #else
>   	/* Kick in the LCDIF clock */
>   	mxs_set_lcdclk(MXS_LCDIF_BASE, timings->pixelclock.typ / 1000);
> 



More information about the U-Boot mailing list