From d0a914b5b4537021da6b170abeca18503b90cee2 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Fri, 6 Nov 2020 15:48:25 -0700 Subject: zephyr: move shimmed_tasks.h include to config.h Unfortunately, many things in config.h rely on HAS_TASK_* to be defined before we start processing config.h. Move this include a little sooner so we have it then. BUG=b:172678200 BRANCH=none TEST=compiles with host_command.c added Signed-off-by: Jack Rosenthal Change-Id: I791426b78777997748eff2c91210b8a426d9a8ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2522970 Reviewed-by: Simon Glass Reviewed-by: Jett Rink --- include/config.h | 9 +++++++++ zephyr/shim/include/board.h | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/config.h b/include/config.h index ac77790ab5..c6bb05c578 100644 --- a/include/config.h +++ b/include/config.h @@ -18,6 +18,15 @@ #ifndef __CROS_EC_CONFIG_H #define __CROS_EC_CONFIG_H +/* + * When building for Zephyr, a shimmed_tasks.h header may be defined + * to create all the HAS_TASK_* definitions. Since those are used in + * config.h, we need to include that header first. + */ +#ifdef CONFIG_SHIMMED_TASKS +#include "shimmed_tasks.h" +#endif + #ifdef INCLUDE_ENV_CONFIG /* * When building for an EC target, pick up the .h file which allows to diff --git a/zephyr/shim/include/board.h b/zephyr/shim/include/board.h index 186edb5864..2a54b097b0 100644 --- a/zephyr/shim/include/board.h +++ b/zephyr/shim/include/board.h @@ -15,9 +15,4 @@ #include #endif -/* Once SHIMMED_TASKS is enabled, must provide a shimmed_tasks header */ -#ifdef CONFIG_SHIMMED_TASKS -#include "shimmed_tasks.h" -#endif - #endif /* __BOARD_H */ -- cgit v1.2.1