[U-Boot] CONFIG_WATCHDOG on MPC85XX and QorIQ P1/P2

Hi,
I'm trying to enable watchdog in u-boot on P1011 based platform. I've noticed that all 85XX platforms have CONFIG_WATCHDOG disabled. There's a definition of reset_85xx_watchdog() in cpu/mpc85xx/cpu.c but no code that actually enables the watchdog.
What should be done to make this feature working on these platforms ?
Thanks a lot.
Felix.

Hello Felix
We have not used watchdog feature in u-boot as such.
Timur, do you have any idea about this? Can you give some pointers here.
I will also try to explore it more.
Regards Poonam
-----Original Message----- From: Felix Radensky [mailto:felix@embedded-sol.com] Sent: Thursday, March 03, 2011 5:41 AM To: U-Boot-Denx; Kumar Gala; Aggrwal Poonam-B10812 Subject: CONFIG_WATCHDOG on MPC85XX and QorIQ P1/P2
Hi,
I'm trying to enable watchdog in u-boot on P1011 based platform. I've noticed that all 85XX platforms have CONFIG_WATCHDOG disabled. There's a definition of reset_85xx_watchdog() in cpu/mpc85xx/cpu.c but no code that actually enables the watchdog.
What should be done to make this feature working on these platforms ?
Thanks a lot.
Felix.

I don't think anyone here has ever turned on watchdog support on an 85xx board. I think it works on 86xx boards, though.
Aggrwal Poonam-B10812 wrote:
Hello Felix
We have not used watchdog feature in u-boot as such.
Timur, do you have any idea about this? Can you give some pointers here.
I will also try to explore it more.
Regards Poonam
-----Original Message----- From: Felix Radensky [mailto:felix@embedded-sol.com] Sent: Thursday, March 03, 2011 5:41 AM To: U-Boot-Denx; Kumar Gala; Aggrwal Poonam-B10812 Subject: CONFIG_WATCHDOG on MPC85XX and QorIQ P1/P2
Hi,
I'm trying to enable watchdog in u-boot on P1011 based platform. I've noticed that all 85XX platforms have CONFIG_WATCHDOG disabled. There's a definition of reset_85xx_watchdog() in cpu/mpc85xx/cpu.c but no code that actually enables the watchdog.
What should be done to make this feature working on these platforms ?
Thanks a lot.
Felix.

Hi All,
Just clarification, felix is asking for WatchDog support on u-boot not on Linux. If he is asking on Linux then it's there and we have tested it.
Regards, Dipen
-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Tabi Timur-B04825 Sent: Thursday, March 03, 2011 9:51 AM To: Aggrwal Poonam-B10812 Cc: U-Boot-Denx; Felix Radensky; Kumar Gala Subject: Re: [U-Boot] CONFIG_WATCHDOG on MPC85XX and QorIQ P1/P2
I don't think anyone here has ever turned on watchdog support on an 85xx board. I think it works on 86xx boards, though.
Aggrwal Poonam-B10812 wrote:
Hello Felix
We have not used watchdog feature in u-boot as such.
Timur, do you have any idea about this? Can you give some pointers here.
I will also try to explore it more.
Regards Poonam
-----Original Message----- From: Felix Radensky [mailto:felix@embedded-sol.com] Sent: Thursday, March 03, 2011 5:41 AM To: U-Boot-Denx; Kumar Gala; Aggrwal Poonam-B10812 Subject: CONFIG_WATCHDOG on MPC85XX and QorIQ P1/P2
Hi,
I'm trying to enable watchdog in u-boot on P1011 based platform. I've noticed that all 85XX platforms have CONFIG_WATCHDOG disabled. There's a definition of reset_85xx_watchdog() in cpu/mpc85xx/cpu.c but no code that actually enables the watchdog.
What should be done to make this feature working on these platforms ?
Thanks a lot.
Felix.
-- Timur Tabi Linux kernel developer _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Hi Dipen,
On 03/03/2011 06:27 AM, Dudhat Dipen-B09055 wrote:
Hi All,
Just clarification, felix is asking for WatchDog support on u-boot not on Linux. If he is asking on Linux then it's there and we have tested it.
Correct. It works fine in linux. I've even tried to port linux code that enables watchdog (booke_wdt.c/__booke_wdt_enable()) to u-boot, but was not successful. Watchdog never triggered, although I did not refresh it.
I'd appreciate some advice on what may be different in u-boot vs. linux.
Thanks a lot.
Felix.
Regards, Dipen
-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Tabi Timur-B04825 Sent: Thursday, March 03, 2011 9:51 AM To: Aggrwal Poonam-B10812 Cc: U-Boot-Denx; Felix Radensky; Kumar Gala Subject: Re: [U-Boot] CONFIG_WATCHDOG on MPC85XX and QorIQ P1/P2
I don't think anyone here has ever turned on watchdog support on an 85xx board. I think it works on 86xx boards, though.
Aggrwal Poonam-B10812 wrote:
Hello Felix
We have not used watchdog feature in u-boot as such.
Timur, do you have any idea about this? Can you give some pointers here.
I will also try to explore it more.
Regards Poonam
-----Original Message----- From: Felix Radensky [mailto:felix@embedded-sol.com] Sent: Thursday, March 03, 2011 5:41 AM To: U-Boot-Denx; Kumar Gala; Aggrwal Poonam-B10812 Subject: CONFIG_WATCHDOG on MPC85XX and QorIQ P1/P2
Hi,
I'm trying to enable watchdog in u-boot on P1011 based platform. I've noticed that all 85XX platforms have CONFIG_WATCHDOG disabled. There's a definition of reset_85xx_watchdog() in cpu/mpc85xx/cpu.c but no code that actually enables the watchdog.
What should be done to make this feature working on these platforms ?
Thanks a lot.
Felix.
-- Timur Tabi Linux kernel developer _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Hi Felix,
Le 03/03/2011 08:41, Felix Radensky a écrit :
Just clarification, felix is asking for WatchDog support on u-boot not on Linux. If he is asking on Linux then it's there and we have tested it.
Correct. It works fine in linux. I've even tried to port linux code that enables watchdog (booke_wdt.c/__booke_wdt_enable()) to u-boot, but was not successful. Watchdog never triggered, although I did not refresh it.
I'd appreciate some advice on what may be different in u-boot vs. linux.
Thanks a lot.
Asking the obvious just in case: are you sure the watchdog is *armed*? Maybe you could add debug code to test if it is, e.g. regularly displaying the remaining count?
Felix.
Amicalement,

