Skip to contentSkip to conversation

AT91: DT: Watchdog, remove property idle halt by default

PATCH Superseded Sylvain Rochet 2 participants 6 messages Jan 17, 2015 – Jan 22, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AT91: DT: Watchdog, remove property idle halt by default

The behavior changed when watchdog properties were added to DT, it makes the watchdog not counting when CPU is in idle state, therefore the watchdog reset time depend on mean CPU usage and will not reset at all if the CPU stop working while it is in idle state, which is a very weird behavior.

Apply principle of least surprise on at91sam9260-wdt by removing idle halt flag by default.

---
 arch/arm/boot/dts/at91sam9x5.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/at91sam9x5.dtsi +0 -1
index bbb3ba6..ce61f91 100644
@@ -1125,7 +1125,6 @@
 				atmel,watchdog-type = "hardware";
 				atmel,reset-type = "all";
 				atmel,dbg-halt;
-				atmel,idle-halt;
 				status = "disabled";
 			};
 
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 AT91: DT: Watchdog, remove property idle halt by default

Hi Sylvain,

Quoted 10 lines · On Sat, 17 Jan 2015 22:49:56 +0100 Sylvain Rochet…

The behavior changed when watchdog properties were added to DT, it makes the watchdog not counting when CPU is in idle state, therefore the watchdog reset time depend on mean CPU usage and will not reset at all if the CPU stop working while it is in idle state, which is a very weird behavior.

Apply principle of least surprise on at91sam9260-wdt by removing idle halt flag by default.

Can you do this change for all impacted SoCs (here is a patch doing it [1]) ?

Apart from that you can add my:

Best Regards,

Boris

[1]http://code.bulix.org/weg3zv-87745

Quoted 16 lines
---
 arch/arm/boot/dts/at91sam9x5.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/at91sam9x5.dtsi +0 -1
index bbb3ba6..ce61f91 100644
@@ -1125,7 +1125,6 @@
 				atmel,watchdog-type = "hardware";
 				atmel,reset-type = "all";
 				atmel,dbg-halt;
-				atmel,idle-halt;
 				status = "disabled";
 			};
 
Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

v2 cover dts: AT91 Watchdog, remove property idle halt by default

Change since v1:
* Apply this change for all impacted SoCs
* Improved DTS documentation about this property

Sylvain Rochet (2):
dts: Documentation: AT91 Watchdog, explain what atmel,idle-halt
property really do
dts: AT91 Watchdog, remove property idle halt by default

 Documentation/devicetree/bindings/watchdog/atmel-wdt.txt | 5 +++++
 arch/arm/boot/dts/at91sam9260.dtsi                       | 1 -
 arch/arm/boot/dts/at91sam9263.dtsi                       | 1 -
 arch/arm/boot/dts/at91sam9g45.dtsi                       | 1 -
 arch/arm/boot/dts/at91sam9n12.dtsi                       | 1 -
 arch/arm/boot/dts/at91sam9x5.dtsi                        | 1 -
 arch/arm/boot/dts/sama5d3.dtsi                           | 1 -
 7 files changed, 5 insertions(+), 6 deletions(-)
Signature · 1 line
2.1.4
#3 lore raw

PATCH v2 1/2 dts: Documentation: AT91 Watchdog, explain what atmel, idle-halt property really do

atmel,idle-halt property should be used with care, it actually makes the watchdog not counting when the CPU is in idle state, therefore the watchdog reset time depends on mean CPU usage and will not reset at all of the CPU stop working while it is in idle state, which is probably not what you want.

---
 Documentation/devicetree/bindings/watchdog/atmel-wdt.txt | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/watchdog/atmel-wdt.txt +5 -0
index f90e294..a4d8697 100644
@@ -26,6 +26,11 @@ Optional properties:
 - atmel,disable : Should be present if you want to disable the watchdog.
 - atmel,idle-halt : Should be present if you want to stop the watchdog when
 	entering idle state.
+	CAUTION: This property should be used with care, it actually makes the
+	watchdog not counting when the CPU is in idle state, therefore the
+	watchdog reset time depends on mean CPU usage and will not reset at all
+	if the CPU stop working while it is in idle state, which is probably
+	not what you want.
 - atmel,dbg-halt : Should be present if you want to stop the watchdog when
 	entering debug state.
 
Signature · 1 line
2.1.4
#4 lore raw

