enabling watchdog timer
Hi,
I'm using an at91sam9260ek board. I configured a watchdog driver in my kernel only to find out that u-boot turns it off. Seaching the information in u-boot I came across some ambiguous information about keeping the watchdog ON.
The big top level README files says I need to define CONFIG_WATCHDOG, but the README.at91 in /doc says to define CONFIG_AT91SAM9_WATCHDOG and CONFIG_HW_WATCHDOG. In watchdog.h it says that CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG both cannot be defined at the same time. Whats magic combination?
Also in 'README.at91', reference is made to make sure that the watchdog in AT91Bootstrap is not disabled. Where's 'AT91Bootstrap'? I thought I found where it's disabled in 'cpu/arm926ejs/at91/lowlevel_init.s', but this files doesn't even get compiled and I can't figure out where the watchdog is disabled. Can someone point me to where this occurs?
Is there an easier approach to what I'm trying to do?
Regards,
/carl h.
Quoted 2 lines
I'm using an at91sam9260ek board. I configured a watchdog driver in my kernel only to find out that u-boot turns it off.
The problem with 9260 and friends is that the watchdog can be configured once only. In my experience the best thing to do is leaving it unconfigured (it triggers in 13 seconds, more or less) so the kernel or application can configure it (either enable at a different timeout or or disable it).
Quoted 2 lines
The big top level README files says I need to define
CONFIG_WATCHDOG, but [...]
I think you should grep around yourself. I did it with 1.1.5 and things are different now.
Quoted 2 lines
Also in 'README.at91', reference is made to make sure that the watchdog in AT91Bootstrap is not disabled. Where's 'AT91Bootstrap'?
It is a separate package. An initial program loader that loads the real boot loader from nand or dataflash. You may be using it or not, you have to check that on your setup. If u-boot is not programmed to offset 0 of your nand, you most likely have at91boot there.
The stock sources of at91boot disable the watchdog, so you most likely want to change it.
I used http://www.at91.com/repFichier/Project-209/at91bootstrap-2.3.tar.bz2
and removed line 84 of board/at91sam9260ek/at91sam9260ek.c .
After that, you'll want u-boot to trigger the watchdog without configuring it, unless you need a shorter timeout since the beginning.
Hope this helps.
/alessandro
Much appreciated Alessandro. Some good info to go on. I forgot that u-boot is a second stage bootloader under the 9260 environment, and that the AT91 bootstrap program runs before it.
Regards,
/carl h.
Quoted 37 lines · Alessandro Rubini
Quoted 2 lines
I'm using an at91sam9260ek board. I configured a watchdog driver in my kernel only to find out that u-boot turns it off.
The problem with 9260 and friends is that the watchdog can be configured once only. In my experience the best thing to do is leaving it unconfigured (it triggers in 13 seconds, more or less) so the kernel or application can configure it (either enable at a different timeout or or disable it).
Quoted 2 lines
The big top level README files says I need to define
CONFIG_WATCHDOG, but [...]I think you should grep around yourself. I did it with 1.1.5 and things are different now.
Quoted 1 line
Also in 'README.at91', reference is made to make sure that the watchdog
in
Quoted 1 line
AT91Bootstrap is not disabled. Where's 'AT91Bootstrap'?
It is a separate package. An initial program loader that loads the real boot loader from nand or dataflash. You may be using it or not, you have to check that on your setup. If u-boot is not programmed to offset 0 of your nand, you most likely have at91boot there.
The stock sources of at91boot disable the watchdog, so you most likely want to change it.
I used
http://www.at91.com/repFichier/Project-209/at91bootstrap-2.3.tar.bz2
and removed line 84 ofboard/at91sam9260ek/at91sam9260ek.c.After that, you'll want u-boot to trigger the watchdog without configuring it, unless you need a shorter timeout since the beginning.
Hope this helps.
/alessandro