summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamyoon Woo <namyoon@google.com>2020-03-07 21:08:56 -0800
committerCommit Bot <commit-bot@chromium.org>2020-03-10 23:19:07 +0000
commit72e5fc940ab60c5b3ea659a27033f74786c45323 (patch)
tree21382849d4983e7fb417d080d7d5ea8bb1337e81
parentc2aa02c9118a32d6ff4b0d5d55345bfd667ab6b8 (diff)
downloadchrome-ec-72e5fc940ab60c5b3ea659a27033f74786c45323.tar.gz
move ec_comm implementation to common directory
This patch moves ec_comm.c and ec_efs.c from board/cr50 to common/, so that they can be shared with other board configuration (like host). This is to build unittest for those files. BUG=none BRANCH=cr50 TEST=make buildall -j Signed-off-by: Namyoon Woo <namyoon@chromium.org> Change-Id: I67ac313054ebe4604848a176f0a42e3483957e74 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2094076 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r--board/cr50/board.h2
-rw-r--r--board/cr50/build.mk2
-rw-r--r--common/build.mk1
-rw-r--r--common/ec_comm.c (renamed from board/cr50/ec_comm.c)0
-rw-r--r--common/ec_efs.c (renamed from board/cr50/ec_efs.c)0
-rw-r--r--include/config.h5
-rw-r--r--include/ec_comm.h (renamed from board/cr50/ec_comm.h)0
7 files changed, 8 insertions, 2 deletions
diff --git a/board/cr50/board.h b/board/cr50/board.h
index 25f8452503..1b93ca75ca 100644
--- a/board/cr50/board.h
+++ b/board/cr50/board.h
@@ -449,6 +449,8 @@ enum nvmem_users {
#define CONFIG_FACTORY_MODE
#define CONFIG_RNG
+#define CONFIG_EC_EFS_SUPPORT
+
#define CONFIG_ENABLE_H1_ALERTS
/* Enable hardware backed brute force resistance feature */
diff --git a/board/cr50/build.mk b/board/cr50/build.mk
index 4b28c91641..5b0d788401 100644
--- a/board/cr50/build.mk
+++ b/board/cr50/build.mk
@@ -42,8 +42,6 @@ dirs-y += $(BDIR)/tpm2
board-y = board.o
board-y += ap_state.o
board-y += closed_source_set1.o
-board-y += ec_comm.o
-board-y += ec_efs.o
board-y += ec_state.o
board-y += power_button.o
board-y += servo_state.o
diff --git a/common/build.mk b/common/build.mk
index 4aa8dc3abd..5e803b970b 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -65,6 +65,7 @@ common-$(CONFIG_DEDICATED_RECOVERY_BUTTON)+=button.o
common-$(CONFIG_DEVICE_EVENT)+=device_event.o
common-$(CONFIG_DEVICE_STATE)+=device_state.o
common-$(CONFIG_DPTF)+=dptf.o
+common-$(CONFIG_EC_EFS_SUPPORT)+=ec_comm.o ec_efs.o
common-$(CONFIG_EC_EC_COMM_MASTER)+=ec_ec_comm_master.o
common-$(CONFIG_EC_EC_COMM_SLAVE)+=ec_ec_comm_slave.o
common-$(CONFIG_HOSTCMD_ESPI)+=espi.o
diff --git a/board/cr50/ec_comm.c b/common/ec_comm.c
index c2e7bdb26d..c2e7bdb26d 100644
--- a/board/cr50/ec_comm.c
+++ b/common/ec_comm.c
diff --git a/board/cr50/ec_efs.c b/common/ec_efs.c
index 8f5bece989..8f5bece989 100644
--- a/board/cr50/ec_efs.c
+++ b/common/ec_efs.c
diff --git a/include/config.h b/include/config.h
index add8fcfa0e..bc51beb4a6 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1411,6 +1411,11 @@
/* Enable verbose output to UART console and extra timestamp print precision. */
#define CONFIG_CONSOLE_VERBOSE
+/*
+ * Enable EC-CR50 communication (a.k.a. EC-EFS2). This is for CR50 config only.
+ */
+#undef CONFIG_EC_EFS_SUPPORT
+
/*****************************************************************************/
/* Support for EC-EC communication */
diff --git a/board/cr50/ec_comm.h b/include/ec_comm.h
index 263d311e63..263d311e63 100644
--- a/board/cr50/ec_comm.h
+++ b/include/ec_comm.h