Skip to content

Commit 14054fb

Browse files
grygoriyStmlind
authored andcommitted
ARM: dts: am4372: fix clock source for arm twd and global timers
ARM TWD and Global timer are clocked by PERIPHCLK which is MPU_CLK/2. But now they are clocked by dpll_mpu_m2_ck == MPU_CLK and, as result. Timekeeping core misbehaves. For example, execution of command "sleep 5" will take 10 sec instead of 5. Hence, fix it by adding mpu_periphclk ("fixed-factor-clock") and use it for clocking ARM TWD and Global timer (same way as on OMAP4). Cc: Tony Lindgren <tony@atomide.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Tero Kristo <t-kristo@ti.com> Fixes:commit 8cbd4c2 ("arm: boot: dts: am4372: add ARM timers and SCU nodes") Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent fc82792 commit 14054fb

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

arch/arm/boot/dts/am4372.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@
7474
reg = <0x48240200 0x100>;
7575
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
7676
interrupt-parent = <&gic>;
77-
clocks = <&dpll_mpu_m2_ck>;
77+
clocks = <&mpu_periphclk>;
7878
};
7979

8080
local_timer: timer@48240600 {
8181
compatible = "arm,cortex-a9-twd-timer";
8282
reg = <0x48240600 0x100>;
8383
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
8484
interrupt-parent = <&gic>;
85-
clocks = <&dpll_mpu_m2_ck>;
85+
clocks = <&mpu_periphclk>;
8686
};
8787

8888
l2-cache-controller@48242000 {

arch/arm/boot/dts/am43xx-clocks.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,14 @@
259259
ti,invert-autoidle-bit;
260260
};
261261

262+
mpu_periphclk: mpu_periphclk {
263+
#clock-cells = <0>;
264+
compatible = "fixed-factor-clock";
265+
clocks = <&dpll_mpu_m2_ck>;
266+
clock-mult = <1>;
267+
clock-div = <2>;
268+
};
269+
262270
dpll_ddr_ck: dpll_ddr_ck {
263271
#clock-cells = <0>;
264272
compatible = "ti,am3-dpll-clock";

0 commit comments

Comments
 (0)