Skip to content

Commit

Permalink
clk: mediatek: Add flags to mtk_gate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jasper Mattsson authored and Stephen Boyd committed Feb 26, 2019
1 parent 03c4fda commit 5a1cc4c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion drivers/clk/mediatek/clk-gate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion drivers/clk/mediatek/clk-gate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion drivers/clk/mediatek/clk-mtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/mediatek/clk-mtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5a1cc4c

Please sign in to comment.