[PATCH 1/1] sysreset: watchdog: watchdog cannot power off

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Thu Nov 4 12:45:06 CET 2021


On 11/4/21 10:55, François Ozog wrote:
> Hi Heinrich,
> 
> On Thu, 4 Nov 2021 at 10:31, Heinrich Schuchardt 
> <heinrich.schuchardt at canonical.com 
> <mailto:heinrich.schuchardt at canonical.com>> wrote:
> 
>     The watchdog system reset driver can reboot the device but it cannot
>     power
>     it off. If power off is requested, the driver should not reset the
>     system
>     but leave powering off to one of the other system reset drivers.
> 
>     As power cycling is typically not a feature of a watchdog driver the
>     reset
>     types SYSRESET_POWER and SYSRESET_POWER_OFF shall both be excluded.
> 
> A candid question here. I know that IPMI can powercycle a platform.
> How would we handle that should there be a way to make the power cycle 
> happen?
> (for instance we could define a PSCI extension of SYSTEM_RESET2 to have 
> a power cycle effect)

Your comment seems not to relate to the validity of the current patch.

For PSCI we have a separate sysreset driver 
drivers/sysreset/sysreset_psci.c. That driver currently does not support 
SYSRESET_POWER.

Once such an extension is offered by PSCI you should define a 
device-tree node property for it in Linux' 
Documentation/devicetree/bindings/arm/psci.yaml. Next implement a probe 
function in the driver code to detect that property. In 
psci_sysreset_request(), if type=SYSRESET_POWER, call the appropriate 
PSCI method if the extension is enabled or return -ENOSYS if the 
extension is not available.

Currently in U-Boot I see no code invoking a reset with SYSRESET_POWER. 
You would have to change function do_reset() in 
drivers/sysreset/sysreset-uclass.c to accept a new argument to select 
this reset type.

Best regards

Heinrich


More information about the U-Boot mailing list