]> Git Repo - J-linux.git/commitdiff
clocksource/drivers/imx-sysctr: handle nxp,no-divider property
authorPeng Fan <[email protected]>
Fri, 2 Sep 2022 11:12:07 +0000 (19:12 +0800)
committerDaniel Lezcano <[email protected]>
Tue, 20 Sep 2022 08:49:46 +0000 (10:49 +0200)
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Lezcano <[email protected]>
drivers/clocksource/timer-imx-sysctr.c

index 523e37662a6e8e505c20d802e8a1a41ff9c5ac0b..5a7a951c4efcdf187e73e2190b27dcea943f97bc 100644 (file)
@@ -134,8 +134,10 @@ static int __init sysctr_timer_init(struct device_node *np)
        if (ret)
                return ret;
 
-       /* system counter clock is divided by 3 internally */
-       to_sysctr.of_clk.rate /= SYS_CTR_CLK_DIV;
+       if (!of_property_read_bool(np, "nxp,no-divider")) {
+               /* system counter clock is divided by 3 internally */
+               to_sysctr.of_clk.rate /= SYS_CTR_CLK_DIV;
+       }
 
        sys_ctr_base = timer_of_base(&to_sysctr);
        cmpcr = readl(sys_ctr_base + CMPCR);
This page took 0.064856 seconds and 4 git commands to generate.