Skip to content

Commit 27b3099

Browse files
MrVandlezcano
authored andcommitted
clocksource/drivers/imx-sysctr: handle nxp,no-divider property
The previous hardware design embedds a internal divider for base clock. New design not has that divider, so check the nxp,no-divider property, if true, directly use base clock input, otherwise divide by 3 as before. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20220902111207.2902493-3-peng.fan@oss.nxp.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent 061f427 commit 27b3099

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/clocksource/timer-imx-sysctr.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ static int __init sysctr_timer_init(struct device_node *np)
134134
if (ret)
135135
return ret;
136136

137-
/* system counter clock is divided by 3 internally */
138-
to_sysctr.of_clk.rate /= SYS_CTR_CLK_DIV;
137+
if (!of_property_read_bool(np, "nxp,no-divider")) {
138+
/* system counter clock is divided by 3 internally */
139+
to_sysctr.of_clk.rate /= SYS_CTR_CLK_DIV;
140+
}
139141

140142
sys_ctr_base = timer_of_base(&to_sysctr);
141143
cmpcr = readl(sys_ctr_base + CMPCR);

0 commit comments

Comments
 (0)