summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/m68k/lib/board.c7
-rw-r--r--arch/powerpc/lib/board.c8
-rw-r--r--common/board_r.c14
-rw-r--r--common/main.c11
-rw-r--r--include/common.h1
5 files changed, 5 insertions, 36 deletions
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
index 318ca01ea7..6de920eb43 100644
--- a/arch/m68k/lib/board.c
+++ b/arch/m68k/lib/board.c
@@ -628,13 +628,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
}
#endif
-#ifdef CONFIG_MODEM_SUPPORT
- {
- extern int do_mdm_init;
- do_mdm_init = gd->do_mdm_init;
- }
-#endif
-
#ifdef CONFIG_WATCHDOG
/* disable watchdog if environment is set */
if ((s = getenv ("watchdog")) != NULL) {
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index 57b4a09b04..300ab12a3b 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -991,14 +991,6 @@ void board_init_r(gd_t *id, ulong dest_addr)
kbd_init();
#endif
-#ifdef CONFIG_MODEM_SUPPORT
- {
- extern int do_mdm_init;
-
- do_mdm_init = gd->do_mdm_init;
- }
-#endif
-
/* Initialization complete - start the monitor */
/* main_loop() can return to retry autoboot, if so just run it again. */
diff --git a/common/board_r.c b/common/board_r.c
index d1f0aa9b1a..602a239380 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -704,17 +704,6 @@ static int initr_kbd(void)
}
#endif
-#ifdef CONFIG_MODEM_SUPPORT
-static int initr_modem(void)
-{
- /* TODO: with new initcalls, move this into the driver */
- extern int do_mdm_init;
-
- do_mdm_init = gd->do_mdm_init;
- return 0;
-}
-#endif
-
static int run_main_loop(void)
{
#ifdef CONFIG_SANDBOX
@@ -929,9 +918,6 @@ init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_PS2KBD
initr_kbd,
#endif
-#ifdef CONFIG_MODEM_SUPPORT
- initr_modem,
-#endif
run_main_loop,
};
diff --git a/common/main.c b/common/main.c
index c4ed846c3b..e3e9f84871 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)
diff --git a/include/common.h b/include/common.h
index 91745cf790..3473ee50ef 100644
--- a/include/common.h
+++ b/include/common.h
@@ -299,6 +299,7 @@ extern ulong monitor_flash_len;
int mac_read_from_eeprom(void);
extern u8 __dtb_dt_begin[]; /* embedded device tree blob */
int set_cpu_clk_info(void);
+int mdm_init(void);
#if defined(CONFIG_DISPLAY_CPUINFO)
int print_cpuinfo(void);
#else