Skip to content

Commit d77461a

Browse files
saschahauerabelvesa
authored andcommitted
clk: imx: pll14xx: Drop wrong shifting
The code tries to mask the bits in SDIV_MASK from 'tmp'. SDIV_MASK already contains the shifted value, so shifting it again is wrong. No functional change though as SDIV_SHIFT is zero. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/20220304125256.2125023-3-s.hauer@pengutronix.de Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
1 parent 485b4ff commit d77461a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/clk/imx/clk-pll14xx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static int clk_pll1416x_set_rate(struct clk_hw *hw, unsigned long drate,
195195
tmp = readl_relaxed(pll->base + DIV_CTL0);
196196

197197
if (!clk_pll14xx_mp_change(rate, tmp)) {
198-
tmp &= ~(SDIV_MASK) << SDIV_SHIFT;
198+
tmp &= ~SDIV_MASK;
199199
tmp |= rate->sdiv << SDIV_SHIFT;
200200
writel_relaxed(tmp, pll->base + DIV_CTL0);
201201

@@ -261,7 +261,7 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw, unsigned long drate,
261261
tmp = readl_relaxed(pll->base + DIV_CTL0);
262262

263263
if (!clk_pll14xx_mp_change(rate, tmp)) {
264-
tmp &= ~(SDIV_MASK) << SDIV_SHIFT;
264+
tmp &= ~SDIV_MASK;
265265
tmp |= rate->sdiv << SDIV_SHIFT;
266266
writel_relaxed(tmp, pll->base + DIV_CTL0);
267267

0 commit comments

Comments
 (0)