]> Git Repo - J-linux.git/blobdiff - drivers/clk/sprd/gate.c
Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux...
[J-linux.git] / drivers / clk / sprd / gate.c
index 574cfc116bbcd82f7403d7b00f371e37d611b2bf..56e1714b541eff1d6a59cd313810fe41d8b055c9 100644 (file)
@@ -94,8 +94,15 @@ static int sprd_gate_is_enabled(struct clk_hw *hw)
 {
        struct sprd_gate *sg = hw_to_sprd_gate(hw);
        struct sprd_clk_common *common = &sg->common;
+       struct clk_hw *parent;
        unsigned int reg;
 
+       if (sg->flags & SPRD_GATE_NON_AON) {
+               parent = clk_hw_get_parent(hw);
+               if (!parent || !clk_hw_is_enabled(parent))
+                       return 0;
+       }
+
        regmap_read(common->regmap, common->reg, &reg);
 
        if (sg->flags & CLK_GATE_SET_TO_DISABLE)
This page took 0.032954 seconds and 4 git commands to generate.