summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Müller (ELSOFT AG) <d.mueller@elsoft.ch>2016-02-06 07:57:25 +0100
committerTom Rini <trini@konsulko.com>2016-02-08 10:22:44 -0500
commit928f6054555618c9700bc5ebc16b9a661fd3ead7 (patch)
treeabe98f6afbeebe8fd52b663d47617fb1f61e49ef /common
parent89ca1000caefcfaeb06fdb9fcc8fdc09c318d26a (diff)
downloadblackbird-obmc-uboot-928f6054555618c9700bc5ebc16b9a661fd3ead7.tar.gz
blackbird-obmc-uboot-928f6054555618c9700bc5ebc16b9a661fd3ead7.zip
Remove unused CONFIG_MODEM_SUPPORT option and associated dead code.
Signed-off-by: David Müller <d.mueller@elsoft.ch>
Diffstat (limited to 'common')
-rw-r--r--common/Makefile1
-rw-r--r--common/board_f.c3
-rw-r--r--common/main.c14
-rw-r--r--common/modem.c100
4 files changed, 0 insertions, 118 deletions
diff --git a/common/Makefile b/common/Makefile
index 59984111e1..117178ad9b 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -82,7 +82,6 @@ obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o
obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o
obj-$(CONFIG_LYNXKDI) += lynxkdi.o
obj-$(CONFIG_MENU) += menu.o
-obj-$(CONFIG_MODEM_SUPPORT) += modem.o
obj-$(CONFIG_UPDATE_TFTP) += update.o
obj-$(CONFIG_DFU_TFTP) += update.o
obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
diff --git a/common/board_f.c b/common/board_f.c
index c470b5921a..a960144b02 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -162,9 +162,6 @@ static int display_text_info(void)
text_base, bss_start, bss_end);
#endif
-#ifdef CONFIG_MODEM_SUPPORT
- debug("Modem Support enabled\n");
-#endif
#ifdef CONFIG_USE_IRQ
debug("IRQ Stack: %08lx\n", IRQ_STACK_START);
debug("FIQ Stack: %08lx\n", FIQ_STACK_START);
diff --git a/common/main.c b/common/main.c
index 5a0318123b..1a2ef39cca 100644
--- a/common/main.c
+++ b/common/main.c
@@ -20,19 +20,6 @@ DECLARE_GLOBAL_DATA_PTR;
*/
__weak void show_boot_progress(int val) {}
-static void modem_init(void)
-{
-#ifdef CONFIG_MODEM_SUPPORT
- debug("DEBUG: main_loop: gd->do_mdm_init=%lu\n", gd->do_mdm_init);
- if (gd->do_mdm_init) {
- char *str = getenv("mdm_cmd");
-
- setenv("preboot", str); /* set or delete definition */
- mdm_init(); /* wait for modem connection */
- }
-#endif /* CONFIG_MODEM_SUPPORT */
-}
-
static void run_preboot_environment_command(void)
{
#ifdef CONFIG_PREBOOT
@@ -66,7 +53,6 @@ void main_loop(void)
puts("upgraded by the late 2014 may break or be removed.\n");
#endif
- modem_init();
#ifdef CONFIG_VERSION_VARIABLE
setenv("ver", version_string); /* set version variable */
#endif /* CONFIG_VERSION_VARIABLE */
diff --git a/common/modem.c b/common/modem.c
deleted file mode 100644
index 96b10648d8..0000000000
--- a/common/modem.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * (C) Copyright 2002-2009
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <common.h>
-
-/* 'inline' - We have to do it fast */
-static inline void mdm_readline(char *buf, int bufsiz)
-{
- char c;
- char *p;
- int n;
-
- n = 0;
- p = buf;
- for(;;) {
- c = serial_getc();
-
- debug("(%c)", c);
-
- switch(c) {
- case '\r':
- break;
- case '\n':
- *p = '\0';
- return;
-
- default:
- if(n++ > bufsiz) {
- *p = '\0';
- return; /* sanity check */
- }
- *p = c;
- p++;
- break;
- }
- }
-}
-
-int mdm_init (void)
-{
- char env_str[16];
- char *init_str;
- int i;
- extern void enable_putc(void);
- extern int hwflow_onoff(int);
-
- enable_putc(); /* enable serial_putc() */
-
-#ifdef CONFIG_HWFLOW
- init_str = getenv("mdm_flow_control");
- if (init_str && (strcmp(init_str, "rts/cts") == 0))
- hwflow_onoff (1);
- else
- hwflow_onoff(-1);
-#endif
-
- for (i = 1;;i++) {
- sprintf(env_str, "mdm_init%d", i);
- if ((init_str = getenv(env_str)) != NULL) {
- serial_puts(init_str);
- serial_puts("\n");
- for(;;) {
- mdm_readline(console_buffer, CONFIG_SYS_CBSIZE);
- debug("ini%d: [%s]", i, console_buffer);
-
- if ((strcmp(console_buffer, "OK") == 0) ||
- (strcmp(console_buffer, "ERROR") == 0)) {
- debug("ini%d: cmd done", i);
- break;
- } else /* in case we are originating call ... */
- if (strncmp(console_buffer, "CONNECT", 7) == 0) {
- debug("ini%d: connect", i);
- return 0;
- }
- }
- } else
- break; /* no init string - stop modem init */
-
- udelay(100000);
- }
-
- udelay(100000);
-
- /* final stage - wait for connect */
- for(;i > 1;) { /* if 'i' > 1 - wait for connection
- message from modem */
- mdm_readline(console_buffer, CONFIG_SYS_CBSIZE);
- debug("ini_f: [%s]", console_buffer);
- if (strncmp(console_buffer, "CONNECT", 7) == 0) {
- debug("ini_f: connected");
- return 0;
- }
- }
-
- return 0;
-}
OpenPOWER on IntegriCloud