This source file includes following definitions.
- machine_shutdown
- machine_halt
- machine_power_off
- machine_restart
1
2
3
4
5
6
7
8
9
10 #include <linux/init.h>
11 #include <linux/delay.h>
12 #include <linux/of_platform.h>
13 #include <linux/reboot.h>
14
15 void machine_shutdown(void)
16 {
17 pr_notice("Machine shutdown...\n");
18 while (1)
19 ;
20 }
21
22 void machine_halt(void)
23 {
24 pr_notice("Machine halt...\n");
25 while (1)
26 ;
27 }
28
29 void machine_power_off(void)
30 {
31 pr_notice("Machine power off...\n");
32 while (1)
33 ;
34 }
35
36 void machine_restart(char *cmd)
37 {
38 do_kernel_restart(cmd);
39
40 mdelay(1000);
41 pr_emerg("Reboot failed -- System halted\n");
42 while (1);
43 }