Commit 5278acc4 authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Stephen Boyd

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: default avatarLubomir Rintel <lkundrak@v3.sk>
Link: https://lkml.kernel.org/r/20200519224151.2074597-3-lkundrak@v3.skSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 06030c4e
...@@ -148,7 +148,10 @@ static int clk_factor_init(struct clk_hw *hw) ...@@ -148,7 +148,10 @@ static int clk_factor_init(struct clk_hw *hw)
val &= ~(masks->den_mask << masks->den_shift); val &= ~(masks->den_mask << masks->den_shift);
val |= (factor->ftbl[0].den & masks->den_mask) << val |= (factor->ftbl[0].den & masks->den_mask) <<
masks->den_shift; masks->den_shift;
}
if (!(val & masks->enable_mask) || i >= factor->ftbl_cnt) {
val |= masks->enable_mask;
writel(val, factor->base); writel(val, factor->base);
} }
......
...@@ -16,6 +16,7 @@ struct mmp_clk_factor_masks { ...@@ -16,6 +16,7 @@ struct mmp_clk_factor_masks {
unsigned int den_mask; unsigned int den_mask;
unsigned int num_shift; unsigned int num_shift;
unsigned int den_shift; unsigned int den_shift;
unsigned int enable_mask;
}; };
struct mmp_clk_factor_tbl { struct mmp_clk_factor_tbl {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment