summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-07-12 07:10:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-07-12 07:10:17 +0200
commitb5f79c6ad2ee3fbf4a00a3eda0b3462176775da8 (patch)
tree5976e22c7ab0a744f1d92fe139b56f37c31fbd61 /include
parentce1e0cae0229d9511c832d1f3edfff491ec17709 (diff)
parent47b432c697c273603038a0a78736f2aa531a12a6 (diff)
downloadbarebox-b5f79c6ad2ee3fbf4a00a3eda0b3462176775da8.tar.gz
barebox-b5f79c6ad2ee3fbf4a00a3eda0b3462176775da8.tar.xz
Merge branch 'for-next/clk'
Diffstat (limited to 'include')
-rw-r--r--include/linux/clk.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h
index b9c5e0ab04..c3aeea80dd 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -340,6 +340,8 @@ struct clk_divider {
int table_size;
};
+#define clk_div_mask(width) ((1 << (width)) - 1)
+
#define CLK_DIVIDER_POWER_OF_TWO (1 << 1)
#define CLK_DIVIDER_HIWORD_MASK (1 << 3)
#define CLK_DIVIDER_READ_ONLY (1 << 5)
@@ -354,6 +356,14 @@ unsigned long divider_recalc_rate(struct clk *clk, unsigned long parent_rate,
const struct clk_div_table *table,
unsigned long flags, unsigned long width);
+long divider_round_rate(struct clk *clk, unsigned long rate,
+ unsigned long *prate, const struct clk_div_table *table,
+ u8 width, unsigned long flags);
+
+int divider_get_val(unsigned long rate, unsigned long parent_rate,
+ const struct clk_div_table *table, u8 width,
+ unsigned long flags);
+
struct clk *clk_divider_alloc(const char *name, const char *parent,
unsigned clk_flags, void __iomem *reg,
u8 shift, u8 width, unsigned div_flags);