summaryrefslogtreecommitdiff
path: root/include/command.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-06-05 13:43:02 +0000
committerWolfgang Denk <wd@denx.de>2011-07-25 22:18:26 +0200
commit67d668bf926ae50a1196a8561ae5075fd69a8eb2 (patch)
treea5f7e905a55b5f32718a1d1ac7616e9eb995e9be /include/command.h
parent51f924e5ce4f69659ef385739f4604054d9b5bb7 (diff)
downloadu-boot-imx-67d668bf926ae50a1196a8561ae5075fd69a8eb2.zip
u-boot-imx-67d668bf926ae50a1196a8561ae5075fd69a8eb2.tar.gz
u-boot-imx-67d668bf926ae50a1196a8561ae5075fd69a8eb2.tar.bz2
autostart: unify duplicated logic into the bootm code
Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include/command.h')
-rw-r--r--include/command.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/command.h b/include/command.h
index 8310fe5..37e118c 100644
--- a/include/command.h
+++ b/include/command.h
@@ -98,7 +98,15 @@ extern int cmd_get_data_size(char* arg, int default_size);
#ifdef CONFIG_CMD_BOOTD
extern int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#endif
+#ifdef CONFIG_CMD_BOOTM
extern int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd);
+#else
+static inline int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
+{
+ return 0;
+}
+#endif
extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#endif /* __ASSEMBLY__ */