diff mbox series

[U-Boot,v2,04/10] clk: Add clk_div_mask helper

Message ID 20190402112843.992-5-jagan@amarulasolutions.com
State Rejected
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series clk: imx: Add i.MX6 CLK support | expand

Commit Message

Jagan Teki April 2, 2019, 11:28 a.m. UTC
Add clock helper to compute the clock divider mask when use invoke
with clock width.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 include/clk-uclass.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/include/clk-uclass.h b/include/clk-uclass.h
index e76d98e2f6..15ac8867a7 100644
--- a/include/clk-uclass.h
+++ b/include/clk-uclass.h
@@ -100,4 +100,6 @@  struct clk_ops {
 	int (*disable)(struct clk *clk);
 };
 
+#define clk_div_mask(width)		((1 << (width)) - 1)
+
 #endif