summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-10-10 07:30:16 -0600
committerSimon Glass <sjg@chromium.org>2014-10-22 21:50:33 -0600
commit14db950945cfd8dd05c60476696be08425acdc5a (patch)
treea5476b881cd1ffd8385f053e3a8742244eb91dc9
parentf1269925f9f2797d5a98afb50990540754db8d1e (diff)
downloadu-boot-imx-14db950945cfd8dd05c60476696be08425acdc5a.zip
u-boot-imx-14db950945cfd8dd05c60476696be08425acdc5a.tar.gz
u-boot-imx-14db950945cfd8dd05c60476696be08425acdc5a.tar.bz2
x86: cros_ec: Enable cros_ec for link
Add defines to enable the Chrome OS EC interface and set it up on init. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--board/chromebook-x86/coreboot/Makefile2
-rw-r--r--board/chromebook-x86/coreboot/coreboot.c16
-rw-r--r--include/configs/coreboot.h5
3 files changed, 22 insertions, 1 deletions
diff --git a/board/chromebook-x86/coreboot/Makefile b/board/chromebook-x86/coreboot/Makefile
index 4f2ac89..27ebe78 100644
--- a/board/chromebook-x86/coreboot/Makefile
+++ b/board/chromebook-x86/coreboot/Makefile
@@ -12,4 +12,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-obj-y += coreboot_start.o
+obj-y += coreboot_start.o coreboot.o
diff --git a/board/chromebook-x86/coreboot/coreboot.c b/board/chromebook-x86/coreboot/coreboot.c
new file mode 100644
index 0000000..0240c34
--- /dev/null
+++ b/board/chromebook-x86/coreboot/coreboot.c
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2013 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <cros_ec.h>
+
+int arch_early_init_r(void)
+{
+ if (cros_ec_board_init())
+ return -1;
+
+ return 0;
+}
diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h
index f03a768..ce614c8 100644
--- a/include/configs/coreboot.h
+++ b/include/configs/coreboot.h
@@ -283,6 +283,11 @@
*/
#define CONFIG_PCI
+#define CONFIG_CROS_EC
+#define CONFIG_CROS_EC_LPC
+#define CONFIG_CMD_CROS_EC
+#define CONFIG_ARCH_EARLY_INIT_R
+
/*-----------------------------------------------------------------------
* USB configuration
*/