ipq40xx: fix high resolution timer
authorPavel Kubelun <be.dissent@gmail.com>
Tue, 14 May 2019 13:42:19 +0000 (16:42 +0300)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 15 Jun 2019 17:55:32 +0000 (19:55 +0200)
Cherry-picked from CAF QSDK repo.
see 090-ipq40xx-fix-high-resolution-timer.patch

Original commit message:
The kernel is failing in switching the timer for high resolution
mode and clock source operates in 10ms resolution. The always-on
property needs to be given for timer device tree node to make
clock source working in 1ns resolution.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[changed authorship of main patch to pavel and cherry-picked
patch to Abhishek Sahu]

target/linux/ipq40xx/patches-4.14/090-ipq40xx-fix-high-resolution-timer.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-4.14/701-dts-ipq4019-add-mdio-node.patch
target/linux/ipq40xx/patches-4.14/702-dts-ipq4019-add-PHY-switch-nodes.patch
target/linux/ipq40xx/patches-4.14/711-dts-ipq4019-add-ethernet-essedma-node.patch
target/linux/ipq40xx/patches-4.19/086-ipq40xx-fix-high-resolution-timer.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-4.19/701-dts-ipq4019-add-mdio-node.patch
target/linux/ipq40xx/patches-4.19/702-dts-ipq4019-add-PHY-switch-nodes.patch
target/linux/ipq40xx/patches-4.19/711-dts-ipq4019-add-ethernet-essedma-node.patch

diff --git a/target/linux/ipq40xx/patches-4.14/090-ipq40xx-fix-high-resolution-timer.patch b/target/linux/ipq40xx/patches-4.14/090-ipq40xx-fix-high-resolution-timer.patch
new file mode 100644 (file)
index 0000000..796844d
--- /dev/null
@@ -0,0 +1,29 @@
+From 09f145f417a5d64d6b8d4476699dfb0eccc6c784 Mon Sep 17 00:00:00 2001
+From: Abhishek Sahu <absahu@codeaurora.org>
+Date: Tue, 7 May 2019 10:14:05 +0300
+Subject: [PATCH] ipq40xx: fix high resolution timer
+
+Cherry-picked from CAF QSDK repo.
+Original commit message:
+The kernel is failing in switching the timer for high resolution
+mode and clock source operates in 10ms resolution. The always-on
+property needs to be given for timer device tree node to make
+clock source working in 1ns resolution.
+
+Change-Id: I7c00b3c74d97c2a30ac9f05e18b511a0550fd459
+Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
+Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
+---
+ arch/arm/boot/dts/qcom-ipq4019.dtsi | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+@@ -167,6 +167,7 @@
+                            <1 4 0xf08>,
+                            <1 1 0xf08>;
+               clock-frequency = <48000000>;
++              always-on;
+       };
+       soc {
index 0e1bb87368816c93e51433977466af2686fba5e7..b7e241058ce7e59aaf0eb1b929d37bd9d36aef9e 100644 (file)
@@ -15,7 +15,7 @@ so the info might change.
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -566,6 +566,34 @@
+@@ -567,6 +567,34 @@
                        status = "disabled";
                };
  
index 03da6c863a8eb4c4de2b0a60850a1e8acc23f628..cc56a60ea3a5448f49c2c098be88382a97aa6814 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -594,6 +594,29 @@
+@@ -595,6 +595,29 @@
                        };
                };
  
index 7302d237bcf9f559e27593cfe3700403bbc59db4..80b16a8211ac8a494b5df059177e20db8a87e622 100644 (file)
@@ -25,7 +25,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
        };
  
        cpus {
-@@ -617,6 +619,64 @@
+@@ -618,6 +620,64 @@
                        status = "disabled";
                };
  
diff --git a/target/linux/ipq40xx/patches-4.19/086-ipq40xx-fix-high-resolution-timer.patch b/target/linux/ipq40xx/patches-4.19/086-ipq40xx-fix-high-resolution-timer.patch
new file mode 100644 (file)
index 0000000..b451822
--- /dev/null
@@ -0,0 +1,29 @@
+From 09f145f417a5d64d6b8d4476699dfb0eccc6c784 Mon Sep 17 00:00:00 2001
+From: Abhishek Sahu <absahu@codeaurora.org>
+Date: Tue, 7 May 2019 10:14:05 +0300
+Subject: [PATCH] ipq40xx: fix high resolution timer
+
+Cherry-picked from CAF QSDK repo.
+Original commit message:
+The kernel is failing in switching the timer for high resolution
+mode and clock source operates in 10ms resolution. The always-on
+property needs to be given for timer device tree node to make
+clock source working in 1ns resolution.
+
+Change-Id: I7c00b3c74d97c2a30ac9f05e18b511a0550fd459
+Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
+Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
+---
+ arch/arm/boot/dts/qcom-ipq4019.dtsi | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+@@ -171,6 +171,7 @@
+                            <1 4 0xf08>,
+                            <1 1 0xf08>;
+               clock-frequency = <48000000>;
++              always-on;
+       };
+       soc {
index e5936a0c93aa73e509200104ff746fd40f69d970..0298644d22add01172943ff8259a422b73992fbc 100644 (file)
@@ -15,7 +15,7 @@ so the info might change.
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -570,6 +570,34 @@
+@@ -571,6 +571,34 @@
                        status = "disabled";
                };
  
index 7c5d1ec2bbb3805bfab85857b1bf937e2b16b002..df9569929413f0281ed63cf5b7865296d6c04bf3 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
 
 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -598,6 +598,29 @@
+@@ -599,6 +599,29 @@
                        };
                };
  
index 51cf41114325b34e3c5a7fd21939b0561cb1191b..8f7627b0486a8441c5ec8f81f9f8697521b47110 100644 (file)
@@ -25,7 +25,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
        };
  
        cpus {
-@@ -621,6 +623,64 @@
+@@ -622,6 +624,64 @@
                        status = "disabled";
                };