diff options
author | Scott Collyer <scollyer@google.com> | 2021-03-20 16:34:12 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-10 21:48:42 +0000 |
commit | 8113e3d1f538039477ec4b1461031da770931055 (patch) | |
tree | 5714aa3c9a7bec1530dc7c1095e6e220941a00b3 /include | |
parent | f979f98b8336ad0908f948aa7fe1d57d0a5b54f8 (diff) | |
download | chrome-ec-8113e3d1f538039477ec4b1461031da770931055.tar.gz |
cbi: API for EC to update fw_config tag
This CL adds an API to the CBI to allow the EC to update the FW_CONFIG
tag field. This API is dependent on not having a the chipset task
defined.
BUG=b:164157329
BRANCH=quiche
TEST=Verified on quiche that long button presses toggle bit 0 of the
FW_CONFIG field.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I3a4360b32feac4a04fe53b518c122940f4b340f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776227
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Sam Hurst <shurst@google.com>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/cros_board_info.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/cros_board_info.h b/include/cros_board_info.h index 266e66c5af..7566bd7173 100644 --- a/include/cros_board_info.h +++ b/include/cros_board_info.h @@ -147,6 +147,20 @@ struct cbi_data *cbi_find_tag(const void *cbi, enum cbi_data_tag tag); */ int cbi_board_override(enum cbi_data_tag tag, uint8_t *buf, uint8_t *size); +/** + * Set and update FW_CONFIG tag field + * + * This function is only included when HAS_TASK_CHIPSET is not defined. It is + * intended to be used for projects which want CBI functions, but do not have an + * AP and ectool host command access. + * + * @param fw_config updated value for FW_CONFIG tag + * @return EC_SUCCESS to indicate the field was written correctly. + * EC_ERROR_ACCESS_DENIED to indicate WP is active + * EC_ERROR_UNKNOWN to indicate that the write operation failed + */ +int cbi_set_fw_config(uint32_t fw_config); + #ifdef TEST_BUILD /** * Test only declarations. Firmware shouldn't need them. |