summaryrefslogtreecommitdiff
path: root/drivers/clk/mmp/clk-frac.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2020-05-20 01:41:40 +0300
committerStephen Boyd <sboyd@kernel.org>2020-05-28 03:55:11 +0300
commit5278acc4418bad18ed677952ca7cd56ce312a87d (patch)
tree45e6b8f13c04eca2efedb462f59bdc1e706b491c /drivers/clk/mmp/clk-frac.c
parent06030c4e33babd63b6630d358a04f3dfb34cc29c (diff)
downloadlinux-5278acc4418bad18ed677952ca7cd56ce312a87d.tar.xz
clk: mmp: frac: Allow setting bits other than the numerator/denominator
For the I2S fractional clocks, there are more bits that need to be set for the clock to run. Their actual meaning is unknown. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Link: https://lkml.kernel.org/r/20200519224151.2074597-3-lkundrak@v3.sk Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/mmp/clk-frac.c')
-rw-r--r--drivers/clk/mmp/clk-frac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c
index ed9928f5bdc7..48f592bd633d 100644
--- a/drivers/clk/mmp/clk-frac.c
+++ b/drivers/clk/mmp/clk-frac.c
@@ -148,7 +148,10 @@ static int clk_factor_init(struct clk_hw *hw)
val &= ~(masks->den_mask << masks->den_shift);
val |= (factor->ftbl[0].den & masks->den_mask) <<
masks->den_shift;
+ }
+ if (!(val & masks->enable_mask) || i >= factor->ftbl_cnt) {
+ val |= masks->enable_mask;
writel(val, factor->base);
}