Skip to contentSkip to conversation

deactivating PXA255 watchdog

DISCUSSION Ian Campbell 2 participants 3 messages Jun 2, 2005 – Aug 10, 2005

lore
Share & tools
lore
#0 lore raw

Hi Wim,

I think you are the current "watchdog guy", although watchdog doesn't have a MAINTAINERS entry so I'm looking at bk/lkml history etc and might be mistaken...

I wrote to the the linux-arm-kernel mailing list recently with a query because the sa1100_wdt code supports the writing 'V' to deactivate the watchdog thing, but unfortunately once armed the hardware cannot be deactivated.

I was going to produce a patch to remove the 'V' support and it was suggested by Russell that I should ask for your opinion. Do you have a preference with regards to offering a warning or error etc if a 'V' is written?

My original message is below. I have had confirmation that the SA1100 has the same behaviour as PXA2xx from Nico.

Ian.

Quoted 10 lines

The code in drivers/char/watchdog/sa1100_wdt.c has support for the standard write a 'V' for a safe shutdown semantics, which clears the OIER[E3] bit.

However, it seems that even if this bit is clear the watchdog reset will still occur because OWER[WME] is set (and cannot be cleared).

Removing this support (perhaps with a warning/error or something) would seem to make sense but I wanted to check that the SA1100 behaviour was the same since they share the driver before I submitted anything.

Signature · 4 lines
Ian Campbell, Senior Design Engineer
                                        Web: http://www.arcom.com
Arcom, Clifton Road,                    Direct: +44 (0)1223 403 465
Cambridge CB1 7EA, United Kingdom       Phone:  +44 (0)1223 411 200
#1 lore raw

Hi Ian,

Quoted 3 lines

I think you are the current "watchdog guy", although watchdog doesn't have a MAINTAINERS entry so I'm looking at bk/lkml history etc and might be mistaken...

Sorry for the late response. I indeed try to maintain the watchdog drivers and get a uniform API for all the watchdog drivers.

Quoted 5 lines

I wrote to the the linux-arm-kernel mailing list recently with a query because the sa1100_wdt code supports the writing 'V' to deactivate the watchdog thing, but unfortunately once armed the hardware cannot be deactivated.

Quoted 7 lines

I was going to produce a patch to remove the 'V' support and it was suggested by Russell that I should ask for your opinion. Do you have a preference with regards to offering a warning or error etc if a 'V' is written?

My original message is below. I have had confirmation that the SA1100 has the same behaviour as PXA2xx from Nico.

the actual problem you have is not the magic char 'V' that needs to be written to safely stop the watchdog. The problem is that your watchdog can not be stopped once started.
What we should do (in my opinion) is to add a timer like done in mixcomwd.c. What this timer does is ping/tickle the watchdog internally when the watchdog is supposed to be not active. (So it starts pinging the watchdog after userspace stopped/released /dev/watchdog and it stops again when the userspace opens /dev/atchdog again).
The writing of the magic char V is a failsafe mechanism for if the watchdog daemon would crash and close /dev/watchdog when it is supposed to keep working...

Greetings,
Wim.

#2 lore raw
Quoted 22 lines · Wim Van Sebroeck

Hi Ian,

Quoted 3 lines

I think you are the current "watchdog guy", although watchdog doesn't have a MAINTAINERS entry so I'm looking at bk/lkml history etc and might be mistaken...

Sorry for the late response. I indeed try to maintain the watchdog drivers and get a uniform API for all the watchdog drivers.

Quoted 5 lines

I wrote to the the linux-arm-kernel mailing list recently with a query because the sa1100_wdt code supports the writing 'V' to deactivate the watchdog thing, but unfortunately once armed the hardware cannot be deactivated.

Quoted 7 lines

I was going to produce a patch to remove the 'V' support and it was suggested by Russell that I should ask for your opinion. Do you have a preference with regards to offering a warning or error etc if a 'V' is written?

My original message is below. I have had confirmation that the SA1100 has the same behaviour as PXA2xx from Nico.

Quoted 11 lines

the actual problem you have is not the magic char 'V' that needs to be written to safely stop the watchdog. The problem is that your watchdog can not be stopped once started.
What we should do (in my opinion) is to add a timer like done in mixcomwd.c. What this timer does is ping/tickle the watchdog internally when the watchdog is supposed to be not active. (So it starts pinging the watchdog after userspace stopped/released /dev/watchdog and it stops again when the userspace opens /dev/atchdog again).
The writing of the magic char V is a failsafe mechanism for if the watchdog daemon would crash and close /dev/watchdog when it is supposed to keep working...

A patch to simply pull out the 'V' failsafe handling was already merged into the kernel.

I can try and find time to look at adding a timer etc but it might be some time so if you feel like doing it please feel free.

Ian.

Signature · 10 lines
Ian Campbell, Senior Design Engineer
                                        Web: http://www.arcom.com
Arcom, Clifton Road,                    Direct: +44 (0)1223 403 465
Cambridge CB1 7EA, United Kingdom       Phone:  +44 (0)1223 411 200


_____________________________________________________________________
The message in this transmission is sent in confidence for the attention of the addressee only and should not be disclosed to any other party. Unauthorised recipients are requested to preserve this confidentiality. Please advise the sender if the addressee is not resident at the receiving end.  Email to and from Arcom is automatically monitored for operational and lawful business reasons.

This message has been virus scanned by MessageLabs.