summaryrefslogtreecommitdiff
path: root/include/ccd_config.h
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@google.com>2018-05-22 15:55:23 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-30 20:38:53 -0700
commit5a23e3f49ac76e854b51279bc4c2a922ef24339c (patch)
tree541be148b982c8d54267fa6fe60ca05168ce22ea /include/ccd_config.h
parent7b0018521683070cfa5beda948a8ea5278d802cc (diff)
downloadchrome-ec-5a23e3f49ac76e854b51279bc4c2a922ef24339c.tar.gz
cr50: refactor rma mode into factory mode
We're doing a bit of refactoring to break out factory mode into its own file. Now factory reset and rma reset will be two methods of entering factory mode. Factory mode can be disabled with the disable_factory vendor command. Factory mode means all ccd capabilities are set to Always and WP is permanently disabled. When factory mode is disabled, all capabilities are reset to Default and WP is reset to follow battery presence. This adds 56 bytes. BUG=none BRANCH=cr50 TEST=verify rma reset will enable factory mode. Change-Id: I21c6f7b4341e3a18e213e438bbd17c67739b85fa Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1069789 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/ccd_config.h')
-rw-r--r--include/ccd_config.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/ccd_config.h b/include/ccd_config.h
index a71db37bba..7153449883 100644
--- a/include/ccd_config.h
+++ b/include/ccd_config.h
@@ -254,8 +254,11 @@ enum ccd_reset_config_flags {
/* Only reset Always/UnlessLocked settings */
CCD_RESET_UNLOCKED_ONLY = (1 << 1),
- /* Use RMA/factory defaults */
- CCD_RESET_RMA = (1 << 2)
+ /*
+ * Do a factory reset to enable factory mode. Factory mode sets all ccd
+ * capabilities to always and disables write protect
+ */
+ CCD_RESET_FACTORY = (1 << 2)
};
/**
@@ -272,4 +275,9 @@ int ccd_reset_config(unsigned int flags);
*/
void ccd_tpm_reset_callback(void);
+/**
+ * Enter CCD factory mode. This will clear the TPM and do a hard reboot after
+ * updating the ccd config.
+ */
+void enable_ccd_factory_mode(void);
#endif /* __CROS_EC_CCD_CONFIG_H */