summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-21 17:18:34 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-04 17:58:16 +0000
commitaa0693de228f6fb3ccba2beb859a6c8d37e5d830 (patch)
tree8454fe24e515a72a5108b70cc04945870053b177
parent93f6525f1e3ed79cd27156b842593e401009d6b3 (diff)
downloadchrome-ec-aa0693de228f6fb3ccba2beb859a6c8d37e5d830.tar.gz
zephyr: Bring in common/peripheral.c
This file is intended to be in the core build. Bring it into the Zephyr build. Also define CONFIG_CROS_BOARD_INFO, used in that file, since it should depend on CONFIG_PLATFORM_EC_CBI. BUG=b:178124020 BRANCH=none TEST=make BOARD=volteer -j30 boot zephyr for volteer and see that it brings in the new code Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ie8dd7a74b05c23a5d04781fb2d9bfb1a1cfe1866 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2644178 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
-rw-r--r--zephyr/CMakeLists.txt1
-rw-r--r--zephyr/shim/include/config_chip.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index 20b7c68bbc..a9574bbcec 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -69,6 +69,7 @@ add_subdirectory_ifdef(CONFIG_PLATFORM_EC "shim")
# supported by all boards and emulators (including unit tests) using the shim
# layer.
zephyr_sources_ifdef(CONFIG_PLATFORM_EC "${PLATFORM_EC}/common/base32.c"
+ "${PLATFORM_EC}/common/peripheral.c"
"${PLATFORM_EC}/common/printf.c"
"${PLATFORM_EC}/common/queue.c"
"${PLATFORM_EC}/common/shared_mem.c"
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 4f73297762..e96da7caf1 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -929,4 +929,9 @@ enum battery_type {
#define CONFIG_BOARD_VERSION_CUSTOM
#endif
+#undef CONFIG_CROS_BOARD_INFO
+#ifdef CONFIG_PLATFORM_EC_CBI
+#define CONFIG_CROS_BOARD_INFO
+#endif
+
#endif /* __CROS_EC_CONFIG_CHIP_H */