summaryrefslogtreecommitdiffstats
path: root/common/console.c
Commit message (Collapse)AuthorAgeFilesLines
...
* console: Cleanup console activationSascha Hauer2012-10-091-25/+26
| | | | | | | | | | | | | | | | | When CONFIG_CONSOLE_ACTIVATE_ALL is set, the banner will never be printed. Also, the console buffer is emptied when the first console is registered, even when it's not enabled. This patch cleans it up in a way that: - the console buffer is emptied once the first console is activated, not when it's registered. - Make sure that the banner is printed first, so that we can output things to the buffer before the banner is printed without ending up in having the banner in the middle of the other boot messages. - Use IS_ENABLED rather than ifdefs Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
| | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use DEVICE_ID_DYNAMIC where applicableSascha Hauer2012-04-161-1/+1
| | | | | | | We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids, Use it where applicable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: use container_of instead of type_dataSascha Hauer2012-02-251-3/+4
| | | | | | This reduces the usage of type_data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: make it work without mallocSascha Hauer2012-01-261-17/+32
| | | | | | | | This changes the dynamically allocated kfifos to statically initialized ones. This makes the console work without malloc and thus safe to be called before malloc is initialized. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* poller_call: move from getc to is_timeoutJean-Christophe PLAGNIOL-VILLARD2012-01-041-2/+0
| | | | | | | | this will allow to always call poller_call even durring timeout and still the case in getc Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'next'Sascha Hauer2011-12-071-6/+18
|\
| * console: add console unregisteringRobert Jarzmik2011-12-051-6/+18
| | | | | | | | | | | | | | | | | | | | | | Some console are transient, like the USB connected serial console which should be removed when the USB connection is severed. Enable console removal for such devices. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fprintf: remove unused variableSascha Hauer2011-12-071-2/+1
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix fprintf prototype and return valueSascha Hauer2011-11-111-3/+2
| | | | | | | | The puts functions now properly return the number of characters written. With this we can also fix fprintf. Also, remove never reached return in fputs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: fix return values of puts functionsSascha Hauer2011-11-111-4/+10
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove EARLY_INIT and EARLY_CONSOLE supportSascha Hauer2011-09-271-33/+3
| | | | | | Bitrotted over time and nearly unused, so remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: make console device a child of the hardware deviceSascha Hauer2011-08-151-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix console fifo (and loadb/loady commands)Alexey Galakhov2011-05-161-11/+16
| | | | | | | | This patch fixes loadb and loady commands. tstc() should return true if console_input_buffer is not empty. Signed-off-by: Alexey Galakhov <agalakhov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move version_string to seperate fileSascha Hauer2011-04-111-8/+2
| | | | | | | | | In a noninteractive environment barebox will be compiled without command support. So move version_string to a seperate file which is compiled unconditionally. Also, display the banner when the simple console support is used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fix default baudrate settingJuergen Beisert2011-01-181-1/+2
| | | | | | | | | The menu entry to set the default baudrate (CONFIG_BAUDRATE) makes no sense, as long as its content is not used. This patch makes barebox using the setting again. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add generic poll infrastructureMarc Kleine-Budde2010-12-201-0/+5
| | | | | | | | | | | | | | | | | | | | | Barebox does not have interrupt functionality. Nevertheless it's sometimes useful to periodically call functions, like for example a heartbeat LED or watchdog reset. Instead of cluttering the code with calls to these functions this patch adds a generic polling infrastructure. Code which might run for longer now can call poller_call() periodically which in turn will call all registered pollers. This patch adds a call to poller_call in two generic pathes. First of them is getc() which covers waiting for uart input. Second is ctrlc() which should be called anyway from code which might run for longer. So instead adding poller_call directly to your code, consider checking ctrlc instead which also gives additional convenience to the user. The poller code is safe against reentrancy which means that it's safe to call poller_call inside a poller. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* version_string: sparse fixesSascha Hauer2010-10-211-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: sparse fixesSascha Hauer2010-10-211-2/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: set device_d id at -1Jean-Christophe PLAGNIOL-VILLARD2010-09-241-0/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename __initdata to __early_initdataSascha Hauer2010-09-201-2/+2
| | | | | | | | | The __initdata define was present before Jean-Christophe added it as fake value for Linux compatibility. Rename the previous define to a different name to avoid clashes Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rework device parametersSascha Hauer2010-06-171-19/+21
| | | | | | | | Change device parameters so that the memory management is in generic code. This also removes the need of storing statically initialized parameters as they are stored in a struct list_head for each device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* list: remove duplicated list.hSascha Hauer2009-11-031-1/+1
| | | | | | | | We accidently have two list implementations in the tree: include/list.h and include/linux/list.h. This patch moves the latter (newer one) to include/linux/list.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: partly revert 84688dfdb4aecc8296b4fef9bc657335d7b9ade5Sascha Hauer2009-09-251-1/+0
| | | | | | Some unrelated code leaked in in this commit Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: make locally used function staticSascha Hauer2009-09-251-2/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: Fix line endingsSascha Hauer2009-08-131-2/+2
| | | | | | use \r\n instead of \n\r Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* get rid of device idsSascha Hauer2009-07-211-1/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: buffer characters before console is initializedSascha Hauer2009-05-131-10/+21
| | | | | | | | instead of throwing all output away when the console is not initialized, buffer it in a kfifo and print it later when the first console gets initialized. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: rename console_buffer to console_input_bufferSascha Hauer2009-05-131-5/+11
| | | | | | ...as we want to add an output buffer, too Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Flush consoles before exitingSascha Hauer2009-03-191-0/+11
| | | | | | | We use FIFOs on some devices, so flush them before exiting so we do not get funny characters in the output. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Console: Fix baudrate switchingSascha Hauer2009-02-061-1/+4
| | | | | | | When waiting for the user to confirm the new baudrate, wait for '\n' and '\r' instead of only '\r' Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* console: add a simple console for saving spaceSascha Hauer2008-08-011-3/+1
| | | | | | | Add a simple console layer which is not able to handle multiple consoles for those who don't need it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add the possibility to have an architecture specific ctrlc() function.Sascha Hauer2008-03-111-0/+2
| | | | | This allows us to return immediately in ctrlc() on sandbox and thus not slow down network througput.
* Move display_banner() to console.c. This helps us to showsascha2007-10-191-1/+20
| | | | the banner as first message.
* Use Linux Kernel list implementation for console devices insteadSascha Hauer2007-10-111-27/+28
| | | | of homegrown list.
* Fix use of unitialized Variable. Why didn't this come up earlier???Sascha Hauer2007-10-091-1/+1
|
* export symbolsSascha Hauer2007-10-071-0/+11
|
* Export symbols printf and the ones needed for getoptSascha Hauer2007-10-011-1/+2
|
* add console bufferingSascha Hauer2007-09-211-1/+33
|
* - putc is now putchar for better standard conformitySascha Hauer2007-09-211-4/+7
| | | | - make printf return int
* whitespace cleanupSascha Hauer2007-09-131-7/+7
|
* fix for !CONFIG_HAS_EARLY_INITSascha Hauer2007-07-121-3/+5
|
* add early console for mpc5200Sascha Hauer2007-07-121-21/+61
|
* svn_rev_700Sascha Hauer2007-07-051-1/+1
|
* svn_rev_686Sascha Hauer2007-07-051-4/+42
| | | | implement console baudrate switching
* svn_rev_538Sascha Hauer2007-07-051-0/+19
| | | | several powerpc fixes
* svn_rev_525Sascha Hauer2007-07-051-1/+5
| | | | make default behaviour of consoles configurable
* svn_rev_502Sascha Hauer2007-07-051-9/+45
| | | | complete multiple console support
* svn_rev_398Sascha Hauer2007-07-051-37/+4
| | | | remove disable_ctrlc(), had_ctrlc() and clear_ctrlc()