From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Tue, 2 Apr 2019 16:58:37 +0530 Subject: [U-Boot] [PATCH v2 04/10] clk: Add clk_div_mask helper In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> Message-ID: <20190402112843.992-5-jagan@amarulasolutions.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add clock helper to compute the clock divider mask when use invoke with clock width. Signed-off-by: Jagan Teki --- include/clk-uclass.h | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.18.0.321.gffc6fa0e3