PATCH v2 1/2 dts: Documentation: AT91 Watchdog, explain what atmel,idle-halt property really do

Quoted 7 lines · On Sun, 18 Jan 2015 14:26:50 +0100 Sylvain Rochet…

atmel,idle-halt property should be used with care, it actually makes the watchdog not counting when the CPU is in idle state, therefore the watchdog reset time depends on mean CPU usage and will not reset at all of the CPU stop working while it is in idle state, which is probably not what you want.

Quoted 20 lines
---
 Documentation/devicetree/bindings/watchdog/atmel-wdt.txt | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/watchdog/atmel-wdt.txt +5 -0
index f90e294..a4d8697 100644
@@ -26,6 +26,11 @@ Optional properties:
 - atmel,disable : Should be present if you want to disable the watchdog.
 - atmel,idle-halt : Should be present if you want to stop the watchdog when
 	entering idle state.
+	CAUTION: This property should be used with care, it actually makes the
+	watchdog not counting when the CPU is in idle state, therefore the
+	watchdog reset time depends on mean CPU usage and will not reset at all
+	if the CPU stop working while it is in idle state, which is probably
+	not what you want.
 - atmel,dbg-halt : Should be present if you want to stop the watchdog when
 	entering debug state.
 
Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#5 lore raw

PATCH v2 2/2 dts: AT91 Watchdog, remove property idle halt by default

In reply to Sylvain Rochet

The behavior changed when watchdog properties were added to DT, it makes the watchdog not counting when CPU is in idle state, therefore the watchdog reset time depends on mean CPU usage and will not reset at all if the CPU stop working while it is in idle state, which is a very weird behavior.

Apply principle of least surprise on at91sam9260-wdt by removing idle halt flag by default.

---

 arch/arm/boot/dts/at91sam9260.dtsi | 1 -
 arch/arm/boot/dts/at91sam9263.dtsi | 1 -
 arch/arm/boot/dts/at91sam9g45.dtsi | 1 -
 arch/arm/boot/dts/at91sam9n12.dtsi | 1 -
 arch/arm/boot/dts/at91sam9x5.dtsi  | 1 -
 arch/arm/boot/dts/sama5d3.dtsi     | 1 -
 6 files changed, 6 deletions(-)
arch/arm/boot/dts/at91sam9260.dtsi +0 -1
index dd1313c..184e1d1 100644
@@ -971,7 +971,6 @@
 				atmel,watchdog-type = "hardware";
 				atmel,reset-type = "all";
 				atmel,dbg-halt;
-				atmel,idle-halt;
 				status = "disabled";
 			};
 
arch/arm/boot/dts/at91sam9263.dtsi +0 -1
index 1467750..c39556b 100644
@@ -874,7 +874,6 @@
 				atmel,watchdog-type = "hardware";
 				atmel,reset-type = "all";
 				atmel,dbg-halt;
-				atmel,idle-halt;
 				status = "disabled";
 			};
 
arch/arm/boot/dts/at91sam9g45.dtsi +0 -1
index 2a8da8a..b8d741d 100644
@@ -1111,7 +1111,6 @@
 				atmel,watchdog-type = "hardware";
 				atmel,reset-type = "all";
 				atmel,dbg-halt;
-				atmel,idle-halt;
 				status = "disabled";
 			};
 
arch/arm/boot/dts/at91sam9n12.dtsi +0 -1
index 68eb9ad..e0b5c24 100644
@@ -889,7 +889,6 @@
 				atmel,watchdog-type = "hardware";
 				atmel,reset-type = "all";
 				atmel,dbg-halt;
-				atmel,idle-halt;
 				status = "disabled";
 			};
 
arch/arm/boot/dts/at91sam9x5.dtsi +0 -1
index bbb3ba6..ce61f91 100644
@@ -1125,7 +1125,6 @@
 				atmel,watchdog-type = "hardware";
 				atmel,reset-type = "all";
 				atmel,dbg-halt;
-				atmel,idle-halt;
 				status = "disabled";
 			};
 
arch/arm/boot/dts/sama5d3.dtsi +0 -1
index 5f4144d..63d12ed 100644
@@ -1224,7 +1224,6 @@
 				atmel,watchdog-type = "hardware";
 				atmel,reset-type = "all";
 				atmel,dbg-halt;
-				atmel,idle-halt;
 				status = "disabled";
 			};
 
Signature · 1 line
2.1.4