Skip to content

Commit 5278acc

Browse files
lkundrakbebarino
authored andcommitted
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 <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 06030c4 commit 5278acc

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/clk/mmp/clk-frac.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ static int clk_factor_init(struct clk_hw *hw)
148148
val &= ~(masks->den_mask << masks->den_shift);
149149
val |= (factor->ftbl[0].den & masks->den_mask) <<
150150
masks->den_shift;
151+
}
151152

153+
if (!(val & masks->enable_mask) || i >= factor->ftbl_cnt) {
154+
val |= masks->enable_mask;
152155
writel(val, factor->base);
153156
}
154157

drivers/clk/mmp/clk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ struct mmp_clk_factor_masks {
1616
unsigned int den_mask;
1717
unsigned int num_shift;
1818
unsigned int den_shift;
19+
unsigned int enable_mask;
1920
};
2021

2122
struct mmp_clk_factor_tbl {

0 commit comments

Comments
 (0)