[PATCH] sandbox: watchdog: Avoid an error on startup

Stefan Roese sr at denx.de
Thu Oct 19 12:35:31 CEST 2023


On 8/11/23 09:10, Stefan Roese wrote:
> On 8/10/23 17:53, Simon Glass wrote:
>> For some time now running sandbox with -T produces an error:
>>
>>     Core:  270 devices, 95 uclasses, devicetree: board
>>     WDT:   Not starting wdt-gpio-toggle
>>     wdt_gpio wdt-gpio-level: Request for wdt gpio failed: -16
>>     WDT:   Not starting wdt at 0
>>     MMC:   mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
>>
>> Use an unallocated GPIO to avoid this.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> Fixes: 1fc45d6483d ("watchdog: add pulse support to gpio watchdog 
>> driver")
> 
> Reviewed-by: Stefan Roese <sr at denx.de>

Applied to u-boot-watchdog/master

Thanks,
Stefan


> Thanks,
> Stefan
> 
>> ---
>>
>>   arch/sandbox/dts/test.dts | 2 +-
>>   test/dm/wdt.c             | 4 ++--
>>   2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
>> index f351d5cb84b..14ec17a3fef 100644
>> --- a/arch/sandbox/dts/test.dts
>> +++ b/arch/sandbox/dts/test.dts
>> @@ -935,7 +935,7 @@
>>       };
>>       wdt-gpio-toggle {
>> -        gpios = <&gpio_a 7 0>;
>> +        gpios = <&gpio_a 8 0>;
>>           compatible = "linux,wdt-gpio";
>>           hw_margin_ms = <100>;
>>           hw_algo = "toggle";
>> diff --git a/test/dm/wdt.c b/test/dm/wdt.c
>> index 653d7b1c8b3..2bbebcdbf28 100644
>> --- a/test/dm/wdt.c
>> +++ b/test/dm/wdt.c
>> @@ -54,7 +54,7 @@ static int dm_test_wdt_gpio_toggle(struct 
>> unit_test_state *uts)
>>        */
>>       struct udevice *wdt, *gpio;
>>       const u64 timeout = 42;
>> -    const int offset = 7;
>> +    const int offset = 8;
>>       int val;
>>       ut_assertok(uclass_get_device_by_name(UCLASS_WDT,
>> @@ -115,7 +115,7 @@ static int dm_test_wdt_watchdog_reset(struct 
>> unit_test_state *uts)
>>       struct udevice *gpio_wdt, *sandbox_wdt;
>>       struct udevice *gpio;
>>       const u64 timeout = 42;
>> -    const int offset = 7;
>> +    const int offset = 8;
>>       uint reset_count;
>>       int val;
> 
> Viele Grüße,
> Stefan Roese
> 

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list