Smatch reported a warning about a shift macro being used as a mask. Make
the obvious changes to make this register read calculation work the same
as the previous ones.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
divr1 = readl(®s->pll1divr) & RCC_PLL1DIVR_DIVR1_MASK;
divr1 = (divr1 >> RCC_PLL1DIVR_DIVR1_SHIFT) + 1;
- fracn1 = readl(®s->pll1fracr) & RCC_PLL1DIVR_DIVR1_MASK;
- fracn1 = fracn1 & RCC_PLL1DIVR_DIVR1_SHIFT;
+ fracn1 = readl(®s->pll1fracr) & RCC_PLL1FRACR_FRACN1_MASK;
+ fracn1 = (fracn1 >> RCC_PLL1FRACR_FRACN1_SHIFT) + 1;
vco = (pllsrc / divm1) * divn1;
rate = (pllsrc * fracn1) / (divm1 * 8192);