Patchwork [U-Boot,4/5] ARM: snow: move defines for Chromebook embedded controller

login
register
mail settings
Submitter Andre Przywara
Date Sept. 25, 2013, 10:42 a.m.
Message ID <1380105759-9687-5-git-send-email-andre.przywara@linaro.org>
Download mbox | patch
Permalink /patch/277787/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Andre Przywara - Sept. 25, 2013, 10:42 a.m.
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(-)

Patch

diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index e855745..5f44684 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -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
diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
index b1bb783..b8150e9 100644
--- a/include/configs/smdk5250.h
+++ b/include/configs/smdk5250.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>
 
diff --git a/include/configs/snow.h b/include/configs/snow.h
index 4d34c48..0cf7322 100644
--- a/include/configs/snow.h
+++ b/include/configs/snow.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>