linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled
@ 2013-11-30 15:45 Christophe Leroy
  2013-12-01 19:43 ` Guenter Roeck
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christophe Leroy @ 2013-11-30 15:45 UTC (permalink / raw)
  To: Wim Van Sebroeck, scottwood; +Cc: linux-kernel, linux-watchdog, linuxppc-dev

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

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
--- a/drivers/watchdog/mpc8xxx_wdt.c	2013-05-11 22:57:46.000000000 +0200
+++ b/drivers/watchdog/mpc8xxx_wdt.c	2013-08-08 02:12:15.000000000 +0200
@@ -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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled
  2013-11-30 15:45 [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled Christophe Leroy
@ 2013-12-01 19:43 ` Guenter Roeck
  2013-12-02  6:14   ` Wolfgang Denk
  2013-12-02 16:04 ` Guenter Roeck
  2014-02-24 19:51 ` Wim Van Sebroeck
  2 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2013-12-01 19:43 UTC (permalink / raw)
  To: Christophe Leroy, Wim Van Sebroeck, scottwood
  Cc: linux-kernel, linux-watchdog, linuxppc-dev

On 11/30/2013 07:45 AM, Christophe Leroy wrote:
> 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

> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
>
> diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
> --- a/drivers/watchdog/mpc8xxx_wdt.c	2013-05-11 22:57:46.000000000 +0200
> +++ b/drivers/watchdog/mpc8xxx_wdt.c	2013-08-08 02:12:15.000000000 +0200
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled
  2013-12-01 19:43 ` Guenter Roeck
@ 2013-12-02  6:14   ` Wolfgang Denk
  2013-12-06 19:35     ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2013-12-02  6:14 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Christophe Leroy, Wim Van Sebroeck, scottwood, linuxppc-dev,
	linux-kernel, linux-watchdog

Dear Guenter,

In message <529B9152.9090106@roeck-us.net> you wrote:
> On 11/30/2013 07:45 AM, Christophe Leroy wrote:
> > 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

-- 
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: wd@denx.de
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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled
  2013-11-30 15:45 [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled Christophe Leroy
  2013-12-01 19:43 ` Guenter Roeck
@ 2013-12-02 16:04 ` Guenter Roeck
  2014-02-24 19:51 ` Wim Van Sebroeck
  2 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2013-12-02 16:04 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Wim Van Sebroeck, scottwood, linux-kernel, linux-watchdog, linuxppc-dev

On Sat, Nov 30, 2013 at 04:45:40PM +0100, Christophe Leroy wrote:
> MPC8xx watchdog is enabled at startup by HW.
> If the bootloader disables it, it cannot be reenabled.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> 
Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
> --- a/drivers/watchdog/mpc8xxx_wdt.c	2013-05-11 22:57:46.000000000 +0200
> +++ b/drivers/watchdog/mpc8xxx_wdt.c	2013-08-08 02:12:15.000000000 +0200
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled
  2013-12-02  6:14   ` Wolfgang Denk
@ 2013-12-06 19:35     ` Scott Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Scott Wood @ 2013-12-06 19:35 UTC (permalink / raw)
  To: Wolfgang Denk
  Cc: Guenter Roeck, Christophe Leroy, Wim Van Sebroeck, linuxppc-dev,
	linux-kernel, linux-watchdog

On Mon, 2013-12-02 at 07:14 +0100, Wolfgang Denk wrote:
> Dear Guenter,
> 
> In message <529B9152.9090106@roeck-us.net> you wrote:
> > On 11/30/2013 07:45 AM, Christophe Leroy wrote:
> > > 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.

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled
  2013-11-30 15:45 [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled Christophe Leroy
  2013-12-01 19:43 ` Guenter Roeck
  2013-12-02 16:04 ` Guenter Roeck
@ 2014-02-24 19:51 ` Wim Van Sebroeck
  2 siblings, 0 replies; 6+ messages in thread
From: Wim Van Sebroeck @ 2014-02-24 19:51 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: scottwood, linux-kernel, linux-watchdog, linuxppc-dev

Hi Christophe,

> MPC8xx watchdog is enabled at startup by HW.
> If the bootloader disables it, it cannot be reenabled.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> 
> diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
> --- a/drivers/watchdog/mpc8xxx_wdt.c	2013-05-11 22:57:46.000000000 +0200
> +++ b/drivers/watchdog/mpc8xxx_wdt.c	2013-08-08 02:12:15.000000000 +0200
> @@ -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
> 

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

Kind regards,
Wim.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-24 19:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-30 15:45 [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled Christophe Leroy
2013-12-01 19:43 ` Guenter Roeck
2013-12-02  6:14   ` Wolfgang Denk
2013-12-06 19:35     ` Scott Wood
2013-12-02 16:04 ` Guenter Roeck
2014-02-24 19:51 ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).