Skip to contentSkip to conversation

watchdog: mpc8xxx_wdt: MPC8xx is HW enabled

PATCH In review Christophe Leroy 5 participants 6 messages Nov 30, 2013 – Feb 24, 2014 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: mpc8xxx_wdt: MPC8xx is HW enabled

MPC8xx watchdog is enabled at startup by HW. If the bootloader disables it, it cannot be reenabled.

drivers/watchdog/mpc8xxx_wdt.c +1 -0
diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
@@ -273,6 +310,7 @@
 		.compatible = "fsl,mpc823-wdt",
 		.data = &(struct mpc8xxx_wdt_type) {
 			.prescaler = 0x800,
+			.hw_enabled = true,
 		},
 	},
 	{},

---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com

maintainer
#1 lore raw
Quoted 3 lines · Christophe Leroy

MPC8xx watchdog is enabled at startup by HW. If the bootloader disables it, it cannot be reenabled.

Is that true for all variants of 8xx, especially for 823 ? I am a bit concerned about breaking compatibility with some chips ... assuming there was a reason for not setting this flag originally.

Thanks,
Guenter

Quoted 24 lines

diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c

drivers/watchdog/mpc8xxx_wdt.c +1 -1
@@ -273,6 +310,7 @@
  		.compatible = "fsl,mpc823-wdt",
  		.data = &(struct mpc8xxx_wdt_type) {
  			.prescaler = 0x800,
+			.hw_enabled = true,
  		},
  	},
  	{},
 
---

Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Dear Guenter,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 2 lines · Christophe Leroy

MPC8xx watchdog is enabled at startup by HW. If the bootloader disables it, it cannot be reenabled.

Is that true for all variants of 8xx, especially for 823 ? I am a bit concerned about breaking compatibility with some chips ... assuming there was a reason for not setting this flag originally.

This is correct, and applies for all variants of the MPC8xx, including the MPC823 / MPC823E. From the UM:

"The software watchdog timer can be disabled or its timeout period can be changed in the SYPCR. Once the SYPCR is written, it cannot be written again until a system reset."

Actually this is the only correct behaviour. Any watchdog that can be disabled by software is not worth it's name, and unsuitable for any kind of aplications where security / reliability are required.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Ninety-Ninety Rule of Project Schedules:
        The first ninety percent of the task takes ninety percent of
the time, and the last ten percent takes the other ninety percent.
#3 lore raw
Quoted 14 lines · Wolfgang Denk

Dear Guenter,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 2 lines · Christophe Leroy

MPC8xx watchdog is enabled at startup by HW. If the bootloader disables it, it cannot be reenabled.

Is that true for all variants of 8xx, especially for 823 ? I am a bit concerned about breaking compatibility with some chips ... assuming there was a reason for not setting this flag originally.

This is correct, and applies for all variants of the MPC8xx, including the MPC823 / MPC823E. From the UM:

Quoted 7 lines

"The software watchdog timer can be disabled or its timeout period can be changed in the SYPCR. Once the SYPCR is written, it cannot be written again until a system reset."

Actually this is the only correct behaviour. Any watchdog that can be disabled by software is not worth it's name, and unsuitable for any kind of aplications where security / reliability are required.

An optional locked state is a good thing, but making that the only way the watchdog can function can render the watchdog unusable in systems that need to go into low power states (unless the low power state supresses the watchdog). And then there's broken hybrid things like the booke watchdog, where you can't disable the watchdog reset action once configured, but you can change the timeout to be effectively infinite (which we've used as a workaround when entering low power states).

-Scott

maintainer Reviewed-by on v1 1/1
#4 lore raw
In reply to Christophe Leroy
Quoted 5 lines · Christophe Leroy

MPC8xx watchdog is enabled at startup by HW. If the bootloader disables it, it cannot be reenabled.

Quoted 21 lines

diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c

drivers/watchdog/mpc8xxx_wdt.c +1 -1
@@ -273,6 +310,7 @@
 		.compatible = "fsl,mpc823-wdt",
 		.data = &(struct mpc8xxx_wdt_type) {
 			.prescaler = 0x800,
+			.hw_enabled = true,
 		},
 	},
 	{},
 
---

Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
In reply to Christophe Leroy

Hi Christophe,

Quoted 18 lines

MPC8xx watchdog is enabled at startup by HW. If the bootloader disables it, it cannot be reenabled.

diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c

drivers/watchdog/mpc8xxx_wdt.c +1 -1
@@ -273,6 +310,7 @@
 		.compatible = "fsl,mpc823-wdt",
 		.data = &(struct mpc8xxx_wdt_type) {
 			.prescaler = 0x800,
+			.hw_enabled = true,
 		},
 	},
 	{},
 
---
Quoted 3 lines

Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html