clk: socfpga: switch to GENMASK()
Convert the code to use GENMASK() helper instead of div_mask() macro. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:

committed by
Stephen Boyd

parent
4b5fb7dc90
commit
25d4d341d3
@@ -39,7 +39,7 @@ static unsigned long socfpga_gate_clk_recalc_rate(struct clk_hw *hwclk,
|
||||
div = socfpgaclk->fixed_div;
|
||||
else if (socfpgaclk->div_reg) {
|
||||
val = readl(socfpgaclk->div_reg) >> socfpgaclk->shift;
|
||||
val &= div_mask(socfpgaclk->width);
|
||||
val &= GENMASK(socfpgaclk->width - 1, 0);
|
||||
div = (1 << val);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user