summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-09-12 23:18:25 -0600
committerTom Rini <trini@konsulko.com>2016-09-16 17:03:39 -0400
commit76f1f38816d8763b51e5f1d6ca099a88aa1fd077 (patch)
treee407c3bf5d6b690df6f5bec7b78d265103463063 /include/common.h
parent218d0d5b9b29b71c9c4db62bc735a54755e8ee1b (diff)
Use separate options for TPL support
At present TPL uses the same options as SPL support. In a few cases the board config enables or disables the SPL options depending on whether CONFIG_TPL_BUILD is defined. With the move to Kconfig, options are determined for the whole build and (without a hack like an #undef in a header file) cannot be controlled in this way. Create new TPL options for these and update users. This will allow Kconfig conversion to proceed for these boards. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/common.h b/include/common.h
index e9f0dea308..a8d833b989 100644
--- a/include/common.h
+++ b/include/common.h
@@ -866,17 +866,20 @@ int getc(void);
int tstc(void);
/* stdout */
-#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SERIAL_SUPPORT)
-#define putc(...) do { } while (0)
-#define puts(...) do { } while (0)
-#define printf(...) do { } while (0)
-#define vprintf(...) do { } while (0)
-#else
+#if !defined(CONFIG_SPL_BUILD) || \
+ (defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_SERIAL_SUPPORT)) || \
+ (defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) && \
+ defined(CONFIG_SPL_SERIAL_SUPPORT))
void putc(const char c);
void puts(const char *s);
int printf(const char *fmt, ...)
__attribute__ ((format (__printf__, 1, 2)));
int vprintf(const char *fmt, va_list args);
+#else
+#define putc(...) do { } while (0)
+#define puts(...) do { } while (0)
+#define printf(...) do { } while (0)
+#define vprintf(...) do { } while (0)
#endif
/* stderr */