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 /common/cbi.c | |
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 'common/cbi.c')
-rw-r--r-- | common/cbi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/cbi.c b/common/cbi.c index 217dffd6f4..e18f15e5a9 100644 --- a/common/cbi.c +++ b/common/cbi.c @@ -5,6 +5,7 @@ * Cros Board Info */ +#include "chipset.h" #include "common.h" #include "console.h" #include "crc8.h" @@ -546,7 +547,7 @@ DECLARE_CONSOLE_COMMAND(cbi, cc_cbi, "[set <tag> <value> <size> | " "Print or change Cros Board Info from flash"); #endif /* CONFIG_CMD_CBI */ -#ifndef HAS_TASK_CHIPSET +#ifndef CONFIG_AP_POWER_CONTROL int cbi_set_fw_config(uint32_t fw_config) { /* Check write protect status */ |