提交 27b30995 编写于 作者: P Peng Fan 提交者: Daniel Lezcano

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: NPeng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20220902111207.2902493-3-peng.fan@oss.nxp.comSigned-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
上级 061f4274
...@@ -134,8 +134,10 @@ static int __init sysctr_timer_init(struct device_node *np) ...@@ -134,8 +134,10 @@ static int __init sysctr_timer_init(struct device_node *np)
if (ret) if (ret)
return ret; return ret;
if (!of_property_read_bool(np, "nxp,no-divider")) {
/* system counter clock is divided by 3 internally */ /* system counter clock is divided by 3 internally */
to_sysctr.of_clk.rate /= SYS_CTR_CLK_DIV; to_sysctr.of_clk.rate /= SYS_CTR_CLK_DIV;
}
sys_ctr_base = timer_of_base(&to_sysctr); sys_ctr_base = timer_of_base(&to_sysctr);
cmpcr = readl(sys_ctr_base + CMPCR); cmpcr = readl(sys_ctr_base + CMPCR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册