summaryrefslogtreecommitdiff
path: root/common/charger.c
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2017-07-23 00:36:27 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-27 17:47:58 +0000
commit8bae64484f8b655415acfb7ff84051b40bade659 (patch)
tree9ad2a38f15a5d8f139e6dd92927dd558906d1f79 /common/charger.c
parent38285ff21c3da34e8c9ae1c33bc7623ef7447195 (diff)
downloadchrome-ec-8bae64484f8b655415acfb7ff84051b40bade659.tar.gz
system_is_locked: Use static variable to track state
When CONFIG_SYSTEM_UNLOCKED is not defined the function to check if flash is write protected (flash_get_protect()) can take up to 7ms to execute, and this function is called up to 18 times when booting from RO. Use a static variable to track the status so we do not spend so long executing this one function. Without this change I would regularly see a PD hard reset when booting without a battery and the system would fail to boot. BUG=b:63957122 BRANCH=eve TEST=manual testing to reliably boot without a battery on Eve Change-Id: I806a215b5745b41ce0d99aeb6853ebfecb0cb7d1 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/582542 Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2320002 Tested-by: Patryk Duda <pdk@semihalf.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Patryk Duda <pdk@semihalf.com>
Diffstat (limited to 'common/charger.c')
0 files changed, 0 insertions, 0 deletions