Please pull u-boot-watchdog/next

Stefan Roese sr at denx.de
Fri Sep 16 21:46:49 CEST 2022


Hi Tom,

On 16.09.22 21:22, Tom Rini wrote:
> On Fri, Sep 16, 2022 at 09:12:54PM +0200, Stefan Roese wrote:
>> Hi Tom,
>>
>> On 16.09.22 16:37, Stefan Roese wrote:
>>> Hi Tom,
>>>
>>> On 16.09.22 16:21, Tom Rini wrote:
>>>> On Fri, Sep 16, 2022 at 10:08:51AM -0400, Tom Rini wrote:
>>>>> On Fri, Sep 16, 2022 at 09:22:16AM +0200, Stefan Roese wrote:
>>>>>
>>>>>> Hi Tom,
>>>>>>
>>>>>> please pull the following watchdog related patches:
>>>>>>
>>>>>> ----------------------------------------------------------------
>>>>>> - Migrate watchdog reset to cyclic infrastructure (Stefan)
>>>>>> ----------------------------------------------------------------
>>>>>>
>>>>>> Here the Azure build, without any issues:
>>>>>>
>>>>>> https://dev.azure.com/sr0718/u-boot/_build/results?buildId=260&view=results
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Stefan
>>>>>>
>>>>>> The following changes since commit
>>>>>> 6ec7207ab3c4dad098967fef5df75e25240fd852:
>>>>>>
>>>>>>     Merge branch '2022-09-15-TI-platform-updates' into next (2022-09-15
>>>>>> 17:02:52 -0400)
>>>>>>
>>>>>> are available in the Git repository at:
>>>>>>
>>>>>>     git at source.denx.de:u-boot/custodians/u-boot-watchdog.git next
>>>>>>
>>>>>> for you to fetch changes up to
>>>>>> 4bd01be23a9d0c2dbfaac0c196ead6a89824cbf8:
>>>>>>
>>>>>>     watchdog: Further cleanup (2022-09-16 07:09:05 +0200)
>>>>>>
>>>>>> ----------------------------------------------------------------
>>>>>> Stefan Roese (6):
>>>>>>         watchdog: Integrate watchdog triggering into the
>>>>>> cyclic framework
>>>>>>         cyclic: Introduce schedule() function
>>>>>>         cyclic: Use schedule() instead of WATCHDOG_RESET()
>>>>>>         watchdog: Get rid of ASSEMBLY hacks
>>>>>>         watchdog: Remove WATCHDOG_RESET macro
>>>>>>         watchdog: Further cleanup
>>>>>
>>>>> Good bad news, I've got your first hardware failure report.  One of
>>>>> these three:
>>>>> cyclic: Use schedule() instead of WATCHDOG_RESET()
>>>>> cyclic: Introduce schedule() function
>>>>> watchdog: Integrate watchdog triggering into the cyclic framework
>>>>>
>>>>> Causes am335x_evm to have no output in SPL and just hang. It, along with
>>>>> all of the other TI AM335x platforms have watchdog enabled in SPL. I can
>>>>> also observe that the system watchdog is not triggering, so maybe we're
>>>>> stuck in some loop where that's being serviced still?
>>>>>
>>>>> I suspect all the am335x boards are broken, so if you don't have
>>>>> something there you can test on let me know off-list and I'll get you
>>>>> access to my lab.
>>>>>
>>>>
>>>> I'll note that pine64_plus_defconfig is now also failing, but
>>>> interestingly dra7xx_evm_defconfig is passing.
>>>
>>> Thanks for all your testing Tom. I'll check, if I still have an AM355x
>>> here. I just now found an Cubieboard2, which also seems to have SPL
>>> watchdog enabled. Let me check, if I can get this board running and
>>> tested.
>>
>> Cubieboard2 does not really use the watchdog in U-Boot and especially
>> not very early (SPL). So no help here. But I figured out a potential
>> problem that might explain you system hang. Could you please give the
>> attached patch a try and let me know, if this changes the situation
>> a bit?
>>
>> Thanks,
>> Stefan
> 
>>  From 3788aadff5d697e3e150a9e520915007f7a26def Mon Sep 17 00:00:00 2001
>> From: Stefan Roese <sr at denx.de>
>> Date: Fri, 16 Sep 2022 21:08:51 +0200
>> Subject: [PATCH] cyclic: Only call cyclic_run() from schedule() when it's
>>   ready
>>
>> schedule() might get called very early in the boot process (SPL etc),
>> when the cyclic IF is not initialized. Let's make sure, that we only
>> call into cyclic_run() when it's ready.
>>
>> Signed-off-by: Stefan Roese <sr at denx.de>
>> ---
>>   common/cyclic.c | 7 ++++++-
>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/cyclic.c b/common/cyclic.c
>> index 594f9cd92592..9cdbed4ecc92 100644
>> --- a/common/cyclic.c
>> +++ b/common/cyclic.c
>> @@ -104,7 +104,12 @@ void schedule(void)
>>   	if (IS_ENABLED(CONFIG_HW_WATCHDOG))
>>   		hw_watchdog_reset();
>>   
>> -	cyclic_run();
>> +	/*
>> +	 * schedule() might get called very early before the cyclic IF is
>> +	 * ready. Make sure to only call cyclic_run() when it's initalized.
>> +	 */
>> +	if (gd->cyclic->cyclic_ready)
>> +		cyclic_run();
>>   }
>>   
>>   int cyclic_uninit(void)
> 
> No change.

Thanks for testing. I do have one last experiment for tonight. Please
give the attached v2 a try.

Thanks,
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-cyclic-Only-call-cyclic_run-from-schedule-when-it.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220916/99694dc8/attachment.bin>


More information about the U-Boot mailing list