diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 1 | ||||
-rw-r--r-- | include/restart.h | 21 |
2 files changed, 21 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h index 6b9dd4d799..553a7f4f44 100644 --- a/include/common.h +++ b/include/common.h @@ -67,7 +67,6 @@ int readline (const char *prompt, char *buf, int len); long get_ram_size (volatile long *, long); /* $(CPU)/cpu.c */ -void __noreturn reset_cpu(unsigned long addr); void __noreturn poweroff(void); /* lib_$(ARCH)/time.c */ diff --git a/include/restart.h b/include/restart.h new file mode 100644 index 0000000000..79b57c8e11 --- /dev/null +++ b/include/restart.h @@ -0,0 +1,21 @@ +#ifndef __INCLUDE_RESTART_H +#define __INCLUDE_RESTART_H + +void __noreturn restart_machine(void); + +struct restart_handler { + void (*restart)(struct restart_handler *); + int priority; + const char *name; + struct list_head list; +}; + +int restart_handler_register(struct restart_handler *); +int restart_handler_register_fn(void (*restart_fn)(struct restart_handler *)); + +#define RESTART_DEFAULT_PRIORITY 100 +#define RESTART_DEFAULT_NAME "default" + +unsigned int of_get_restart_priority(struct device_node *node); + +#endif /* __INCLUDE_RESTART_H */ |