@@ -74,23 +74,35 @@
#define CONFIG_SILENT_CONSOLE
/* Enable keyboard */
-#define CONFIG_CROS_EC /* CROS_EC protocol */
+#ifdef CONFIG_CROS_EC /* ChromeOS embedded controller */
#define CONFIG_CROS_EC_SPI /* Support CROS_EC over SPI */
#define CONFIG_CROS_EC_I2C /* Support CROS_EC over I2C */
#define CONFIG_CROS_EC_KEYB /* CROS_EC keyboard input */
#define CONFIG_CMD_CROS_EC
#define CONFIG_KEYBOARD
+#endif
/* Console configuration */
#define CONFIG_CONSOLE_MUX
#define CONFIG_SYS_CONSOLE_IS_IN_ENV
-#define EXYNOS_DEVICE_SETTINGS \
- "stdin=serial,cros-ec-keyb\0" \
- "stdout=serial,lcd\0" \
+
+#ifdef CONFIG_KEYBOARD
+#define EXYNOS_DEVICE_INPUT "stdin=serial,cros-ec-keyb\0"
+#else
+#define EXYNOS_DEVICE_INPUT "stdin=serial\0"
+#endif
+
+#ifdef CONFIG_LCD
+#define EXYNOS_DEVICE_OUTPUT "stdout=serial,lcd\0" \
"stderr=serial,lcd\0"
+#else
+#define EXYNOS_DEVICE_OUTPUT "stdout=serial\0" \
+ "stderr=serial\0"
+#endif
#define CONFIG_EXTRA_ENV_SETTINGS \
- EXYNOS_DEVICE_SETTINGS
+ EXYNOS_DEVICE_INPUT \
+ EXYNOS_DEVICE_OUTPUT
/* SD/MMC configuration */
#define CONFIG_GENERIC_MMC
@@ -13,6 +13,7 @@
#define CONFIG_SPI_FLASH
#define CONFIG_LCD
#define CONFIG_CMD_SOUND
+#define CONFIG_CROS_EC
#include <configs/exynos5250-dt.h>
@@ -13,6 +13,7 @@
#define CONFIG_SPI_FLASH
#define CONFIG_LCD
#define CONFIG_CMD_SOUND
+#define CONFIG_CROS_EC
#include <configs/exynos5250-dt.h>
AFAIK the CROS_EC is only available on the Chromebook. So move the corresponding define to the snow config file and include the keyboard only in this case. Also the LCD should be protected in the same way, though this seems to be also valid for the SMDK5250 board. Unfortunately compilation breaks for the SMDK5250 without the CROS_EC define, so pull it in for this board too for the time being. Signed-off-by: Andre Przywara <andre.przywara@linaro.org> --- include/configs/exynos5250-dt.h | 22 +++++++++++++++++----- include/configs/smdk5250.h | 1 + include/configs/snow.h | 1 + 3 files changed, 19 insertions(+), 5 deletions(-)