mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
clk: ingenic: Don't tag custom clocks with CLK_SET_RATE_PARENT
The custom clocks have custom functions to round, get or set their rate. Therefore, we can't assume that they need the CLK_SET_RATE_PARENT flag. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200903015048.3091523-4-paul@crapouillou.net Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
3860dc599b
commit
2e4ee634f8
1 changed files with 7 additions and 7 deletions
|
@ -629,6 +629,13 @@ static int ingenic_register_clock(struct ingenic_cgu *cgu, unsigned idx)
|
|||
|
||||
caps = clk_info->type;
|
||||
|
||||
if (caps & CGU_CLK_DIV) {
|
||||
caps &= ~CGU_CLK_DIV;
|
||||
} else if (!(caps & CGU_CLK_CUSTOM)) {
|
||||
/* pass rate changes to the parent clock */
|
||||
clk_init.flags |= CLK_SET_RATE_PARENT;
|
||||
}
|
||||
|
||||
if (caps & (CGU_CLK_MUX | CGU_CLK_CUSTOM)) {
|
||||
clk_init.num_parents = 0;
|
||||
|
||||
|
@ -690,13 +697,6 @@ static int ingenic_register_clock(struct ingenic_cgu *cgu, unsigned idx)
|
|||
caps &= ~(CGU_CLK_MUX | CGU_CLK_MUX_GLITCHFREE);
|
||||
}
|
||||
|
||||
if (caps & CGU_CLK_DIV) {
|
||||
caps &= ~CGU_CLK_DIV;
|
||||
} else {
|
||||
/* pass rate changes to the parent clock */
|
||||
clk_init.flags |= CLK_SET_RATE_PARENT;
|
||||
}
|
||||
|
||||
if (caps) {
|
||||
pr_err("%s: unknown clock type 0x%x\n", __func__, caps);
|
||||
goto out;
|
||||
|
|
Loading…
Reference in a new issue