Skip to content

Commit 5a1cc4c

Browse files
Jasper Mattssonbebarino
authored andcommitted
clk: mediatek: Add flags to mtk_gate
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>
1 parent 03c4fda commit 5a1cc4c

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

drivers/clk/mediatek/clk-gate.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ struct clk *mtk_clk_register_gate(
157157
int clr_ofs,
158158
int sta_ofs,
159159
u8 bit,
160-
const struct clk_ops *ops)
160+
const struct clk_ops *ops,
161+
unsigned long flags)
161162
{
162163
struct mtk_clk_gate *cg;
163164
struct clk *clk;
@@ -172,6 +173,7 @@ struct clk *mtk_clk_register_gate(
172173
init.parent_names = parent_name ? &parent_name : NULL;
173174
init.num_parents = parent_name ? 1 : 0;
174175
init.ops = ops;
176+
init.flags = flags;
175177

176178
cg->regmap = regmap;
177179
cg->set_ofs = set_ofs;

drivers/clk/mediatek/clk-gate.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct clk *mtk_clk_register_gate(
4747
int clr_ofs,
4848
int sta_ofs,
4949
u8 bit,
50-
const struct clk_ops *ops);
50+
const struct clk_ops *ops,
51+
unsigned long flags);
5152

5253
#endif /* __DRV_CLK_GATE_H */

drivers/clk/mediatek/clk-mtk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ int mtk_clk_register_gates(struct device_node *node,
130130
gate->regs->set_ofs,
131131
gate->regs->clr_ofs,
132132
gate->regs->sta_ofs,
133-
gate->shift, gate->ops);
133+
gate->shift, gate->ops, gate->flags);
134134

135135
if (IS_ERR(clk)) {
136136
pr_err("Failed to register clk %s: %ld\n",

drivers/clk/mediatek/clk-mtk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ struct mtk_gate {
162162
const struct mtk_gate_regs *regs;
163163
int shift;
164164
const struct clk_ops *ops;
165+
unsigned long flags;
165166
};
166167

167168
int mtk_clk_register_gates(struct device_node *node,

0 commit comments

Comments
 (0)