Skip to contentSkip to conversation

CONFIG_WATCHDOG on MPC85XX and QorIQ P1/P2

U-Boot Felix Radensky 5 participants 10 messages Mar 3, 2011 – Mar 7, 2011

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw

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

Quoted 22 lines

-----Original Message-----
From: Felix Radensky [mailto:felix at 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.

#2 lore raw

I don't think anyone here has ever turned on watchdog support on an 85xx board. I think it works on 86xx boards, though.

Quoted 34 lines · 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

Quoted 22 lines

-----Original Message-----
From: Felix Radensky [mailto:felix at 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.

Signature · 2 lines
Timur Tabi
Linux kernel developer
#3 lore raw

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: [email protected] [mailto:u-boot-bounces at 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.

Quoted 34 lines · 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

Quoted 22 lines

-----Original Message-----
From: Felix Radensky [mailto:felix at 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 at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#4 lore raw

Hi Dipen,

Quoted 4 lines · 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.

Quoted 56 lines

Regards,
Dipen

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at 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.

Quoted 33 lines · 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

Quoted 22 lines

-----Original Message-----
From: Felix Radensky [mailto:felix at 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 at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#5 lore raw

Hi Felix,

Le 03/03/2011 08:41, Felix Radensky a ?crit :

Quoted 8 lines
Quoted 2 lines

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.

Quoted 4 lines

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?

Quoted 1 line

Felix.

Amicalement,

Signature · 1 line
Albert.
#6 lore raw
In reply to Felix Radensky
Quoted 7 lines · Felix Radensky

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.

Signature · 2 lines
Timur Tabi
Linux kernel developer
#7 lore raw

Hi Timur,

Quoted 9 lines · On 03/03/2011 02:33 PM, Tabi Timur-B04825 wrote:
Quoted 7 lines · Felix Radensky

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.

#8 lore raw
Quoted 4 lines · Felix Radensky

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.

Signature · 2 lines
Timur Tabi
Linux kernel developer
#9 lore raw

Hi Timur,

Quoted 6 lines · On 03/03/2011 03:11 PM, Tabi Timur-B04825 wrote:
Quoted 3 lines · Felix Radensky

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.