summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@google.com>2022-10-10 11:15:07 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-10 20:43:47 +0000
commit7cb58895c4bf51761acd8df0629c3ca12853e750 (patch)
tree192a984d93a933db7cca31c3718e8538a25e638c
parentdc47c43f3532da5f4b24ce83988c8e1fdc8c3954 (diff)
downloadchrome-ec-7cb58895c4bf51761acd8df0629c3ca12853e750.tar.gz
zephyr: avoid collisions with board.h
Rename the shim's board.h and add a conditional include in config.h. This avoids some older boards in zephyr/projects from accidentally including the wrong board since multiple include paths exist. BRANCH=none BUG=b:246839061 TEST=zmake build --all Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Ice559b83c021506f0cc310a30b4b774527d38f77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3943255 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r--common/usbc/usb_prl_sm.c1
-rw-r--r--common/usbc/usbc_task.c1
-rw-r--r--include/config.h4
-rw-r--r--zephyr/shim/include/zephyr_shim.h (renamed from zephyr/shim/include/board.h)0
4 files changed, 4 insertions, 2 deletions
diff --git a/common/usbc/usb_prl_sm.c b/common/usbc/usb_prl_sm.c
index b1843da6eb..d4bd5b9a6e 100644
--- a/common/usbc/usb_prl_sm.c
+++ b/common/usbc/usb_prl_sm.c
@@ -5,7 +5,6 @@
#include "battery.h"
#include "battery_smart.h"
-#include "board.h"
#include "builtin/assert.h"
#include "charge_manager.h"
#include "charge_state.h"
diff --git a/common/usbc/usbc_task.c b/common/usbc/usbc_task.c
index 56ea3d4d10..6384aae879 100644
--- a/common/usbc/usbc_task.c
+++ b/common/usbc/usbc_task.c
@@ -5,7 +5,6 @@
#include "battery.h"
#include "battery_smart.h"
-#include "board.h"
#include "builtin/assert.h"
#include "charge_manager.h"
#include "charge_state.h"
diff --git a/include/config.h b/include/config.h
index eba3134131..76a7f5dcc6 100644
--- a/include/config.h
+++ b/include/config.h
@@ -5752,7 +5752,11 @@
#endif
#include "config_chip.h"
+#ifdef CONFIG_ZEPHYR
+#include "zephyr_shim.h"
+#else
#include "board.h"
+#endif
/*
* Define CONFIG_HOST_ESPI_VW_POWER_SIGNAL if any power signals from the host
diff --git a/zephyr/shim/include/board.h b/zephyr/shim/include/zephyr_shim.h
index 3e12568155..3e12568155 100644
--- a/zephyr/shim/include/board.h
+++ b/zephyr/shim/include/zephyr_shim.h