From dd097f5451ef369b2c2400855af00d9f0ade804d Mon Sep 17 00:00:00 2001 From: Elaine Zhang Date: Tue, 26 Nov 2024 16:55:40 +0800 Subject: [PATCH] clk: rockchip: rk3399: Add protect clocks Signed-off-by: Elaine Zhang Change-Id: I3166b72d94bcb0758bd22ee5dd63419597786606 --- drivers/clk/rockchip/clk-rk3399.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c index e1b6c526720f..f09a5dfb09be 100644 --- a/drivers/clk/rockchip/clk-rk3399.c +++ b/drivers/clk/rockchip/clk-rk3399.c @@ -1611,6 +1611,17 @@ static struct notifier_block rk3399_clk_panic_block = { .notifier_call = rk3399_clk_panic, }; +static int protect_clocks[] = { + SCLK_VOP0_PWM, + SCLK_VOP1_PWM, + ACLK_VOP0, + HCLK_VOP0, + ACLK_VOP1, + HCLK_VOP1, + DCLK_VOP0, + DCLK_VOP1, +}; + static void __init rk3399_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; @@ -1655,6 +1666,8 @@ static void __init rk3399_clk_init(struct device_node *np) rockchip_register_restart_notifier(ctx, RK3399_GLB_SRST_FST, NULL); rockchip_clk_of_add_provider(np, ctx); + + rockchip_clk_protect(ctx, protect_clocks, ARRAY_SIZE(protect_clocks)); } CLK_OF_DECLARE(rk3399_cru, "rockchip,rk3399-cru", rk3399_clk_init);