Skip to content

Commit c7ec75e

Browse files
Dinh Nguyenbebarino
authored andcommitted
clk: socfpga: stratix10: fix rate caclulationg for cnt_clks
Checking bypass_reg is incorrect for calculating the cnt_clk rates. Instead we should be checking that there is a proper hardware register that holds the clock divider. Cc: [email protected] Signed-off-by: Dinh Nguyen <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent baf7b79 commit c7ec75e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/socfpga/clk-periph-s10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static unsigned long clk_peri_cnt_clk_recalc_rate(struct clk_hw *hwclk,
3838
if (socfpgaclk->fixed_div) {
3939
div = socfpgaclk->fixed_div;
4040
} else {
41-
if (!socfpgaclk->bypass_reg)
41+
if (socfpgaclk->hw.reg)
4242
div = ((readl(socfpgaclk->hw.reg) & 0x7ff) + 1);
4343
}
4444

0 commit comments

Comments
 (0)