diff options
author | Lukasz Majewski <lukma@denx.de> | 2019-10-15 12:44:57 +0200 |
---|---|---|
committer | Lukasz Majewski <lukma@denx.de> | 2019-10-22 16:14:05 +0200 |
commit | 727fa4539ca2937fd3d8d748096af1145bdf2173 (patch) | |
tree | 91a1f1b165aaef970dfd7ea5fc82fac7b827b5e5 /drivers/clk/imx/clk.h | |
parent | 02e2a2ad2f01a5b88e3ff2b694de63c0b5c849f2 (diff) |
clk: Add support for I2C clocks on NXP's imx6q SoC which use CCF
This change adds support for I2C clock modeled in CCF. This code intention
is to only enable those clocks in the I2C driver with default settings.
For that reason the "busy" versions of clocks reuse the generic approach
and would need to be updated when one wants to adjust the I2C clock
frequency in U-Boot.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'drivers/clk/imx/clk.h')
-rw-r--r-- | drivers/clk/imx/clk.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 4956e04a92..07dcf94ea5 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -92,6 +92,14 @@ static inline struct clk *imx_clk_divider(const char *name, const char *parent, reg, shift, width, 0); } +static inline struct clk * +imx_clk_busy_divider(const char *name, const char *parent, void __iomem *reg, + u8 shift, u8 width, void __iomem *busy_reg, u8 busy_shift) +{ + return clk_register_divider(NULL, name, parent, CLK_SET_RATE_PARENT, + reg, shift, width, 0); +} + static inline struct clk *imx_clk_divider2(const char *name, const char *parent, void __iomem *reg, u8 shift, u8 width) { @@ -126,6 +134,16 @@ static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg, width, 0); } +static inline struct clk * +imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift, u8 width, + void __iomem *busy_reg, u8 busy_shift, + const char * const *parents, int num_parents) +{ + return clk_register_mux(NULL, name, parents, num_parents, + CLK_SET_RATE_NO_REPARENT, reg, shift, + width, 0); +} + static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg, u8 shift, u8 width, const char * const *parents, int num_parents) |