diff options
author | Aisheng Dong <aisheng.dong@nxp.com> | 2019-01-30 14:39:15 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2019-02-21 21:41:16 +0100 |
commit | 666aed2d13ee58b4d1df00a9c112b3cc76f2d36a (patch) | |
tree | ef73bb57163ac9c26471530962e688777edb1493 /drivers/clk/imx/clk-scu.h | |
parent | clk: imx: scu: add fallback compatible string support (diff) | |
download | linux-666aed2d13ee58b4d1df00a9c112b3cc76f2d36a.tar.xz linux-666aed2d13ee58b4d1df00a9c112b3cc76f2d36a.zip |
clk: imx: scu: add set parent support
Add clk scu set parents support.
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
[sboyd@kernel.org: Remove le32_to_cpu() on get_parent op]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/imx/clk-scu.h')
-rw-r--r-- | drivers/clk/imx/clk-scu.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/clk/imx/clk-scu.h b/drivers/clk/imx/clk-scu.h index 52c1746ec988..2bcfaf06a458 100644 --- a/drivers/clk/imx/clk-scu.h +++ b/drivers/clk/imx/clk-scu.h @@ -10,7 +10,21 @@ #include <linux/firmware/imx/sci.h> int imx_clk_scu_init(void); -struct clk_hw *imx_clk_scu(const char *name, u32 rsrc_id, u8 clk_type); + +struct clk_hw *__imx_clk_scu(const char *name, const char * const *parents, + int num_parents, u32 rsrc_id, u8 clk_type); + +static inline struct clk_hw *imx_clk_scu(const char *name, u32 rsrc_id, + u8 clk_type) +{ + return __imx_clk_scu(name, NULL, 0, rsrc_id, clk_type); +} + +static inline struct clk_hw *imx_clk_scu2(const char *name, const char * const *parents, + int num_parents, u32 rsrc_id, u8 clk_type) +{ + return __imx_clk_scu(name, parents, num_parents, rsrc_id, clk_type); +} struct clk_hw *imx_clk_lpcg_scu(const char *name, const char *parent_name, unsigned long flags, void __iomem *reg, |