summaryrefslogtreecommitdiffstats
path: root/include/restart.h
blob: 2d15c7598acc77166ede353264ec125184078db7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __INCLUDE_RESTART_H
#define __INCLUDE_RESTART_H

void restart_handlers_print(void);
void __noreturn restart_machine(void);
struct restart_handler *restart_handler_get_by_name(const char *name);

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(const char *name,
				void (*restart_fn)(struct restart_handler *));

#define RESTART_DEFAULT_PRIORITY 100

unsigned int of_get_restart_priority(struct device_node *node);

#endif /* __INCLUDE_RESTART_H */