Commit 928f6054 authored by David Müller (ELSOFT AG)'s avatar David Müller (ELSOFT AG) Committed by Tom Rini

Remove unused CONFIG_MODEM_SUPPORT option and associated dead code.

Signed-off-by: default avatarDavid Müller <d.mueller@elsoft.ch>
parent 89ca1000
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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 */
......
/*
* (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;
}
......@@ -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 */ ;
......
......@@ -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? */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment