summaryrefslogtreecommitdiffstats
path: root/drivers/clk/imx/clk.h
diff options
context:
space:
mode:
authorJuergen Borleis <jbe@pengutronix.de>2016-12-06 15:26:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-01-19 15:23:04 +0100
commitfdd14bde528e23cf27b087f36fabf2e87fb62541 (patch)
tree50b12183d74a2c833be51900eef11f84ad098867 /drivers/clk/imx/clk.h
parent9a89ed9d281ec1aac0b105456b414bcbda8f4383 (diff)
downloadbarebox-fdd14bde528e23cf27b087f36fabf2e87fb62541.tar.gz
barebox-fdd14bde528e23cf27b087f36fabf2e87fb62541.tar.xz
clk: i.MX: Add clock support for i.MX7
Signed-off-by Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/clk/imx/clk.h')
-rw-r--r--drivers/clk/imx/clk.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index 362b1592a..1610c48ec 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -16,6 +16,12 @@ static inline struct clk *imx_clk_divider_np(const char *name, const char *paren
return clk_divider(name, 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)
+{
+ return clk_divider(name, parent, reg, shift, width, 0);
+}
+
static inline struct clk *imx_clk_divider_table(const char *name,
const char *parent, void __iomem *reg, u8 shift, u8 width,
const struct clk_div_table *table)
@@ -44,6 +50,12 @@ static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg,
return clk_mux(name, reg, shift, width, parents, num_parents, 0);
}
+static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,
+ u8 shift, u8 width, const char **parents, u8 num_parents)
+{
+ return clk_mux(name, reg, shift, width, parents, num_parents, 0);
+}
+
static inline struct clk *imx_clk_mux_p(const char *name, void __iomem *reg,
u8 shift, u8 width, const char **parents, u8 num_parents)
{
@@ -56,6 +68,12 @@ static inline struct clk *imx_clk_gate(const char *name, const char *parent,
return clk_gate(name, parent, reg, shift, CLK_SET_RATE_PARENT, 0);
}
+static inline struct clk *imx_clk_gate_dis(const char *name, const char *parent,
+ void __iomem *reg, u8 shift)
+{
+ return clk_gate_inverted(name, parent, reg, shift, CLK_SET_RATE_PARENT);
+}
+
static inline struct clk *imx_clk_gate2(const char *name, const char *parent,
void __iomem *reg, u8 shift)
{
@@ -68,6 +86,17 @@ static inline struct clk *imx_clk_gate2_cgr(const char *name, const char *parent
return clk_gate2(name, parent, reg, shift, cgr_val);
}
+static inline struct clk *imx_clk_gate3(const char *name, const char *parent,
+ void __iomem *reg, u8 shift)
+{
+ return clk_gate(name, parent, reg, shift, CLK_SET_RATE_PARENT, 0);
+}
+
+static inline struct clk *imx_clk_gate4(const char *name, const char *parent,
+ void __iomem *reg, u8 shift)
+{
+ return clk_gate2(name, parent, reg, shift, 0x3);
+}
struct clk *imx_clk_pllv1(const char *name, const char *parent,
void __iomem *base);