[PATCH 05/22] clk: do not disable clock if it is critical
Simon Glass
sjg at chromium.org
Tue Aug 4 04:00:39 CEST 2020
On Wed, 29 Jul 2020 at 08:52, Claudiu Beznea
<claudiu.beznea at microchip.com> wrote:
>
> Do not disable clock if it is a critical one.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
> ---
> drivers/clk/clk-uclass.c | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
Please add a sandbox test
>
> diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
> index b390a6b01c06..958a9490bee2 100644
> --- a/drivers/clk/clk-uclass.c
> +++ b/drivers/clk/clk-uclass.c
> @@ -605,6 +605,9 @@ int clk_disable(struct clk *clk)
>
> if (CONFIG_IS_ENABLED(CLK_CCF)) {
> if (clk->id && !clk_get_by_id(clk->id, &clkp)) {
> + if (clkp->flags & CLK_IS_CRITICAL)
> + return 0;
> +
> if (clkp->enable_count == 0) {
> printf("clk %s already disabled\n",
> clkp->dev->name);
> --
> 2.7.4
>
More information about the U-Boot
mailing list