summaryrefslogtreecommitdiff
path: root/drivers/i2c/soft_i2c.c
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2011-08-29 02:14:05 +0000
committerWolfgang Denk <wd@denx.de>2011-10-01 21:54:49 +0200
commite3e454cd72f319908355427b1a3ae54b3dd53356 (patch)
treeb461a0dc8287aa0c7d3e3eab525cd4f76c27481a /drivers/i2c/soft_i2c.c
parent79df1208ee6984aa63468673c042667d121bb0bc (diff)
downloadu-boot-imx-e3e454cd72f319908355427b1a3ae54b3dd53356.zip
u-boot-imx-e3e454cd72f319908355427b1a3ae54b3dd53356.tar.gz
u-boot-imx-e3e454cd72f319908355427b1a3ae54b3dd53356.tar.bz2
console: Squelch pre-console output in console functions
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>
Diffstat (limited to 'drivers/i2c/soft_i2c.c')
-rw-r--r--drivers/i2c/soft_i2c.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index 9b02e89..36c6114 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -119,7 +119,6 @@ DECLARE_GLOBAL_DATA_PTR;
#ifdef DEBUG_I2C
#define PRINTD(fmt,args...) do { \
- if (gd->have_console) \
printf (fmt ,##args); \
} while (0)
#else