Re: [PATCH v2 2/2] watchdog: Add new arm_smd_wdt watchdog driver

From: Julius Werner
Date: Fri Apr 03 2020 - 18:59:43 EST


> + wdd->info = &smcwd_info;
> + /* get_timeleft is optional */
> + if (smcwd_call(SMCWD_GET_TIMELEFT, 0, NULL))

How is this supposed to work? A firmware that implements this call
would return the time left here which may not be 0 (maybe the watchdog
was already primed by the bootloader or whatever), so smcwd_call()
would interpret it as an error.

I think the cleanest solution would be to stick to the same return
codes in a0 and use a1 to report the time left when a0 is
PSCI_SUCCESS. This is more consistent with SMCWD_INIT too.