summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-04-10 20:01:32 -0600
committerTom Rini <trini@ti.com>2014-05-29 17:49:33 -0400
commit9272a9b4f637347267329c7dc48712ea6c31feaa (patch)
treea6fd18846dc2376dc221bd3a903c36fc4c868177 /common/main.c
parentb26440f1fa243396000536028ea00e5e185b6b6a (diff)
downloadu-boot-imx-9272a9b4f637347267329c7dc48712ea6c31feaa.zip
u-boot-imx-9272a9b4f637347267329c7dc48712ea6c31feaa.tar.gz
u-boot-imx-9272a9b4f637347267329c7dc48712ea6c31feaa.tar.bz2
m68k: powerpc: Clean up do_mdm_init
This code seems unnecessarily complex. We really just need to check the global_data. Now that is it all in one place, and not arch-specific, this is pretty easy. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/common/main.c b/common/main.c
index c4ed846..e3e9f84 100644
--- a/common/main.c
+++ b/common/main.c
@@ -14,17 +14,14 @@
#include <malloc.h>
#include <version.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
void inline __show_boot_progress (int val) {}
void show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress")));
-#ifdef CONFIG_MODEM_SUPPORT
-int do_mdm_init = 0;
-extern void mdm_init(void); /* defined in board.c */
-#endif
-
void main_loop(void)
{
#ifdef CONFIG_PREBOOT
@@ -40,8 +37,8 @@ void main_loop(void)
#endif
#ifdef CONFIG_MODEM_SUPPORT
- debug("DEBUG: main_loop: do_mdm_init=%d\n", do_mdm_init);
- if (do_mdm_init) {
+ debug("DEBUG: main_loop: gd->do_mdm_init=%lu\n", gd->do_mdm_init);
+ if (gd->do_mdm_init) {
char *str = strdup(getenv("mdm_cmd"));
setenv("preboot", str); /* set or delete definition */
if (str != NULL)