9
0
Fork 0
Commit Graph

62 Commits

Author SHA1 Message Date
Sascha Hauer 1533f6b7b3 fix fprintf prototype and return value
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>
2011-11-11 16:19:48 +01:00
Sascha Hauer 8fe1e8fd41 console: fix return values of puts functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:20:21 +01:00
Sascha Hauer d01070c8af remove EARLY_INIT and EARLY_CONSOLE support
Bitrotted over time and nearly unused, so remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-27 10:27:18 +02:00
Sascha Hauer ad140020b8 console: make console device a child of the hardware device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-15 09:48:03 +02:00
Alexey Galakhov 943bf72dc8 fix console fifo (and loadb/loady commands)
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>
2011-05-16 08:28:27 +02:00
Sascha Hauer 3f1ff6b730 move version_string to seperate file
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>
2011-04-11 12:36:08 +02:00
Juergen Beisert 76dd3e70a5 Fix default baudrate setting
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>
2011-01-18 14:24:09 +01:00
Marc Kleine-Budde 0277a663bc Add generic poll infrastructure
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>
2010-12-20 09:28:21 +01:00
Sascha Hauer e2fadcc34a version_string: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:24 +02:00
Sascha Hauer f538b46572 console: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:23 +02:00
Jean-Christophe PLAGNIOL-VILLARD 098e9e8f20 console: set device_d id at -1
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-24 08:46:41 +02:00
Sascha Hauer 2db4aa5c32 rename __initdata to __early_initdata
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>
2010-09-20 09:21:31 +02:00
Sascha Hauer c3789cd49b rework device parameters
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>
2010-06-17 08:28:25 +02:00
Sascha Hauer 73d57b1d35 list: remove duplicated list.h
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>
2009-11-03 09:48:53 +01:00
Sascha Hauer 0217e514cf console: partly revert 84688dfdb4
Some unrelated code leaked in in this commit

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 14:13:17 +02:00
Sascha Hauer 84688dfdb4 console: make locally used function static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 13:34:15 +02:00
Sascha Hauer 0bf2410e85 console: Fix line endings
use \r\n instead of \n\r

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-08-13 10:43:12 +02:00
Sascha Hauer 02ba8a0542 get rid of device ids
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:47 +02:00
Sascha Hauer 49321a5cd3 console: buffer characters before console is initialized
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>
2009-05-13 16:23:09 +02:00
Sascha Hauer 2e8254e387 console: rename console_buffer to console_input_buffer
...as we want to add an output buffer, too

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-13 16:11:24 +02:00
Sascha Hauer 8a2e721fc5 Flush consoles before exiting
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>
2009-03-19 12:21:24 +01:00
Sascha Hauer 4e2fe88944 Console: Fix baudrate switching
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>
2009-02-06 14:44:46 +01:00
Sascha Hauer aca52174a9 console: add a simple console for saving space
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>
2008-08-01 11:47:10 +02:00
Sascha Hauer 8759e68de2 Add the possibility to have an architecture specific ctrlc() function.
This allows us to return immediately in ctrlc() on sandbox and thus
not slow down network througput.
2008-03-11 00:00:37 +01:00
sascha ceac76ffce Move display_banner() to console.c. This helps us to show
the banner as first message.
2007-10-19 11:04:33 +02:00
Sascha Hauer ac8a1f064e Use Linux Kernel list implementation for console devices instead
of homegrown list.
2007-10-11 20:36:57 +02:00
Sascha Hauer 9b391290c2 Fix use of unitialized Variable. Why didn't this come up earlier??? 2007-10-09 08:18:37 +02:00
Sascha Hauer 2443c7a6f1 export symbols 2007-10-07 14:27:24 +02:00
Sascha Hauer aaa71a1263 Export symbols printf and the ones needed for getopt 2007-10-01 10:26:45 +02:00
Sascha Hauer a3110c5f8f add console buffering 2007-09-21 21:30:59 +02:00
Sascha Hauer 0dd68e795e - putc is now putchar for better standard conformity
- make printf return int
2007-09-21 09:09:06 +02:00
Sascha Hauer 2a9c1de93f whitespace cleanup 2007-09-13 16:06:02 +02:00
Sascha Hauer 646856e394 fix for !CONFIG_HAS_EARLY_INIT 2007-07-12 11:50:48 +02:00
Sascha Hauer 149d273b80 add early console for mpc5200 2007-07-12 09:31:07 +02:00
Sascha Hauer e24bb529b1 svn_rev_700 2007-07-05 18:02:18 +02:00
Sascha Hauer e74a1633aa svn_rev_686
implement console baudrate switching
2007-07-05 18:02:17 +02:00
Sascha Hauer 758a1107f8 svn_rev_538
several powerpc fixes
2007-07-05 18:02:03 +02:00
Sascha Hauer f1b8cfbd1d svn_rev_525
make default behaviour of consoles configurable
2007-07-05 18:02:01 +02:00
Sascha Hauer fa668fe184 svn_rev_502
complete multiple console support
2007-07-05 18:01:59 +02:00
Sascha Hauer 32f3bba54f svn_rev_398
remove disable_ctrlc(), had_ctrlc() and clear_ctrlc()
2007-07-05 18:01:50 +02:00
Sascha Hauer af347d05ab svn_rev_380
add support for multipple consoles
2007-07-05 18:01:48 +02:00
Sascha Hauer cbde3b9bbc svn_rev_358 2007-07-05 18:01:46 +02:00
Sascha Hauer ed7c968959 svn_rev_276
fix warnings
2007-07-05 18:01:39 +02:00
Sascha Hauer 4a01ad9260 svn_rev_128
remove more console stuf
2007-07-05 18:01:25 +02:00
Sascha Hauer abfbbad1eb svn_rev_109
do not know anymore
2007-07-05 18:01:23 +02:00
Sascha Hauer 162484b83c svn_rev_003
remove all #if 0 and #if 1
2007-07-05 18:01:13 +02:00
Wolfgang Denk d87080b721 GCC-4.x fixes: clean up global data pointer initialization for all boards. 2006-03-31 18:32:53 +02:00
wdenk 83e40ba75d * Patch by Detlev Zundel, 31 Mar 2005:
Cleanup duplicate definition of overwrite_console()

* Update TQM5200 configuration;
  prepare for Rev. 200 starter kit boards
2005-03-31 18:42:15 +00:00
wdenk 6e5923851e * Cleanup, minor fixes
* 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
2004-04-18 17:39:38 +00:00
wdenk 4b9206ed51 * Patches by Thomas Viehweger, 16 Mar 2004:
- 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)
2004-03-23 22:14:11 +00:00