clk: imx: add new gate/gate2 wrapper funtion
Add new gate/gate2 wrapper function to register clocks with optional flags. Signed-off-by: Bai Ping <ping.bai@nxp.com> Acked-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
6f9575e556
commit
2b18cc1f12
|
@ -123,6 +123,13 @@ static inline struct clk *imx_clk_gate(const char *name, const char *parent,
|
||||||
shift, 0, &imx_ccm_lock);
|
shift, 0, &imx_ccm_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline struct clk *imx_clk_gate_flags(const char *name, const char *parent,
|
||||||
|
void __iomem *reg, u8 shift, unsigned long flags)
|
||||||
|
{
|
||||||
|
return clk_register_gate(NULL, name, parent, flags | CLK_SET_RATE_PARENT, reg,
|
||||||
|
shift, 0, &imx_ccm_lock);
|
||||||
|
}
|
||||||
|
|
||||||
static inline struct clk *imx_clk_gate_dis(const char *name, const char *parent,
|
static inline struct clk *imx_clk_gate_dis(const char *name, const char *parent,
|
||||||
void __iomem *reg, u8 shift)
|
void __iomem *reg, u8 shift)
|
||||||
{
|
{
|
||||||
|
@ -137,6 +144,13 @@ static inline struct clk *imx_clk_gate2(const char *name, const char *parent,
|
||||||
shift, 0x3, 0, &imx_ccm_lock, NULL);
|
shift, 0x3, 0, &imx_ccm_lock, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline struct clk *imx_clk_gate2_flags(const char *name, const char *parent,
|
||||||
|
void __iomem *reg, u8 shift, unsigned long flags)
|
||||||
|
{
|
||||||
|
return clk_register_gate2(NULL, name, parent, flags | CLK_SET_RATE_PARENT, reg,
|
||||||
|
shift, 0x3, 0, &imx_ccm_lock, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static inline struct clk *imx_clk_gate2_shared(const char *name,
|
static inline struct clk *imx_clk_gate2_shared(const char *name,
|
||||||
const char *parent, void __iomem *reg, u8 shift,
|
const char *parent, void __iomem *reg, u8 shift,
|
||||||
unsigned int *share_count)
|
unsigned int *share_count)
|
||||||
|
|
Loading…
Reference in New Issue