diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-07-13 17:07:43 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-07-28 11:59:16 -0700 |
commit | 25d4d341d31b349836e1b12d10be34b9b575c12b (patch) | |
tree | b30d9d7137682cac25f68504e0524b644526fd87 /drivers/clk/socfpga/clk-periph.c | |
parent | 4b5fb7dc9096d949a22651370bb6bf11f21edb30 (diff) | |
download | op-kernel-dev-25d4d341d31b349836e1b12d10be34b9b575c12b.zip op-kernel-dev-25d4d341d31b349836e1b12d10be34b9b575c12b.tar.gz |
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>
Diffstat (limited to 'drivers/clk/socfpga/clk-periph.c')
-rw-r--r-- | drivers/clk/socfpga/clk-periph.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/socfpga/clk-periph.c b/drivers/clk/socfpga/clk-periph.c index ab9c816..0c66863 100644 --- a/drivers/clk/socfpga/clk-periph.c +++ b/drivers/clk/socfpga/clk-periph.c @@ -35,7 +35,7 @@ static unsigned long clk_periclk_recalc_rate(struct clk_hw *hwclk, } else { if (socfpgaclk->div_reg) { val = readl(socfpgaclk->div_reg) >> socfpgaclk->shift; - val &= div_mask(socfpgaclk->width); + val &= GENMASK(socfpgaclk->width - 1, 0); parent_rate /= (val + 1); } div = ((readl(socfpgaclk->hw.reg) & 0x1ff) + 1); |