[U-Boot] [PATCH] Allow the "reset" command to be omitted with CONFIG_CMD_RESET

Kyle Moffett Kyle.D.Moffett at boeing.com
Fri Dec 16 04:32:41 CET 2011


This new #define is set in config_cmd_defaults.h (which is automatically
included on every board by "mkconfig"), but this allows boards to elect
to omit the "reset" command if necessary with "#undef CONFIG_CMD_RESET".

Signed-off-by: Kyle Moffett <Kyle.D.Moffett at boeing.com>
Cc: Wolfgang Denk <wd at denx.de>
Cc: Mike Frysinger <vapier at gentoo.org>
---
 README                        |    1 +
 common/cmd_boot.c             |    2 ++
 include/config_cmd_defaults.h |    1 +
 3 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/README b/README
index ff72e47..90989db 100644
--- a/README
+++ b/README
@@ -793,6 +793,7 @@ The following options need to be configured:
 					  host
 		CONFIG_CMD_PORTIO	* Port I/O
 		CONFIG_CMD_REGINFO	* Register dump
+		CONFIG_CMD_RESET	  Reset the CPU
 		CONFIG_CMD_RUN		  run command in env variable
 		CONFIG_CMD_SAVES	* save S record dump
 		CONFIG_CMD_SCSI		* SCSI Support
diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index 0afd939..f5779e9 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -71,8 +71,10 @@ U_BOOT_CMD(
 
 #endif
 
+#ifdef CONFIG_CMD_RESET
 U_BOOT_CMD(
 	reset, 1, 0,	do_reset,
 	"Perform RESET of the CPU",
 	""
 );
+#endif
diff --git a/include/config_cmd_defaults.h b/include/config_cmd_defaults.h
index a55b268..b65a945 100644
--- a/include/config_cmd_defaults.h
+++ b/include/config_cmd_defaults.h
@@ -14,5 +14,6 @@
 #define CONFIG_CMD_EXPORTENV 1
 #define CONFIG_CMD_GO 1
 #define CONFIG_CMD_IMPORTENV 1
+#define CONFIG_CMD_RESET 1
 
 #endif
-- 
1.7.7.3



More information about the U-Boot mailing list