summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-08-23 22:58:59 +0200
committerTom Rini <trini@konsulko.com>2017-09-03 11:04:52 -0400
commit72f09606d80f6786ae7f20f4b0e621ddb576302e (patch)
tree35be523dee46b5e4d3321a53abfe055adb955d46
parent79c5912e8d8748d5e36c7dc6376891c9f451e375 (diff)
include/config_fallbacks.h: add default for CONFIG_SYS_CBSIZE
CONFIG_SYS_CBSIZE contains the buffer size for input for the console. The vast majority of platforms define them to some reasonable value (256, 512 or 1024 bytes), and it is quite annoying to repeat this definition for all platforms while it isn't really HW-related. Therefore, let's provide a sane fallback value in config_fallbacks.h, so that platforms can rely on it instead of having to explicitly define it. We use 1024 when KGDB is enabled, and 256 otherwise, which is what the majority of the platforms are doing. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
-rw-r--r--include/config_fallbacks.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index d1bde5f07c..07df99664c 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -72,6 +72,15 @@
#define CONFIG_LIB_RAND
#endif
+/* Console I/O Buffer Size */
+#ifndef CONFIG_SYS_CBSIZE
+#if defined(CONFIG_CMD_KGDB)
+#define CONFIG_SYS_CBSIZE 1024
+#else
+#define CONFIG_SYS_CBSIZE 256
+#endif
+#endif
+
#ifndef CONFIG_SYS_PBSIZE
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + 128)
#endif