From f0b564b4a031fdc974a98a13308a62a460ae4a69 Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Thu, 16 Feb 2017 14:26:46 -0800 Subject: system: Add generic bbram read / write routines Add generic routines to read or write a byte to battery-backed RAM, and implement vbnvcontext get/set using these routines. BUG=chrome-os-partner:62952 BRANCH=reef TEST=On reef, with subsequent commit, run "cutoff" on the console, reattach AC, and verify device successfully wakes. Also verify Rp is dropped on console 'reboot' and F3 + power from RW. Signed-off-by: Shawn Nematbakhsh Change-Id: I14691923f2e5198e901b6b5199e92c58c68cd18d Reviewed-on: https://chromium-review.googlesource.com/444444 Commit-Ready: Shawn N Tested-by: Shawn N Reviewed-by: Randall Spangler --- chip/nrf51/system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chip/nrf51') diff --git a/chip/nrf51/system.c b/chip/nrf51/system.c index 94c36202e4..61bd2311a8 100644 --- a/chip/nrf51/system.c +++ b/chip/nrf51/system.c @@ -107,13 +107,13 @@ void system_reset(int flags) ; } -int system_get_vbnvcontext(uint8_t *block) +int system_get_bbram(enum system_bbram_idx idx, uint8_t *value) { CPRINTS("TODO: implement %s()", __func__); return EC_ERROR_UNIMPLEMENTED; } -int system_set_vbnvcontext(const uint8_t *block) +int system_set_bbram(enum system_bbram_idx idx, uint8_t value) { CPRINTS("TODO: implement %s()", __func__); return EC_ERROR_UNIMPLEMENTED; -- cgit v1.2.1