diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-01 16:01:35 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-06 07:31:25 +0100 |
commit | f573cd5e4075d65657fb68793f689eace5863cc6 (patch) | |
tree | c3384b6933f8fdf796049b8d89eecfc168ee1956 /drivers/clk/imx/clk-gate2.c | |
parent | bea07a688163c806a1001028f9eda715ca96976c (diff) | |
download | barebox-f573cd5e4075d65657fb68793f689eace5863cc6.tar.gz barebox-f573cd5e4075d65657fb68793f689eace5863cc6.tar.xz |
clk: i.MX: clk-gate2: Allow to pass flags
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/clk/imx/clk-gate2.c')
-rw-r--r-- | drivers/clk/imx/clk-gate2.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c index f952f3e3f6..e7dcd87a7e 100644 --- a/drivers/clk/imx/clk-gate2.c +++ b/drivers/clk/imx/clk-gate2.c @@ -88,7 +88,8 @@ static struct clk_ops clk_gate2_ops = { }; struct clk *clk_gate2_alloc(const char *name, const char *parent, - void __iomem *reg, u8 shift, u8 cgr_val) + void __iomem *reg, u8 shift, u8 cgr_val, + unsigned long flags) { struct clk_gate2 *g = xzalloc(sizeof(*g)); @@ -100,7 +101,7 @@ struct clk *clk_gate2_alloc(const char *name, const char *parent, g->clk.name = name; g->clk.parent_names = &g->parent; g->clk.num_parents = 1; - g->clk.flags = CLK_SET_RATE_PARENT; + g->clk.flags = CLK_SET_RATE_PARENT | flags; return &g->clk; } @@ -113,12 +114,12 @@ void clk_gate2_free(struct clk *clk) } struct clk *clk_gate2(const char *name, const char *parent, void __iomem *reg, - u8 shift, u8 cgr_val) + u8 shift, u8 cgr_val, unsigned long flags) { struct clk *g; int ret; - g = clk_gate2_alloc(name , parent, reg, shift, cgr_val); + g = clk_gate2_alloc(name , parent, reg, shift, cgr_val, flags); ret = clk_register(g); if (ret) { @@ -135,7 +136,7 @@ struct clk *clk_gate2_inverted(const char *name, const char *parent, struct clk *clk; struct clk_gate2 *g; - clk = clk_gate2(name, parent, reg, shift, 0x3); + clk = clk_gate2(name, parent, reg, shift, 0x3, 0); if (IS_ERR(clk)) return clk; |