[PATCH v2 8/8] board: ns3: start sp805 watchdog service

Stefan Roese sr at denx.de
Mon Jun 22 11:37:54 CEST 2020


On 22.06.20 11:33, Rayagonda Kokatanur wrote:

<snip>

>>>>>> Sure it takes time to update images. But all this should be possible
>>>>>> with an actively serviced watchdog while still running in U-Boot.
>>>>>> This is why we have all these WATCHDOG_RESET() calls sprinkled all over
>>>>>> the system. If some code paths are missing such WDT triggering, then we
>>>>>> should find and fix them.
>>>>>
>>>>> One more issue we are facing is,
>>>>
>>>> So did you work on fixing some of he missing WDT trigger calls?
>>>
>>> No, this issue we used to face before this patch.
>>>
>>> So you are suggesting to use WATCHDOF_RESET instead of stopping and
>>> starting the wdt.
>>> WATCHDOG_RESET will take care of resetting wdt in uboot.
>>
>> Yes.
> Thank you.
> 
>>
>>> And it won't
>>> lead to system reboot while running any test (ex-i2c read/write test)
>>> in uboot or debugging any issue in uboot ?
>>
>> Correct. The U-Boot code is "sprinkled" with these calls, easpecially
>> ion places where looping might take some time (polling for input etc).
>> So the WD timer is triggered / services via this WATCHDOG_RESET call
>> to keep U-Boot running even with an active watchdog.
> 
> What is the motivation to start watchdog service during uboot and keep
> on resetting it.

Its similar to why this is done in the OS. There might be execution
paths, where the bootloader might crash or hang (loading an image
from some device etc). And this WD behavior makes sure, that the
system does not hang but reboots in such cases.

Thanks,
Stefan


More information about the U-Boot mailing list