Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lubomir Rintel and committed by
Stephen Boyd
5278acc4 06030c4e

+4
+3
drivers/clk/mmp/clk-frac.c
··· 148 148 val &= ~(masks->den_mask << masks->den_shift); 149 149 val |= (factor->ftbl[0].den & masks->den_mask) << 150 150 masks->den_shift; 151 + } 151 152 153 + if (!(val & masks->enable_mask) || i >= factor->ftbl_cnt) { 154 + val |= masks->enable_mask; 152 155 writel(val, factor->base); 153 156 } 154 157
+1
drivers/clk/mmp/clk.h
··· 16 16 unsigned int den_mask; 17 17 unsigned int num_shift; 18 18 unsigned int den_shift; 19 + unsigned int enable_mask; 19 20 }; 20 21 21 22 struct mmp_clk_factor_tbl {