mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
clk: fractional-divider: keep mwidth and nwidth internally
The patch adds mwidth and nwidth fields to the struct clk_fractional_divider for further usage. While here, use GENMASK() instead of open coding this functionality. Reviewed-by: Heikki Krogerus <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
This commit is contained in:
parent
f7f087c262
commit
934e2536b1
2 changed files with 6 additions and 3 deletions
|
|
@ -128,9 +128,11 @@ struct clk *clk_register_fractional_divider(struct device *dev,
|
|||
|
||||
fd->reg = reg;
|
||||
fd->mshift = mshift;
|
||||
fd->mmask = (BIT(mwidth) - 1) << mshift;
|
||||
fd->mwidth = mwidth;
|
||||
fd->mmask = GENMASK(mwidth - 1, 0) << mshift;
|
||||
fd->nshift = nshift;
|
||||
fd->nmask = (BIT(nwidth) - 1) << nshift;
|
||||
fd->nwidth = nwidth;
|
||||
fd->nmask = GENMASK(nwidth - 1, 0) << nshift;
|
||||
fd->flags = clk_divider_flags;
|
||||
fd->lock = lock;
|
||||
fd->hw.init = &init;
|
||||
|
|
|
|||
Loading…
Reference in a new issue