mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
clk: Loongson1: Make use of GENMASK
Make use of GENMASK instead of open coding the equivalent operation, and update the PLL formula. Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
parent
c99c7a9ac6
commit
f0ffaf187a
@ -26,7 +26,7 @@ static unsigned long ls1x_pll_recalc_rate(struct clk_hw *hw,
|
||||
u32 pll, rate;
|
||||
|
||||
pll = __raw_readl(LS1X_CLK_PLL_FREQ);
|
||||
rate = 12 + (pll & 0x3f) + (((pll >> 8) & 0x3ff) >> 10);
|
||||
rate = 12 + (pll & GENMASK(5, 0));
|
||||
rate *= OSC;
|
||||
rate >>= 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user