summaryrefslogtreecommitdiff
path: root/include/flash.h
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2014-10-14 10:05:43 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-10-15 23:56:27 +0000
commitf8fd63f135b5922900ceeb345857070e814f8877 (patch)
treed93f66806f14465810b263e30d49a3e610430acf /include/flash.h
parent847eb1ec44aa43c761799b522b0449bdfc31269a (diff)
downloadchrome-ec-f8fd63f135b5922900ceeb345857070e814f8877.tar.gz
Fix incorrect valid and writable flash flags
The valid and writable flags the EC sends back to the AP are incorrect. They are a little bit different on differnt chips, so let's move it to flash physical layer. This is not any causing problem, but we should fix this. BUG=chrome-os-partner:32745 TEST=make buildall BRANCH=samus Change-Id: Ibcda5ae770f5ea02cde094490997a5bc447df88f Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/222661 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/flash.h')
-rw-r--r--include/flash.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/flash.h b/include/flash.h
index 0c6e11c429..a77d5a1cb2 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -110,6 +110,21 @@ int flash_physical_force_reload(void);
*/
int flash_physical_restore_state(void);
+/**
+ * Return the valid flash protect flags.
+ *
+ * @return a combination of EC_FLASH_PROTECT_* flags from ec_commands.h
+ */
+uint32_t flash_physical_get_valid_flags(void);
+
+/**
+ * Return the writable flash protect flags.
+ *
+ * @param cur_flags The current flash protect flags.
+ * @return a combination of EC_FLASH_PROTECT_* flags from ec_commands.h
+ */
+uint32_t flash_physical_get_writable_flags(uint32_t cur_flags);
+
/*****************************************************************************/
/* Low-level common code for use by flash modules. */