summaryrefslogtreecommitdiffstats
path: root/common/console.c
Commit message (Collapse)AuthorAgeFilesLines
* env: Add a silent env handlerJoe Hershberger2012-12-131-0/+23
| | | | | | | | The silent variable now updates the global data flag anytime it is changed as well as after the env relocation (in case its value is different from the default env in such cases as NAND env) Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* env: Add a console env handlerJoe Hershberger2012-12-131-0/+44
| | | | | | Remove the hard-coded console handler and use a callback instead Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* env: Refactor do_apply to a flagJoe Hershberger2012-12-131-4/+4
| | | | | | | | | | Use a flag in hsearch_r for insert mode passed from import to allow the behavior be different based on use. Now that "do_check" is called for all imports, ensure console init is complete before updating the console on relocation import Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* console: Enable function to display console infoSimon Glass2012-12-111-2/+4
| | | | | | | | | | | The CONFIG_SYS_CONSOLE_INFO_QUIET option should suppress the console information, but allow boards to display it later if required. Adjust the code to support this. This is used to avoid printing the information while the LCD display is not ready, since it only becomes ready when stdio init is complete. Signed-off-by: Simon Glass <sjg@chromium.org>
* Revert "Add board_pre_console_putc to deal with early console output"Simon Glass2012-03-231-9/+1
| | | | | | | | | | | This reverts commit 295d3942b806552503243f5cfb36aec6f1b5a9bf. It turns that this really doesn't work very nicely. Instead we should have a pre-console panic function so that we know that further execution is impossible and we don't need to worry about trampling on UARTs, etc. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Make printf and vprintf safe from buffer overrunsSonny Rao2011-12-171-5/+5
| | | | | | | | | | From: Sonny Rao <sonnyrao@chromium.org> utilize the added vscnprintf functions to avoid buffer overruns The implementation is fairly dumb in that it doesn't detect that the buffer is too small, but at least will not cause crashes. Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
* Add board_pre_console_putc to deal with early console outputSimon Glass2011-12-091-1/+9
| | | | | | | | | | | | | | | | This patch adds support for console output before the console is inited. The main purpose of this is to deal with a very early panic() which would otherwise cause a silent hang. A new board_pre_console_putc() function is added to the board API. If provided by the board it will be called in the event of console output before the console is ready. This function should turn on all UARTs and spray the character out if it possibly can. The feature is controlled by a new CONFIG_PRE_CONSOLE_PUTC option. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Graeme Russ <graeme.russ@gmail.com>
* console: Implement pre-console bufferGraeme Russ2011-10-051-2/+41
| | | | | | | | | | | | | Allow redirection of console output prior to console initialisation to a temporary buffer. To enable this functionality, the board (or arch) must define: - CONFIG_PRE_CONSOLE_BUFFER - Enable pre-console buffer - CONFIG_PRE_CON_BUF_ADDR - Base address of pre-console buffer - CONFIG_PRE_CON_BUF_SZ - Size of pre-console buffer (in bytes) The pre-console buffer will buffer the last CONFIG_PRE_CON_BUF_SZ bytes Any earlier characters are silently dropped.
* console: Squelch pre-console output in console functionsGraeme Russ2011-10-011-0/+18
| | | | | | | | | | There are some locations in the code which anticipate printf() being called before the console is ready by squelching printf() on gd->have_console. Move this squelching into printf(), vprintf(), puts() and putc(). Also make tstc() and getc() return 0 if console is not yet initialised Signed-off-by: Graeme Russ <graeme.russ@gmail.com> Tested-by: Simon Glass <sjg@chromium.org>
* stdio: constify "name" arg in public apiMike Frysinger2010-11-281-2/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Make *printf() return "int" instead of "void"Wolfgang Denk2010-07-041-4/+8
| | | | | | | | | | Change the return type of the *printf() functions to the standard "int"; no changes are needed but returning the already available length count. This will save a few additional strlen() calls later... Signed-off-by: Wolfgang Denk <wd@denx.de>
* Remove AmigaOneG3SE boardWolfgang Denk2010-06-231-4/+0
| | | | | | | | | | The AmigaOneG3SE board has been orphaned or a very long time, and broken for more than 12 releases resp. more than 3 years. As nobody seems to be interested any more in this stuff we may as well ged rid of it, especially as it clutters many areas of the code so it is a continuous pain for all kinds of ongoing work. Signed-off-by: Wolfgang Denk <wd@denx.de>
* console.c: fix problem with splashimageAnatolij Gustschin2010-03-211-3/+7
| | | | | | | | | | | | | | | | | | If a board uses cfb_console driver and splash image and also defines CONFIG_SILENT_CONSOLE, the user is locked out even if "silent" is not set. It is not possible to get any output, neither on vga console device nor on serial console after redirecting the output to the serial console, since the GD_FLG_SILENT flag remains set. Fix the problem by redirecting the output from frame buffer to serial console if splashimage is used. Only suppress the output if "silent" environment variable was set and don't set the GD_FLG_SILENT flag arbitrarily. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* bugfix CONFIG_SYS_CONSOLE_INFO_QUIETDavid Brownell2009-08-301-1/+1
| | | | | | | | | The "console: unify printing current devices" patch goofed: CONFIG_SYS_CONSOLE_INFO_QUIET is supposed to *REMOVE* boot time noise, not add it. Said patch changed the #ifndefs to #ifdef; this one restores them to the proper sense. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* console: unify printing current devicesJean-Christophe PLAGNIOL-VILLARD2009-07-191-46/+29
| | | | | | Create stdio_print_current_devices() for this purpose Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* stdio/device: rework function naming conventionJean-Christophe PLAGNIOL-VILLARD2009-07-181-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the console API uses the following naming convention: ======Extract====== typedef struct device_t; int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); ======= which is too generic and confusing. Instead of using device_XX and device_t we change this into stdio_XX and stdio_dev This will also allow to add later a generic device mechanism in order to have support for multiple devices and driver instances. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* common/console: avoid ifdef CONFIG_CONSOLE_MUX when it's possibleJean-Christophe PLAGNIOL-VILLARD2009-02-181-52/+56
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* common/console: coding style cleanupJean-Christophe PLAGNIOL-VILLARD2009-02-181-98/+101
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* IOMUX: Add console multiplexing support.Gary Jennejohn2008-12-071-1/+155
| | | | | | | | | | | | | | | | | | | | | | | | Modifications to support console multiplexing. This is controlled using CONFIG_SYS_CONSOLE_MUX in the board configuration file. This allows a user to specify multiple console devices in the environment with a command like this: setenv stdin serial,nc. As a result, the user can enter text on both the serial and netconsole interfaces. All devices - stdin, stdout and stderr - can be set in this manner. 1) common/iomux.c and include/iomux.h contain the environment setting implementation. 2) doc/README.iomux contains a somewhat more detailed description. 3) The implementation in (1) is called from common/cmd_nvedit.c to handle setenv and from common/console.c to handle initialization of input/output devices at boot time. 4) common/console.c also contains the code needed to poll multiple console devices for input and send output to all devices registered for output. 5) include/common.h includes iomux.h and common/Makefile generates iomux.o when CONFIG_SYS_CONSOLE_MUX is set. Signed-off-by: Gary Jennejohn <garyj@denx.de>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-181-20/+20
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Allow console input to be disabledMark Jackson2008-09-061-0/+20
| | | | | | | | | Added new CONFIG_DISABLE_CONSOLE define and GD_FLG_DISABLE_CONSOLE. When CONFIG_DISABLE_CONSOLE is defined, setting GD_FLG_DISABLE_CONSOLE disables all console input and output. Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
* devices: merge to list_headJean-Christophe PLAGNIOL-VILLARD2008-08-311-37/+25
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Big white-space cleanup.Wolfgang Denk2008-05-211-1/+1
| | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* [PATCH] simplify silent consoleLadislav Michl2007-05-051-7/+1
| | | | | Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Acked-by: Stefan Roese <sr@denx.de>
* GCC-4.x fixes: clean up global data pointer initialization for all boards.Wolfgang Denk2006-03-311-16/+2
|
* * Patch by Detlev Zundel, 31 Mar 2005:wdenk2005-03-311-5/+3
| | | | | | | Cleanup duplicate definition of overwrite_console() * Update TQM5200 configuration; prepare for Rev. 200 starter kit boards
* * Cleanup, minor fixeswdenk2004-04-181-1/+4
| | | | | | | | | * Patch by Rune Torgersen, 16 Apr 2004: LBA48 fixes * Patches by Pantelis Antoniou, 16 Apr 2004: - Fix some compile problems; add "once" functionality for the netretry variable
* * Patches by Thomas Viehweger, 16 Mar 2004:wdenk2004-03-231-12/+12
| | | | | | | | | - show PCI clock frequency on MPC8260 systems - add FCC_PSMR_RMII flag for HiP7 processors - in do_jffs2_fsload(), take load address from load_addr if not set explicit, update load_addr otherwise - replaced printf by putc/puts when no formatting is needed (smaller code size, faster execution)
* Patch by Anders Larsen, 09 Jan 2004:wdenk2004-02-081-1/+1
| | | | | | | | | | ARM memory layout fixes: the abort-stack is now set up in the correct RAM area, and the BSS is zeroed out as it should be. Furthermore, the magic variables 'armboot_end' and 'armboot_end_data' of the linker scripts are replaced by '__bss_start' and '_end', resp., which is a further step to eliminate unnecessary differences between the implementation of the CPU architectures.
* * Patch by Wolter Kamphuis, 15 Dec 2003:wdenk2004-02-061-0/+10
| | | | | | made CONFIG_SILENT_CONSOLE usable on all architectures * Disable date command on TQM866M - there is no RTC on MPC866
* * Patches by Xianghua Xiao, 15 Oct 2003:wdenk2003-10-151-1/+1
| | | | | | | | - Added Motorola CPU 8540/8560 support (cpu/85xx) - Added Motorola MPC8540ADS board support (board/mpc8540ads) - Added Motorola MPC8560ADS board support (board/mpc8560ads) * Minor code cleanup
* Added config option CONFIG_SILENT_CONSOLE. See doc/README.silentwdenk2003-10-101-1/+13
| | | | for more information
* Suppress all output with splashscreen configured only if "splashimage"dzu2003-09-291-2/+4
| | | | is set
* * Patches by Anders Larsen, 17 Sep 2003:wdenk2003-09-181-0/+6
| | | | | | | | | | - fix spelling errors - set GD_FLG_DEVINIT flag only after device function pointers are valid - Allow CFG_ALT_MEMTEST on systems where address zero isn't writeable - enable 3.rd UART (ST-UART) on PXA(XScale) CPUs - trigger watchdog while waiting in serial driver
* * Implement new mechanism to export U-Boot's functions to standalonewdenk2003-07-241-13/+13
| | | | | | | | applications: instead of using (PPC-specific) system calls we now use a jump table; please see doc/README.standalone for details * Patch by Dave Westwood, 24 Jul 2003: added support for Unity OS (a proprietary OS)
* Patches by Murray Jensen, 17 Jun 2003:wdenk2003-06-191-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Hymod board database mods: add "who" field and new xilinx chip types - provide new "init_cmd_timeout()" function so code external to "common/main.c" can use the "reset_cmd_timeout()" function before entering the main loop - add DTT support for adm1021 (new file dtt/adm1021.c; config slightly different. see include/configs/hymod.h for an example (requires CONFIG_DTT_ADM1021, CONFIG_DTT_SENSORS, and CFG_DTT_ADM1021 defined) - add new "eeprom_probe()" function which has similar args and behaves in a similar way to "eeprom_read()" etc. - add 8260 FCC ethernet loopback code (new "eth_loopback_test()" function which is enabled by defining CONFIG_ETHER_LOOPBACK_TEST) - gdbtools copyright update - ensure that set_msr() executes the "sync" and "isync" instructions after the "mtmsr" instruction in cpu/mpc8260/interrupts.c - 8260 I/O ports fix: Open Drain should be set last when configuring - add SIU IRQ defines for 8260 - allow LDSCRIPT override and OBJCFLAGS initialization: change to config.mk to allow board configurations to override the GNU linker script, selected via the LDSCRIPT, make variable, and to give an initial value to the OBJCFLAGS make variable - 8260 i2c enhancement: o correctly extends the timeout depending on the size of all queued messages for both transmit and receive o will not continue with receive if transmit times out o ensures that the error callback is done for all queued tx and rx messages o correctly detects both tx and rx timeouts, only delivers one to the callback, and does not overwrite an earlier error o logic in i2c_probe now correct - add "vprintf()" function so that "panic()" function can be technically correct - many Hymod board changes
* * Make sure Block Lock Bits get cleared in R360MPI flash driverwdenk2003-04-201-2/+7
| | | | | | | | | | | | | | * MPC823 LCD driver: Fill color map backwards, to allow for steady display when Linux takes over * Patch by Erwin Rol, 27 Feb 2003: Add support for RTEMS (this time for real). * Add support for "bmp info" and "bmp display" commands to load bitmap images; this can be used (for example in a "preboot" command) to display a splash screen very quickly after poweron. * Add support for 133 MHz clock on INCA-IP board
* * Patches by Robert Schwebel, 06 Mar 2003:wdenk2003-03-061-1/+1
| | | | | | | | | | | - fix bug in BOOTP code (must use NetCopyIP) - update of CSB226 port - clear BSS segment on XScale - added support for i2c_init_board() function - update to the Innokom plattform * Extend support for redundand environments for configurations where environment size < sector size
* * Patch by Thomas Frieden, 13 Nov 2002:wdenk2002-11-191-0/+4
| | | | | | | | | | | | | Add code for AmigaOne board (preliminary merge to U-Boot, still WIP) * Patch by Jon Diekema, 12 Nov 2002: - Adding URL for IEEE OUI lookup - Making the autoboot #defines dependent on CONFIG_AUTOBOOT_KEYED being defined. - In the CONFIG_EXTRA_ENV_SETTINGS #define, the root-on-initrd and root-on-nfs macros are designed to switch how the default boot method gets defined.
* Initial revisionwdenk2002-11-031-0/+532
OpenPOWER on IntegriCloud