summaryrefslogtreecommitdiff
path: root/chip/mt_scp/mt8183/system.c
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-08-04 11:19:55 -0600
committerCommit Bot <commit-bot@chromium.org>2021-08-20 14:32:44 +0000
commit8270698e589f14239b4942a42b27132af497410b (patch)
treeea10c53f412c229980ea24a6faf8572295b92f75 /chip/mt_scp/mt8183/system.c
parentd63ba9739b77bece9e0be136dd256c89ce2fd688 (diff)
downloadchrome-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 'chip/mt_scp/mt8183/system.c')
-rw-r--r--chip/mt_scp/mt8183/system.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/chip/mt_scp/mt8183/system.c b/chip/mt_scp/mt8183/system.c
index dc822e47d5..03f39298c9 100644
--- a/chip/mt_scp/mt8183/system.c
+++ b/chip/mt_scp/mt8183/system.c
@@ -35,9 +35,10 @@ int system_set_scratchpad(uint32_t value)
return EC_SUCCESS;
}
-uint32_t system_get_scratchpad(void)
+int system_get_scratchpad(uint32_t *value)
{
- return SCP_GPR[0] & 0xffff;
+ *value = SCP_GPR[0] & 0xffff;
+ return EC_SUCCESS;
}
const char *system_get_chip_vendor(void)