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

Kyle Moffett Kyle.D.Moffett at boeing.com
Thu Oct 20 21:05:50 CEST 2011


This new #define is set by default in config_cmd_defaults.h, and
config_cmd_all.h, but this allows boards to conditionally omit the
"reset" command if necessary.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett at boeing.com>
---
 README                        |    1 +
 common/cmd_boot.c             |    2 ++
 include/config_cmd_all.h      |    1 +
 include/config_cmd_defaults.h |    1 +
 4 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/README b/README
index 7e032a9..98c6192 100644
--- a/README
+++ b/README
@@ -772,6 +772,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_all.h b/include/config_cmd_all.h
index 9716f9c..b972cfa 100644
--- a/include/config_cmd_all.h
+++ b/include/config_cmd_all.h
@@ -71,6 +71,7 @@
 #define CONFIG_CMD_REGINFO	/* Register dump		*/
 #define CONFIG_CMD_REISER	/* Reiserfs support		*/
 #define CONFIG_CMD_RARP		/* rarpboot support		*/
+#define CONFIG_CMD_RESET	/* reset the CPU		*/
 #define CONFIG_CMD_RUN		/* run command in env variable	*/
 #define CONFIG_CMD_SAVEENV	/* saveenv			*/
 #define CONFIG_CMD_SAVES	/* save S record dump		*/
diff --git a/include/config_cmd_defaults.h b/include/config_cmd_defaults.h
index a55b268..9877aac 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.2.5



More information about the U-Boot mailing list