this will be done at activation
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
None of the driver make the difference between STDOUT and STDERR.
So we just need to check if putc or getc are filled in the console_device
save 32 bytes on versatilepb
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
RTS is an output. Either flow control is used and you care about the state or
it is not used and you don't care. So setting it to active does no harm in
either case. This is inline with what Linux does.
Mandatory for Highbank as example
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
The flags in struct console_device have to be initialized
to zero. Otherwise the following can happen:
- console_register sets the initial baudrate of a new console
before we set the global console init state to CONSOLE_INIT_FULL.
- In console_baudrate_set we test whether the current console is
active which may be true because of unitialized flags.
- we then call getc() to wait for the user to accept the new settings
and we are stuck because of the CONSOLE_UNINITIALIZED state
we will never get anything from getc().
Looking back this explains some cases for me when barebox refused
to start and I really wonder why this did not become a more visible
problem before.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The idea is to panic() when there is no memory available for normal
operation. Exception: code which can consume arbitrary amount of RAM
(example: files allocated in ramfs) must report error instead of panic().
This patch also fixes code which didn't check for NULL from malloc() etc.
Usage: malloc(), memalign() return NULL when out of RAM.
xmalloc(), xmemalign() always return non-NULL or panic().
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>