]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Remove unused CONFIG_MODEM_SUPPORT option and associated dead code.
authorDavid Müller (ELSOFT AG) <d.mueller@elsoft.ch>
Sat, 6 Feb 2016 06:57:25 +0000 (07:57 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 8 Feb 2016 15:22:44 +0000 (10:22 -0500)
Signed-off-by: David Müller <d.mueller@elsoft.ch>
arch/powerpc/cpu/mpc8xx/serial.c
common/Makefile
common/board_f.c
common/main.c
common/modem.c [deleted file]
drivers/serial/serial_s3c24x0.c
include/asm-generic/global_data.h

index af65c969c2f51c3d9a72629d139bc1e2fbfeeb54..94c785f611c6ed93a684c94d7325f5a003bf70a3 100644 (file)
@@ -268,11 +268,6 @@ smc_putc(const char c)
        volatile cpm8xx_t       *cpmp = &(im->im_cpm);
        volatile serialbuffer_t *rtx;
 
-#ifdef CONFIG_MODEM_SUPPORT
-       if (gd->be_quiet)
-               return;
-#endif
-
        if (c == '\n')
                smc_putc ('\r');
 
@@ -527,11 +522,6 @@ scc_putc(const char c)
        volatile immap_t        *im = (immap_t *)CONFIG_SYS_IMMR;
        volatile cpm8xx_t       *cpmp = &(im->im_cpm);
 
-#ifdef CONFIG_MODEM_SUPPORT
-       if (gd->be_quiet)
-               return;
-#endif
-
        if (c == '\n')
                scc_putc ('\r');
 
@@ -637,18 +627,6 @@ void mpc8xx_serial_initialize(void)
 #endif
 }
 
-#ifdef CONFIG_MODEM_SUPPORT
-void disable_putc(void)
-{
-       gd->be_quiet = 1;
-}
-
-void enable_putc(void)
-{
-       gd->be_quiet = 0;
-}
-#endif
-
 #if defined(CONFIG_CMD_KGDB)
 
 void
index 59984111e18b4b5bc49b5cd044f9858fd5a02a02..117178ad9be9e40b1368b6101dc8aca71cf0acb3 100644 (file)
@@ -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
index c470b5921ad6b5a6453268a8f36c0b84895039f4..a960144b02f362434fe5985f22e6b56da16e5a91 100644 (file)
@@ -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);
index 5a0318123bc77412156dd48b3994f1e14fffe3f0..1a2ef39cca9c1b9ec83c15f3a25e805fd11c673c 100644 (file)
@@ -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 (file)
index 96b1064..0000000
+++ /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;
-}
index 7afc5044a8c70f77607a5e1d351b83b2681b012b..4cc94d9aa9df4d908b4e34ed03dc539aee2d9eb3 100644 (file)
@@ -164,30 +164,12 @@ int hwflow_onoff(int on)
 }
 #endif
 
-#ifdef CONFIG_MODEM_SUPPORT
-static int be_quiet = 0;
-void disable_putc(void)
-{
-       be_quiet = 1;
-}
-
-void enable_putc(void)
-{
-       be_quiet = 0;
-}
-#endif
-
-
 /*
  * Output a single byte to the serial port.
  */
 static void _serial_putc(const char c, const int dev_index)
 {
        struct s3c24x0_uart *uart = s3c24x0_get_base_uart(dev_index);
-#ifdef CONFIG_MODEM_SUPPORT
-       if (be_quiet)
-               return;
-#endif
 
        while (!(readl(&uart->utrstat) & 0x2))
                /* wait for room in the tx FIFO */ ;
index a587d3c2030a27831473ef1ef4cb8352957e6172..f2810a1bd75f579a0f8daddfc8918264ef467223 100644 (file)
@@ -47,10 +47,6 @@ typedef struct global_data {
        unsigned long have_console;     /* serial_init() was called */
 #ifdef CONFIG_PRE_CONSOLE_BUFFER
        unsigned long precon_buf_idx;   /* Pre-Console buffer index */
-#endif
-#ifdef CONFIG_MODEM_SUPPORT
-       unsigned long do_mdm_init;
-       unsigned long be_quiet;
 #endif
        unsigned long env_addr; /* Address  of Environment struct */
        unsigned long env_valid;        /* Checksum of Environment valid? */