From 4e42e29fd6aec3aa6b85c41fb944e2908a457074 Mon Sep 17 00:00:00 2001 From: Michael van Slingerland Date: Wed, 13 Jan 2016 19:31:17 +0100 Subject: 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 [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede --- common/cmd_boot.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common/cmd_boot.c') 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 -- cgit v1.2.3