Skip to contentSkip to conversation

arm: dts: ls1021a: fix the value of TMR_FIPER1

PATCH In review Yangbo Lu 2 participants 4 messages Nov 29, 2017 – Dec 20, 2017 Device tree bindings

lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH v2 1/1 arm: dts: ls1021a: fix the value of TMR_FIPER1

The timer fixed interval period pulse generator register is used to generate periodic pulses. The down count register loads the value programmed in the fixed period interval (FIPER). At every tick of the timer accumulator overflow, the counter decrements by the value of TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down counter value reaches zero. It reloads the down counter in the cycle following a pulse. To use the TMR_FIPER1 register to generate a 1 PPS event, the value (10^9 nanoseconds) - TCLK_PERIOD should be programmed. It should be 999999995 not 999999990 since TCLK_PERIOD is 5.

---
Changes for v2:
- Added Shawn into cc list.

---
 arch/arm/boot/dts/ls1021a.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ls1021a.dtsi +1 -1
index 64249726b3cb..a861a4b9e319 100644
@@ -589,7 +589,7 @@
 			fsl,tclk-period = <5>;
 			fsl,tmr-prsc    = <2>;
 			fsl,tmr-add     = <0xaaaaaaab>;
-			fsl,tmr-fiper1  = <999999990>;
+			fsl,tmr-fiper1  = <999999995>;
 			fsl,tmr-fiper2  = <99990>;
 			fsl,max-adj     = <499999999>;
 		};
Signature · 1 line
2.14.1
#1 lore raw
Quoted 13 lines · Yangbo Lu

The timer fixed interval period pulse generator register is used to generate periodic pulses. The down count register loads the value programmed in the fixed period interval (FIPER). At every tick of the timer accumulator overflow, the counter decrements by the value of TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down counter value reaches zero. It reloads the down counter in the cycle following a pulse. To use the TMR_FIPER1 register to generate a 1 PPS event, the value (10^9 nanoseconds) - TCLK_PERIOD should be programmed. It should be 999999995 not 999999990 since TCLK_PERIOD is 5.

Quoted 1 line

Again, for arm dts, we usually use prefix like 'ARM: dts: ...'

I fixed it up and applied the patch.

Shawn

Quoted 28 lines

---
Changes for v2:
- Added Shawn into cc list.

---
 arch/arm/boot/dts/ls1021a.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ls1021a.dtsi +1 -1
index 64249726b3cb..a861a4b9e319 100644
@@ -589,7 +589,7 @@
 			fsl,tclk-period = <5>;
 			fsl,tmr-prsc    = <2>;
 			fsl,tmr-add     = <0xaaaaaaab>;
-			fsl,tmr-fiper1  = <999999990>;
+			fsl,tmr-fiper1  = <999999995>;
 			fsl,tmr-fiper2  = <99990>;
 			fsl,max-adj     = <499999999>;
 		};
Signature · 7 lines
2.14.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author
#2 lore raw

Hi Shawn,

Sorry for bother. I just couldn?t find this patch on your git tree. Could you help to check?
Thanks a lot.

Best regards,
Yangbo Lu

Quoted 69 lines

-----Original Message-----
From: Shawn Guo [mailto:shawnguo at kernel.org]
Sent: 2017?11?30? 8:29
To: Y.b. Lu <[email protected]>
Cc: devicetree at vger.kernel.org; linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Mark Rutland <[email protected]>; Rob Herring <[email protected]>; Russell King <[email protected]>
Subject: Re: [v2] arm: dts: ls1021a: fix the value of TMR_FIPER1

Quoted 11 lines · Yangbo Lu

The timer fixed interval period pulse generator register is used to generate periodic pulses. The down count register loads the value programmed in the fixed period interval (FIPER). At every tick of the timer accumulator overflow, the counter decrements by the value of TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down counter value reaches zero. It reloads the down counter in the cycle following a pulse. To use the TMR_FIPER1 register to generate a 1 PPS event, the value
(10^9 nanoseconds) - TCLK_PERIOD should be programmed.
It should be 999999995 not 999999990 since TCLK_PERIOD is 5.

Quoted 1 line

Again, for arm dts, we usually use prefix like 'ARM: dts: ...'

I fixed it up and applied the patch.

Shawn

Quoted 25 lines

---
Changes for v2:
- Added Shawn into cc list.

---
 arch/arm/boot/dts/ls1021a.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/ls1021a.dtsi index 64249726b3cb..a861a4b9e319 100644

arch/arm/boot/dts/ls1021a.dtsi +1 -2
@@ -589,7 +589,7 @@
 			fsl,tclk-period = <5>;
 			fsl,tmr-prsc    = <2>;
 			fsl,tmr-add     = <0xaaaaaaab>;
-			fsl,tmr-fiper1  = <999999990>;
+			fsl,tmr-fiper1  = <999999995>;
 			fsl,tmr-fiper2  = <99990>;
 			fsl,max-adj     = <499999999>;
 		};
--

2.14.1

Quoted 5 lines

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flist

s.infradead.org%2Fmailman%2Flistinfo%2Flinux-arm-kernel&data=02%7C01% 7

Quoted 1 line

Cyangbo.lu%40nxp.com%7C703a7f8c490745cac3d708d537896a63%7C686ea 1d3bc2b

Quoted 1 line

4c6fa92cd99c5c301635%7C0%7C0%7C636475985694945094&sdata=XLw6lJ ONCoo2jq

Quoted 1 line

Hoixb%2BtlYTDcLC4tPbKWT3eQ7RI7c%3D&reserved=0

#3 lore raw
Quoted 4 lines · Y.b. Lu

Hi Shawn,

Sorry for bother. I just couldn?t find this patch on your git tree. Could you help to check?

Sorry. I forgot to push the update. Just pushed now.

Shawn