Commit 5a1cc4c2 authored by Jasper Mattsson's avatar Jasper Mattsson Committed by Stephen Boyd

clk: mediatek: Add flags to mtk_gate

This is required to mark gates as CLK_IS_CRITICAL.
Signed-off-by: default avatarJasper Mattsson <jasu@njomotys.info>
Acked-by: default avatarMars Cheng <mars.cheng@mediatek.com>
Signed-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 03c4fda6
...@@ -157,7 +157,8 @@ struct clk *mtk_clk_register_gate( ...@@ -157,7 +157,8 @@ struct clk *mtk_clk_register_gate(
int clr_ofs, int clr_ofs,
int sta_ofs, int sta_ofs,
u8 bit, u8 bit,
const struct clk_ops *ops) const struct clk_ops *ops,
unsigned long flags)
{ {
struct mtk_clk_gate *cg; struct mtk_clk_gate *cg;
struct clk *clk; struct clk *clk;
...@@ -172,6 +173,7 @@ struct clk *mtk_clk_register_gate( ...@@ -172,6 +173,7 @@ struct clk *mtk_clk_register_gate(
init.parent_names = parent_name ? &parent_name : NULL; init.parent_names = parent_name ? &parent_name : NULL;
init.num_parents = parent_name ? 1 : 0; init.num_parents = parent_name ? 1 : 0;
init.ops = ops; init.ops = ops;
init.flags = flags;
cg->regmap = regmap; cg->regmap = regmap;
cg->set_ofs = set_ofs; cg->set_ofs = set_ofs;
......
...@@ -47,6 +47,7 @@ struct clk *mtk_clk_register_gate( ...@@ -47,6 +47,7 @@ struct clk *mtk_clk_register_gate(
int clr_ofs, int clr_ofs,
int sta_ofs, int sta_ofs,
u8 bit, u8 bit,
const struct clk_ops *ops); const struct clk_ops *ops,
unsigned long flags);
#endif /* __DRV_CLK_GATE_H */ #endif /* __DRV_CLK_GATE_H */
...@@ -130,7 +130,7 @@ int mtk_clk_register_gates(struct device_node *node, ...@@ -130,7 +130,7 @@ int mtk_clk_register_gates(struct device_node *node,
gate->regs->set_ofs, gate->regs->set_ofs,
gate->regs->clr_ofs, gate->regs->clr_ofs,
gate->regs->sta_ofs, gate->regs->sta_ofs,
gate->shift, gate->ops); gate->shift, gate->ops, gate->flags);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_err("Failed to register clk %s: %ld\n", pr_err("Failed to register clk %s: %ld\n",
......
...@@ -162,6 +162,7 @@ struct mtk_gate { ...@@ -162,6 +162,7 @@ struct mtk_gate {
const struct mtk_gate_regs *regs; const struct mtk_gate_regs *regs;
int shift; int shift;
const struct clk_ops *ops; const struct clk_ops *ops;
unsigned long flags;
}; };
int mtk_clk_register_gates(struct device_node *node, int mtk_clk_register_gates(struct device_node *node,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment