mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
clk: ingenic: Fix recalc_rate for clocks with fixed divider
Previously, the clocks with a fixed divider would report their rate as being the same as the one of their parent, independently of the divider in use. This commit fixes this behaviour. This went unnoticed as neither the jz4740 nor the jz4780 CGU code have clocks with fixed dividers yet. Signed-off-by: Paul Cercueil <[email protected]> Acked-by: Stephen Boyd <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Maarten ter Huurne <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/18477/ Signed-off-by: James Hogan <[email protected]>
This commit is contained in:
parent
ee1f9df269
commit
e6cfa64375
1 changed files with 2 additions and 0 deletions
|
|
@ -328,6 +328,8 @@ ingenic_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
|
|||
div *= clk_info->div.div;
|
||||
|
||||
rate /= div;
|
||||
} else if (clk_info->type & CGU_CLK_FIXDIV) {
|
||||
rate /= clk_info->fixdiv.div;
|
||||
}
|
||||
|
||||
return rate;
|
||||
|
|
|
|||
Loading…
Reference in a new issue