diff options
author | Yuval Peress <peress@chromium.org> | 2021-08-04 11:19:55 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-20 14:32:44 +0000 |
commit | 8270698e589f14239b4942a42b27132af497410b (patch) | |
tree | ea10c53f412c229980ea24a6faf8572295b92f75 /include/system.h | |
parent | d63ba9739b77bece9e0be136dd256c89ce2fd688 (diff) | |
download | chrome-ec-8270698e589f14239b4942a42b27132af497410b.tar.gz |
system: fix system_get_scratchpad API
The current API for system_get_scratchpad mixes the status and the value
being read. Update the signature to allow both.
BRANCH=none
BUG=b:195481980
TEST=make testall && zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I3a5f5ad523d507c53a5d474806f58afafb82e70c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3074828
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/system.h')
-rw-r--r-- | include/system.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/system.h b/include/system.h index 559e97befe..1b1e45c2a1 100644 --- a/include/system.h +++ b/include/system.h @@ -361,9 +361,15 @@ void system_reset(int flags); int system_set_scratchpad(uint32_t value); /** - * Return the current scratchpad register value. + * Get the scratchpad register value. + * + * The scratchpad register maintains its contents across a + * software-requested warm reset. + * + * @param value Where to store the content of the register. + * @return EC_SUCCESS, or non-zero if error. */ -uint32_t system_get_scratchpad(void); +int system_get_scratchpad(uint32_t *value); /** * Return the chip vendor/name/revision string. |