aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass2019-12-28 10:44:39 -0700
committerTom Rini2020-01-17 13:26:48 -0500
commit6b8d3ceaf59a6c4a2d3930aa8fa0c33e15093498 (patch)
treeebe9280c23bc2036eee040906ee7aac5717c7e99
parent011b5725a89c7fc658109d1dce2ad0d7bcd1db02 (diff)
common: Move main_loop() to init.h
Move this function out of common.h and into a better place. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
-rw-r--r--common/board_r.c1
-rw-r--r--common/main.c1
-rw-r--r--include/common.h3
-rw-r--r--include/init.h7
4 files changed, 9 insertions, 3 deletions
diff --git a/common/board_r.c b/common/board_r.c
index e711de64b5b..e7c25942965 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -26,6 +26,7 @@
#include <env_internal.h>
#include <fdtdec.h>
#include <ide.h>
+#include <init.h>
#include <initcall.h>
#if defined(CONFIG_CMD_KGDB)
#include <kgdb.h>
diff --git a/common/main.c b/common/main.c
index a94df7ae042..ec8994ad457 100644
--- a/common/main.c
+++ b/common/main.c
@@ -12,6 +12,7 @@
#include <command.h>
#include <console.h>
#include <env.h>
+#include <init.h>
#include <version.h>
/*
diff --git a/include/common.h b/include/common.h
index 8ac5fca9eeb..c35af99f02a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -63,9 +63,6 @@ void hang (void) __attribute__ ((noreturn));
#include <display_options.h>
-/* common/main.c */
-void main_loop (void);
-
int checkflash(void);
int checkdram(void);
extern u8 __dtb_dt_begin[]; /* embedded device tree blob */
diff --git a/include/init.h b/include/init.h
index 970a39a6a08..a5a2c79a90d 100644
--- a/include/init.h
+++ b/include/init.h
@@ -221,6 +221,13 @@ void pci_init_board(void);
void trap_init(unsigned long reloc_addr);
+/**
+ * main_loop() - Enter the main loop of U-Boot
+ *
+ * This normally runs the command line.
+ */
+void main_loop(void);
+
#endif /* __ASSEMBLY__ */
/* Put only stuff here that the assembler can digest */