
Hi,
'cpu/ppc4xx/serial.c'.
There is no such file in U-Boot.
The version of the u-boot being used is 1.1.4. The latest version of the u-boot (u-boot-2008.10) has '4xx_uart.c' instead of 'serial.c'
Which sort of watchdog device is used on your board?
I am using Software version of Watchdog (CONFIG_WATCHDOG). The routines which are related to CONFIG_WATCHDOG are available in 'cpu/ppc4xx/cpu.c'.
In the file 'include/watchdog.h', it has been mentioned that: 8<---------------------------------------------------------- #if defined(CONFIG_HW_WATCHDOG) && defined(CONFIG_WATCHDOG) # error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together." #endif ---------------------------------------------------------->8
It means I can't enable flags CONFIG_HW_WATCHDOG & CONFIG_WATCHDOG together.
Am I missing out something?
Regards, Sachin
-----Original Message----- From: Wolfgang Denk [mailto:wd@denx.de] Sent: Tuesday, January 13, 2009 12:44 AM To: Sachin Rane Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] Watchdog and u-boot command prompt
Dear Sachin,
In message 73FA539107892C4C8C7A5ACA10C161C85BE0E3@MX2.AlphionCorp.local you wrote:
I have enabled 'watchdog' in u-boot using flag 'CONFIG_WATCHDOG'. I wonder how the 'watchdog' gets reset when the cursor is waiting for user input.
As per my understanding the 'WATCHDOG_RESET()' gets called in 'readline()' prior calling 'getc()'. In our case, the 'getc()' has been mapped to 'serial_getc_dev()' of 'cpu/ppc4xx/serial.c'.
There is no such file in U-Boot.
The code of 'serial_getc_dev()' executes in continous loop till user presses a key. The good thing is that the boad doesn't get reboot even if user doesn't enter any key. In 'serial_getc_dev()', I don't see any call to reset the watchdog .
Hmmm... I don't know where you are looking. You say this is on ppc4xx, so I check "cpu/ppc4xx/4xx_uart.c" - and what do I see?
480 int serial_getc_dev (unsigned long base) 481 { 482 unsigned char status = 0; 483 484 while (1) { 485 #if defined(CONFIG_HW_WATCHDOG) 486 WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */ 487 #endif /* CONFIG_HW_WATCHDOG */ 488 489 status = in_8((u8 *)base + UART_LSR); ...
Looks pretty much as if it was an explicit call to trigger the watchdog...
Can you help me to find out the how Watchdog is taken care (gets reset) whicle executing a infinite loop (if user doesn't press any
key) ?
( Note: I am not using 'CONFIG_HW_WATCHDOG' flag)
You are not? Hmmm... What makes you think you are using a watchdog then?
Which sort of watchdog device is used on your board?
Best regards,
Wolfgang Denk