OSDN Git Service

clk: mediatek: Add flags to mtk_gate
authorJasper Mattsson <jasu@njomotys.info>
Thu, 14 Feb 2019 16:32:30 +0000 (17:32 +0100)
committerStephen Boyd <sboyd@kernel.org>
Tue, 26 Feb 2019 17:53:39 +0000 (09:53 -0800)
This is required to mark gates as CLK_IS_CRITICAL.

Signed-off-by: Jasper Mattsson <jasu@njomotys.info>
Acked-by: Mars Cheng <mars.cheng@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-gate.c
drivers/clk/mediatek/clk-gate.h
drivers/clk/mediatek/clk-mtk.c
drivers/clk/mediatek/clk-mtk.h

index 934bf0e..9628d4e 100644 (file)
@@ -157,7 +157,8 @@ struct clk *mtk_clk_register_gate(
                int clr_ofs,
                int sta_ofs,
                u8 bit,
-               const struct clk_ops *ops)
+               const struct clk_ops *ops,
+               unsigned long flags)
 {
        struct mtk_clk_gate *cg;
        struct clk *clk;
@@ -172,6 +173,7 @@ struct clk *mtk_clk_register_gate(
        init.parent_names = parent_name ? &parent_name : NULL;
        init.num_parents = parent_name ? 1 : 0;
        init.ops = ops;
+       init.flags = flags;
 
        cg->regmap = regmap;
        cg->set_ofs = set_ofs;
index 72ef89b..9f766df 100644 (file)
@@ -47,6 +47,7 @@ struct clk *mtk_clk_register_gate(
                int clr_ofs,
                int sta_ofs,
                u8 bit,
-               const struct clk_ops *ops);
+               const struct clk_ops *ops,
+               unsigned long flags);
 
 #endif /* __DRV_CLK_GATE_H */
index 9c0ae42..ef41041 100644 (file)
@@ -130,7 +130,7 @@ int mtk_clk_register_gates(struct device_node *node,
                                gate->regs->set_ofs,
                                gate->regs->clr_ofs,
                                gate->regs->sta_ofs,
-                               gate->shift, gate->ops);
+                               gate->shift, gate->ops, gate->flags);
 
                if (IS_ERR(clk)) {
                        pr_err("Failed to register clk %s: %ld\n",
index daab6ee..987ff28 100644 (file)
@@ -162,6 +162,7 @@ struct mtk_gate {
        const struct mtk_gate_regs *regs;
        int shift;
        const struct clk_ops *ops;
+       unsigned long flags;
 };
 
 int mtk_clk_register_gates(struct device_node *node,