void kgdb_serial_init(void) { int i = -1; if (strcmp(default_serial_console()->ctlr, "SMC") == 0) { #if defined(CONFIG_8xx_CONS_SMC1) i = 1; #elif defined(CONFIG_8xx_CONS_SMC2) i = 2; #endif } else if (strcmp(default_serial_console()->ctlr, "SMC") == 0) { #if defined(CONFIG_8xx_CONS_SCC1) i = 1; #elif defined(CONFIG_8xx_CONS_SCC2) i = 2; #elif defined(CONFIG_8xx_CONS_SCC3) i = 3; #elif defined(CONFIG_8xx_CONS_SCC4) i = 4; #endif } if (i >= 0) { serial_printf("[on %s%d] ", default_serial_console()->ctlr, i); } }
void serial_initialize (void) { #if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2) serial_register (&serial_smc_device); #endif #if defined(CONFIG_8xx_CONS_SCC1) || defined(CONFIG_8xx_CONS_SCC2) \ || defined(CONFIG_8xx_CONS_SCC3) || defined(CONFIG_8xx_CONS_SCC4) serial_register (&serial_scc_device); #endif #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || defined(CONFIG_440) \ || defined(CONFIG_405EP) || defined(CONFIG_405EZ) || defined(CONFIG_MPC5xxx) serial_register(&serial0_device); serial_register(&serial1_device); #endif #if defined(CFG_NS16550_SERIAL) #if defined(CFG_NS16550_COM1) serial_register(&eserial1_device); #endif #if defined(CFG_NS16550_COM2) serial_register(&eserial2_device); #endif #if defined(CFG_NS16550_COM3) serial_register(&eserial3_device); #endif #if defined(CFG_NS16550_COM4) serial_register(&eserial4_device); #endif #endif /* CFG_NS16550_SERIAL */ serial_assign (default_serial_console ()->name); }
int serial_tstc (void) { if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); return dev->tstc (); } return serial_current->tstc (); }
void serial_puts (const char *s) { if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); dev->puts (s); return; } serial_current->puts (s); }
void serial_setbrg (void) { if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); dev->setbrg (); return; } serial_current->setbrg (); }
/** * serial_initialize() - Register all compiled-in serial port drivers * * This function registers all serial port drivers that are compiled * into the U-Boot binary with the serial core, thus making them * available to U-Boot to use. Lastly, this function assigns a default * serial port to the serial core. That serial port is then used as a * default output. */ void serial_initialize(void) { mpc8xx_serial_initialize(); ns16550_serial_initialize(); pxa_serial_initialize(); s3c24xx_serial_initialize(); s5p_serial_initialize(); mpc512x_serial_initialize(); bfin_serial_initialize(); bfin_jtag_initialize(); uartlite_serial_initialize(); zynq_serial_initalize(); au1x00_serial_initialize(); asc_serial_initialize(); jz_serial_initialize(); mpc5xx_serial_initialize(); mpc8260_scc_serial_initialize(); mpc8260_smc_serial_initialize(); mpc85xx_serial_initialize(); iop480_serial_initialize(); leon2_serial_initialize(); leon3_serial_initialize(); marvell_serial_initialize(); amirix_serial_initialize(); bmw_serial_initialize(); cogent_serial_initialize(); cpci750_serial_initialize(); evb64260_serial_initialize(); ml2_serial_initialize(); sconsole_serial_initialize(); p3mx_serial_initialize(); altera_jtag_serial_initialize(); altera_serial_initialize(); atmel_serial_initialize(); lpc32xx_serial_initialize(); mcf_serial_initialize(); oc_serial_initialize(); sandbox_serial_initialize(); clps7111_serial_initialize(); imx_serial_initialize(); ixp_serial_initialize(); ks8695_serial_initialize(); lh7a40x_serial_initialize(); max3100_serial_initialize(); mxc_serial_initialize(); pl01x_serial_initialize(); sa1100_serial_initialize(); sh_serial_initialize(); arm_dcc_initialize(); mxs_auart_initialize(); arc_serial_initialize(); serial_assign(default_serial_console()->name); }
int serial_getc (void) { DECLARE_GLOBAL_DATA_PTR; if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); return dev->getc (); } return serial_current->getc (); }
void serial_initialize (void) { #if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2) serial_register (&serial_smc_device); #endif #if defined(CONFIG_8xx_CONS_SCC1) || defined(CONFIG_8xx_CONS_SCC2) \ || defined(CONFIG_8xx_CONS_SCC3) || defined(CONFIG_8xx_CONS_SCC4) serial_register (&serial_scc_device); #endif #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || defined(CONFIG_440) \ || defined(CONFIG_405EP) || defined(CONFIG_405EZ) || defined(CONFIG_405EX) \ || defined(CONFIG_MPC5xxx) serial_register(&serial0_device); serial_register(&serial1_device); #endif #if defined(CONFIG_SYS_NS16550_SERIAL) #if defined(CONFIG_SYS_NS16550_COM1) serial_register(&eserial1_device); #endif #if defined(CONFIG_SYS_NS16550_COM2) serial_register(&eserial2_device); #endif #if defined(CONFIG_SYS_NS16550_COM3) serial_register(&eserial3_device); #endif #if defined(CONFIG_SYS_NS16550_COM4) serial_register(&eserial4_device); #endif #endif /* CONFIG_SYS_NS16550_SERIAL */ #if defined (CONFIG_FFUART) serial_register(&serial_ffuart_device); #endif #if defined (CONFIG_BTUART) serial_register(&serial_btuart_device); #endif #if defined (CONFIG_STUART) serial_register(&serial_stuart_device); #endif #if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) serial_register(&s3c24xx_serial0_device); serial_register(&s3c24xx_serial1_device); serial_register(&s3c24xx_serial2_device); #endif #if defined(CONFIG_S5PC1XX) serial_register(&s5pc1xx_serial0_device); serial_register(&s5pc1xx_serial1_device); serial_register(&s5pc1xx_serial2_device); serial_register(&s5pc1xx_serial3_device); #endif serial_assign (default_serial_console ()->name); }
void serial_putc (const char c) { DECLARE_GLOBAL_DATA_PTR; if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { struct serial_device *dev = default_serial_console (); dev->putc (c); return; } serial_current->putc (c); }
/** * get_current() - Return pointer to currently selected serial port * * This function returns a pointer to currently selected serial port. * The currently selected serial port is altered by serial_assign() * function. * * In case this function is called before relocation or before any serial * port is configured, this function calls default_serial_console() to * determine the serial port. Otherwise, the configured serial port is * returned. * * Returns pointer to the currently selected serial port on success, * NULL on error. */ static struct serial_device *get_current(void) { struct serial_device *dev; if (!(gd->flags & GD_FLG_RELOC)) dev = default_serial_console(); else if (!serial_current) dev = default_serial_console(); else dev = serial_current; /* We must have a console device */ if (!dev) { #ifdef CONFIG_SPL_BUILD puts("Cannot find console\n"); hang(); #else panic("Cannot find console\n"); #endif } return dev; }
static struct serial_device *get_current(void) { struct serial_device *dev; if (!(gd->flags & GD_FLG_RELOC) || !serial_current) { dev = default_serial_console(); /* We must have a console device */ if (!dev) panic("Cannot find console"); } else dev = serial_current; return dev; }
/** * serial_initialize() - Register all compiled-in serial port drivers * * This function registers all serial port drivers that are compiled * into the U-Boot binary with the serial core, thus making them * available to U-Boot to use. Lastly, this function assigns a default * serial port to the serial core. That serial port is then used as a * default output. */ void serial_initialize(void) { atmel_serial_initialize(); au1x00_serial_initialize(); mcf_serial_initialize(); mpc85xx_serial_initialize(); mpc8xx_serial_initialize(); mxc_serial_initialize(); ns16550_serial_initialize(); pl01x_serial_initialize(); pxa_serial_initialize(); sh_serial_initialize(); serial_assign(default_serial_console()->name); }
void serial_initialize (void) { #if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2) serial_register (&serial_smc_device); #endif #if defined(CONFIG_8xx_CONS_SCC1) || defined(CONFIG_8xx_CONS_SCC2) \ || defined(CONFIG_8xx_CONS_SCC3) || defined(CONFIG_8xx_CONS_SCC4) serial_register (&serial_scc_device); #endif #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || defined(CONFIG_440) \ || defined(CONFIG_405EP) serial_register(&serial0_device); serial_register(&serial1_device); #endif serial_assign (default_serial_console ()->name); }
void serial_initialize (void) { #if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2) serial_register (&serial_smc_device); #endif #if defined(CONFIG_8xx_CONS_SCC1) || defined(CONFIG_8xx_CONS_SCC2) \ || defined(CONFIG_8xx_CONS_SCC3) || defined(CONFIG_8xx_CONS_SCC4) serial_register (&serial_scc_device); #endif #if defined(CONFIG_SYS_NS16550_SERIAL) #if defined(CONFIG_SYS_NS16550_COM1) serial_register(&eserial1_device); #endif #if defined(CONFIG_SYS_NS16550_COM2) serial_register(&eserial2_device); #endif #if defined(CONFIG_SYS_NS16550_COM3) serial_register(&eserial3_device); #endif #if defined(CONFIG_SYS_NS16550_COM4) serial_register(&eserial4_device); #endif #endif /* CONFIG_SYS_NS16550_SERIAL */ #if defined (CONFIG_FFUART) serial_register(&serial_ffuart_device); #endif #if defined (CONFIG_BTUART) serial_register(&serial_btuart_device); #endif #if defined (CONFIG_STUART) serial_register(&serial_stuart_device); #endif #if defined(CONFIG_S3C2410) serial_register(&s3c24xx_serial0_device); serial_register(&s3c24xx_serial1_device); serial_register(&s3c24xx_serial2_device); #endif #if defined(CONFIG_S5P) serial_register(&s5p_serial0_device); serial_register(&s5p_serial1_device); serial_register(&s5p_serial2_device); serial_register(&s5p_serial3_device); #endif #if defined(CONFIG_MPC512X) #if defined(CONFIG_SYS_PSC1) serial_register(&serial1_device); #endif #if defined(CONFIG_SYS_PSC3) serial_register(&serial3_device); #endif #if defined(CONFIG_SYS_PSC4) serial_register(&serial4_device); #endif #if defined(CONFIG_SYS_PSC6) serial_register(&serial6_device); #endif #endif #if defined(CONFIG_SYS_BFIN_UART) serial_register_bfin_uart(); #endif #if defined(CONFIG_XILINX_UARTLITE) # ifdef XILINX_UARTLITE_BASEADDR serial_register(&uartlite_serial0_device); # endif /* XILINX_UARTLITE_BASEADDR */ # ifdef XILINX_UARTLITE_BASEADDR1 serial_register(&uartlite_serial1_device); # endif /* XILINX_UARTLITE_BASEADDR1 */ # ifdef XILINX_UARTLITE_BASEADDR2 serial_register(&uartlite_serial2_device); # endif /* XILINX_UARTLITE_BASEADDR2 */ # ifdef XILINX_UARTLITE_BASEADDR3 serial_register(&uartlite_serial3_device); # endif /* XILINX_UARTLITE_BASEADDR3 */ #endif /* CONFIG_XILINX_UARTLITE */ serial_assign (default_serial_console ()->name); }