clk: rockchip: rk3399: Add protect clocks

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I3166b72d94bcb0758bd22ee5dd63419597786606
This commit is contained in:
Elaine Zhang
2024-11-26 16:55:40 +08:00
committed by Tao Huang
parent 308515b1d5
commit dd097f5451

View File

@@ -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);