watchdog: Automatically register device with sysreset
Add an option to automatically register watchdog devices with the wdt_reboot driver for use with sysreset. This allows sysreset to be a drop-in replacement for platform-specific watchdog reset code, without needing any device tree changes. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
committed by
Stefan Roese
parent
5544a01142
commit
a8f63d18bb
@@ -133,4 +133,14 @@ void sysreset_walk_halt(enum sysreset_t type);
|
||||
*/
|
||||
void reset_cpu(void);
|
||||
|
||||
/**
|
||||
* sysreset_register_wdt() - register a watchdog for use with sysreset
|
||||
*
|
||||
* This registers the given watchdog timer to be used to reset the system.
|
||||
*
|
||||
* @dev: WDT device
|
||||
* @return: 0 if OK, -errno if error
|
||||
*/
|
||||
int sysreset_register_wdt(struct udevice *dev);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user