summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWealian Liao <whliao@nuvoton.corp-partner.google.com>2021-10-15 16:45:47 +0800
committerCommit Bot <commit-bot@chromium.org>2021-11-03 01:29:43 +0000
commit3e8e219853490156968579a71ce42dffddb05415 (patch)
tree431fcbb0a5218494d51f6b825ec604499a377cea /include
parentfc78be657fbfc913ac5cd2441b566fd7de7b9fda (diff)
downloadchrome-ec-3e8e219853490156968579a71ce42dffddb05415.tar.gz
npcx: flash: Fix physical_get_protect_flags()
Protecting status register by /WP works when SRP0 is enabled. The getting protect flags function should check SRP0 & QE for EC_FLASH_PROTECT_ERROR_INCONSISTENT flag. This CL adds the following: 1. SRP0 & QE bits check for npcx flash. 2. EC_FLASH_PROTECT_ERROR_UNKNOWN flag BUG=none BRANCH=none TEST=Protect a range & don't set the SRP0. Check flag by `flashinfo`. Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Iae8645aca7b0d9176e625de3656a35e675df3ef2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3246882 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/ec_commands.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index e317c29e28..a8ea4e31a5 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -1768,6 +1768,8 @@ struct ec_params_flash_erase_v1 {
#define EC_FLASH_PROTECT_ROLLBACK_AT_BOOT BIT(9)
/* Rollback information flash region protected now */
#define EC_FLASH_PROTECT_ROLLBACK_NOW BIT(10)
+/* Error - Unknown error */
+#define EC_FLASH_PROTECT_ERROR_UNKNOWN BIT(11)
/**