Felix Radensky wrote:
Correct. It works fine in linux. I've even tried to port linux code that enables watchdog (booke_wdt.c/__booke_wdt_enable()) to u-boot, but was not successful. Watchdog never triggered, although I did not refresh it.
I'd appreciate some advice on what may be different in u-boot vs. linux.
I don't know what to tell you. I would need to try to make it myself in order to see what's going on. Maybe you really didn't program TCR correctly. Or maybe it is working, but the default behavior of U-Boot is to handle everything silently.

Hi Timur,
On 03/03/2011 02:33 PM, Tabi Timur-B04825 wrote:
Felix Radensky wrote:
Correct. It works fine in linux. I've even tried to port linux code that enables watchdog (booke_wdt.c/__booke_wdt_enable()) to u-boot, but was not successful. Watchdog never triggered, although I did not refresh it.
I'd appreciate some advice on what may be different in u-boot vs. linux.
I don't know what to tell you. I would need to try to make it myself in order to see what's going on. Maybe you really didn't program TCR correctly. Or maybe it is working, but the default behavior of U-Boot is to handle everything silently.
Thanks. I suspect u-boot WDT behaviour should be different from Linux. Linux sets TCR_WIE bit to enable watchdog interrupt, u-boot should not do this and just reset the CPU on first time-out. The TCR values are identical in u-boot and linux, except for TCR_WIE and TCR_DIE bits that are set in linux.
Except not setting TCI_WIE bit and setting WRC to 10b, is there anything else that should be done to cause reset of first time-out ?
Felix.

Felix Radensky wrote:
Except not setting TCI_WIE bit and setting WRC to 10b, is there anything else that should be done to cause reset of first time-out ?
Like I said, I would need to debug it myself to know more, and I don't have the time for that.

Hi Timur,
On 03/03/2011 03:11 PM, Tabi Timur-B04825 wrote:
Felix Radensky wrote:
Except not setting TCI_WIE bit and setting WRC to 10b, is there anything else that should be done to cause reset of first time-out ?
Like I said, I would need to debug it myself to know more, and I don't have the time for that.
Thanks anyway. I've found the problem and watchdog works fine now.
Felix.
participants (5)
-
Aggrwal Poonam-B10812
-
Albert ARIBAUD
-
Dudhat Dipen-B09055
-
Felix Radensky
-
Tabi Timur-B04825