diff options
author | Peter Marheine <pmarheine@chromium.org> | 2022-05-26 17:16:46 +1000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-15 20:24:30 +0000 |
commit | d97acfefaa24708ba699dd1bc316ea2f9f44ec6c (patch) | |
tree | 15cffbfde20a5b15e988addcf93f87d9c3d5c776 /include/chipset.h | |
parent | 8df3ccb897b109609c23859f8128ecc2ea4a23a8 (diff) | |
download | chrome-ec-d97acfefaa24708ba699dd1bc316ea2f9f44ec6c.tar.gz |
chipset: introduce CONFIG_AP_POWER_CONTROL
Because the new Zephyr power sequencing support is gated on a different
config option than HAS_TASK_CHIPSET which code has historically assumed
implies there is an AP present, it is now easy to introduce bugs when
code that applies in both configurations uses the old option test.
This change decouples the presence of an AP from HAS_TASK_CHIPSET,
introducing a new CONFIG_AP_POWER_CONTROL symbol that is derived from
the power sequencing config options. All existing applicable users of
HAS_TASK_CHIPSET are changed to use the new symbol, fixing several
callers which would not behave correctly under Zephyr with the new
power sequencing code.
The duplicate stub implementations of functions provided by Zephyr's
chipset_api are removed, because they already appear in the header
that declares those functions.
BUG=b:233681784
TEST=make buildall, zmake testall
BRANCH=none
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: I282da30839ca52fcc88c6f9dea2bd00d4811b976
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3670735
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/chipset.h')
-rw-r--r-- | include/chipset.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/chipset.h b/include/chipset.h index 51a9018dfb..840db3aa60 100644 --- a/include/chipset.h +++ b/include/chipset.h @@ -48,7 +48,7 @@ enum critical_shutdown { CRITICAL_SHUTDOWN_CUTOFF, }; -#if defined(HAS_TASK_CHIPSET) || defined(CONFIG_ZEPHYR) +#ifdef CONFIG_AP_POWER_CONTROL /** * Check if chipset is in a given state. @@ -125,7 +125,7 @@ void chipset_pre_init_callback(void); */ void init_reset_log(void); -#else /* !HAS_TASK_CHIPSET */ +#else /* !CONFIG_AP_POWER_CONTROL */ /* When no chipset is present, assume it is always off. */ static inline int chipset_in_state(int state_mask) @@ -156,7 +156,7 @@ static inline void chipset_watchdog_interrupt(enum gpio_signal signal) { } static inline void init_reset_log(void) { } -#endif /* !HAS_TASK_CHIPSET */ +#endif /* !CONFIG_AP_POWER_CONTROL */ /** * Optional chipset check if PLTRST# is valid. |