summaryrefslogtreecommitdiff
path: root/common/cmd_boot.c
diff options
context:
space:
mode:
authorMichael van Slingerland <[email protected]>2016-01-13 19:31:17 +0100
committerTom Rini <[email protected]>2016-01-13 21:05:25 -0500
commit4e42e29fd6aec3aa6b85c41fb944e2908a457074 (patch)
tree35b5bc6eb9129b001d47f674802cf01844fb8d36 /common/cmd_boot.c
parent79206c04a9269f87fd943713db70fbc53ec05ed3 (diff)
cmd_boot: Add a poweroff command
Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <[email protected]> [[email protected]: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'common/cmd_boot.c')
-rw-r--r--common/cmd_boot.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index 8f2e0701b54..72f2cf362d4 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -61,3 +61,11 @@ U_BOOT_CMD(
"Perform RESET of the CPU",
""
);
+
+#ifdef CONFIG_CMD_POWEROFF
+U_BOOT_CMD(
+ poweroff, 1, 0, do_poweroff,
+ "Perform POWEROFF of the device",
+ ""
+);
+#endif