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');
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');
#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
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
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);
*/
__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
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 */
+++ /dev/null
-/*
- * (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;
-}
}
#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 */ ;
#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? */