diff options
author | Aseda Aboagye <aaboagye@google.com> | 2021-07-22 16:41:59 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-29 20:36:11 +0000 |
commit | dd9b5de765fd683a2e25cbfe83925d71fe524be2 (patch) | |
tree | a7967998b1d539c49256008a4eafa9f9777740c0 /include/config.h | |
parent | 5e07ac82ecf51aff07a8def8a4bae1330c426b22 (diff) | |
download | chrome-ec-dd9b5de765fd683a2e25cbfe83925d71fe524be2.tar.gz |
cbi: Add CONFIG_EEPROM_CBI_WP
This commit adds the config option, CONFIG_EEPROM_CBI_WP. It is to be
defined when the EC directly controls the CBI EEPROM WP signal. The EC
will set the WP according to the result of `system_is_locked()`. Note
that once the WP is set, the EC must be reset via EC_RST_ODL in order
for the WP to become unset. This is enabled by the accompanying
hardware.
BUG=b:181769483
BRANCH=None
TEST=`make -j buildall`
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: If490594ab4dd24af98119b01299215b997913b66
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3046412
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r-- | include/config.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/include/config.h b/include/config.h index 11733d38df..2f8cf39076 100644 --- a/include/config.h +++ b/include/config.h @@ -5176,6 +5176,14 @@ */ #undef CONFIG_CBI_EEPROM +/* + * Define this if the EC has exclusive control over the CBI EEPROM WP signal. + * The accompanying hardware must ensure that the CBI WP gets latched and is + * only reset when EC_RST_ODL is asserted. GPIO_EC_CBI_WP must be set up for + * the board. + */ +#undef CONFIG_EEPROM_CBI_WP + /* Define this to support Cros Board Info from GPIO. */ #undef CONFIG_CBI_GPIO @@ -6366,10 +6374,23 @@ #define ALS_COUNT 0 #endif /* CONFIG_ALS */ + +/* + * If the EC has exclusive control over CBI EEPROM WP, don't consult the main + * flash WP. + */ +#ifdef CONFIG_EEPROM_CBI_WP +#define CONFIG_BYPASS_CBI_EEPROM_WP_CHECK +#endif + +#if defined(CONFIG_EEPROM_CBI_WP) && !defined(CONFIG_CBI_EEPROM) +#error "CONFIG_EEPROM_CBI_WP requires CONFIG_CBI_EEPROM to be defined!" +#endif + #if defined(CONFIG_BYPASS_CBI_EEPROM_WP_CHECK) && \ - !defined(CONFIG_SYSTEM_UNLOCKED) + !defined(CONFIG_SYSTEM_UNLOCKED) && !defined(CONFIG_EEPROM_CBI_WP) #error "CONFIG_BYPASS_CBI_EEPROM_WP_CHECK is only permitted " \ - "when CONFIG_SYSTEM_UNLOCK is also enabled." + "when CONFIG_SYSTEM_UNLOCK or CONFIG_EEPROM_CBI_WP is also enabled." #endif /* CONFIG_BYPASS_CBI_EEPROM_WP_CHECK && !CONFIG_SYSTEM_UNLOCK */ #if defined(CONFIG_BOARD_VERSION_CBI) && defined(CONFIG_BOARD_VERSION_GPIO) |