summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorChe-Liang Chiou <clchiou@chromium.org>2012-06-22 18:18:17 +0800
committerGerrit <chrome-bot@google.com>2012-09-05 16:00:28 -0700
commit8a9471e5ef305a2aea81e6cb62a17d6966865b6b (patch)
tree73f9deda68cd4e76d646a6c2ba15aa0bd8913622 /include/system.h
parent696b908f53a9d33bc9ce1a676ee646f45d489ee5 (diff)
downloadchrome-ec-8a9471e5ef305a2aea81e6cb62a17d6966865b6b.tar.gz
stm32: Store VbNvContext in backup registers
This would improve boot speed when compared to storing in eMMC because initialing eMMC is slow. So far other platforms do not have this need because CMOS is quite efficient; thus it is left unimplemented in lm4. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org> BRANCH=snow BUG=chrome-os-partner:10660,13094 TEST=On Snow, see VbNvContext is preserved across power cycles (you have to patch U-Boot to test this) Change-Id: If5072c678b87bc47a3a82a1dff2afa3896304f36 Reviewed-on: https://gerrit.chromium.org/gerrit/31832 Tested-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
index f3d5b035d6..1385c4d006 100644
--- a/include/system.h
+++ b/include/system.h
@@ -173,6 +173,16 @@ const char *system_get_chip_name(void);
const char *system_get_chip_revision(void);
/**
+ * Get/Set VbNvContext in non-volatile storage. The block should be 16 bytes
+ * long, which is the current size of VbNvContext block.
+ *
+ * @param block Pointer to a buffer holding VbNvContext.
+ * @return 0 on success, !0 on error.
+ */
+int system_get_vbnvcontext(uint8_t *block);
+int system_set_vbnvcontext(const uint8_t *block);
+
+/**
* Put the EC in hibernate (lowest EC power state).
*
* @param seconds Number of seconds to hibernate.