cmd_boot: Add a poweroff command
v2 cover cmd_boot: Add a poweroff command
Hi Tom,
This patch is a prereq of the board poweroff patches I've pending for sunxi, since it is a core patch I would prefer for you to merge it directly, rather then "sneak it in" in a sunxi pull-req.
This is a resend of v2 of the patch which contains the changes you requested.
Regards,
Hans
PATCH RESEND v2 1/1 cmd_boot: Add a poweroff command
From: Michael van Slingerland <[email protected]>
Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF".
---
Changes in v2:
-Improve poweroff help text
-Remove unnecessary #ifdef from command.h
--- common/Kconfig | 3 +++ common/cmd_boot.c | 8 ++++++++ include/command.h | 1 + 3 files changed, 12 insertions(+)
common/Kconfig +3 -0
@@ -184,6 +184,9 @@ config CMD_XIMG help Extract a part of a multi-image. +config CMD_POWEROFF + bool + endmenu menu "Environment commands"
common/cmd_boot.c +8 -0
@@ -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
include/command.h +1 -0
@@ -110,6 +110,7 @@ extern int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, char *const argv[]);extern int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]); +extern int do_poweroff (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]);/* * Error codes that commands return to cmd_process(). We use the standard 0
Signature · 1 line
2.5.0
PATCH RESEND v2 1/1 cmd_boot: Add a poweroff command
Quoted 8 lines · Hans de Goede
From: Michael van Slingerland <[email protected]>
Add a 'poweroff' command to boot commands, this only gets enabled if the board
Kconfigdoes a "selectCMD_POWEROFF".Signed-off-by Michael van Slingerland <[email protected]>[hdegoede at redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig]Signed-off-by Hans de Goede <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160114/89decc1f/attachment.sig>