Skip to contentSkip to conversation

README: Clarify difference of CONFIG_WATCHDOG and CONFIG_HW_WATCHDOG

PATCH New Detlev Zundel 3 participants 5 messages Apr 27, 2011 – May 12, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 README: Clarify difference of CONFIG_WATCHDOG and CONFIG_HW_WATCHDOG

Now that we have the documentation, the code should be changed to reflect it ;)

Asd far as I can see, these are the places where HW_WATCHDOG is used instead of WATCHDOG:

arch/blackfin/cpu/blackfin/watchdog.c
arch/m68k/cpu/mcf547x_8x/cpu.c

The relevant maintainers are on CC.

Cc Mike Frysinger <[email protected]>
Cc TsiChungLiew <[email protected]>
---
 README |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
README +12 -5
index cdbb9de..63f5647 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000 - 2009
+# (C) Copyright 2000 - 2011
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -719,10 +719,17 @@ The following options need to be configured:
 - Watchdog:
 		CONFIG_WATCHDOG
 		If this variable is defined, it enables watchdog
-		support. There must be support in the platform specific
-		code for a watchdog. For the 8xx and 8260 CPUs, the
-		SIU Watchdog feature is enabled in the SYPCR
-		register.
+		support for the SoC. There must be support in the SoC
+		specific code for a watchdog. For the 8xx and 8260
+		CPUs, the SIU Watchdog feature is enabled in the SYPCR
+		register.  When supported for a specific SoC is
+		available, then no further board specific code should
+		be needed to use it.
+
+		CONFIG_HW_WATCHDOG
+		When using a watchdog circuitry external to the used
+		SoC, then define this variable and provide board
+		specific code for the "hw_watchdog_reset" function.
 
 - U-Boot Version:
 		CONFIG_VERSION_VARIABLE
Signature · 1 line
1.7.4.4
#1 lore raw

PATCH 1/1 README: Clarify difference of CONFIG_WATCHDOG and CONFIG_HW_WATCHDOG

Quoted 5 lines · Detlev Zundel

Now that we have the documentation, the code should be changed to reflect it ;)

Asd far as I can see, these are the places where HW_WATCHDOG is used instead of WATCHDOG:

the trouble is that watchdog.h doesnt seem to match, nor does the name. "hardware" means to me "hardware" as in "the cpu hardware".

#ifdef CONFIG_HW_WATCHDOG
...

#else
    /*
     * Maybe a software watchdog?
     */

...
#endif

i dont see how a watchdog in the SoC could be a "software" watchdog or a "non-hardware" watchdog.

the watchdog system is a legacy mess, so probably be easier to just gut the whole thing.
-mike

#2 lore raw

PATCH 1/1 README: Clarify difference of CONFIG_WATCHDOG and CONFIG_HW_WATCHDOG

Hi Mike,

Quoted 9 lines · Detlev Zundel
Quoted 5 lines

Now that we have the documentation, the code should be changed to reflect it ;)

Asd far as I can see, these are the places where HW_WATCHDOG is used instead of WATCHDOG:

the trouble is that watchdog.h doesnt seem to match, nor does the name. "hardware" means to me "hardware" as in "the cpu hardware".

Yes, I understand that the situation is not 100% ideal, but I do not share your pessimism. Currently we should straighten out the inconsistencies present in the code and then subsequently we can think about aligning it with what we agree on to be a good name for.

Quoted 7 lines

#ifdef CONFIG_HW_WATCHDOG
...

#else
    /*
     * Maybe a software watchdog?
     */
Quoted 5 lines

...
#endif

i dont see how a watchdog in the SoC could be a "software" watchdog or a "non-hardware" watchdog.

True, we should align the comments in here also - I'll se if I can come up with something sensible.

Quoted 2 lines

the watchdog system is a legacy mess, so probably be easier to just gut the whole thing.

A agree that the naming is not ideal, but this isn't a good enough argument for removing it. Apart from that, this feature is used in many commercial systems...

Cheers
Detlev

Signature · 7 lines
config LGUEST
        If unsure, say N.  If curious, say M.  If masochistic, say Y.
                                     -- linux/drivers/lguest/Kconfig
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
#3 lore raw

PATCH 1/1 README: Clarify difference of CONFIG_WATCHDOG and CONFIG_HW_WATCHDOG

Quoted 4 lines · On Friday, April 29, 2011 07:06:56 Detlev Zundel wrote:
Quoted 4 lines · Detlev Zundel
Quoted 3 lines

Now that we have the documentation, the code should be changed to reflect it ;)

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Asd far as I can see, these are the places where HW_WATCHDOG is used

instead of WATCHDOG:

the trouble is that watchdog.h doesnt seem to match, nor does the name. "hardware" means to me "hardware" as in "the cpu hardware".

Yes, I understand that the situation is not 100% ideal, but I do not share your pessimism.

it isnt pessimism ... it's a fact that the documentation does not match the source, nor is the source clear.

Quoted 6 lines
Quoted 2 lines
Quoted 1 line

the watchdog system is a legacy mess, so probably be easier to just

gut the whole thing.

A agree that the naming is not ideal, but this isn't a good enough argument for removing it. Apart from that, this feature is used in many commercial systems...

i didnt mean remove it and not provide equivalent functionality. there should be a single CONFIG_WATCHDOG and every different watchdog driver should have its own CONFIG_WATCHDOG_FOO define.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110429/f99694a0/attachment.pgp

#4 lore raw

PATCH 1/1 README: Clarify difference of CONFIG_WATCHDOG and CONFIG_HW_WATCHDOG

In reply to Detlev Zundel

Dear Detlev Zundel,

Quoted 9 lines · In message <[email protected]> you wrote:

Now that we have the documentation, the code should be changed to reflect it ;)

Asd far as I can see, these are the places where HW_WATCHDOG is used instead of WATCHDOG:

arch/blackfin/cpu/blackfin/watchdog.c
arch/m68k/cpu/mcf547x_8x/cpu.c

Quoted 8 lines

The relevant maintainers are on CC.

Cc Mike Frysinger <[email protected]>
Cc TsiChungLiew <[email protected]>
---
 README |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 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: wd at denx.de
Be careful what you wish for. You never know who will be listening.
                                      - Terry Pratchett, _Soul Music_