diff options
author | Randall Spangler <rspangler@chromium.org> | 2017-08-15 17:36:10 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-17 01:56:48 -0700 |
commit | f2b3aa47a6e2b11ef1888219284ef0f727944ef2 (patch) | |
tree | f02c02800f732e4bcb5baca8e28c65b3eb70372b /common | |
parent | bcadda6d1061504da7f2c3a6bee01879955e8fe7 (diff) | |
download | chrome-ec-f2b3aa47a6e2b11ef1888219284ef0f727944ef2.tar.gz |
cr50: Add helper functions for device-is-enabled
A subsequent CL will massively refactor the device state machines.
Add the helper functions which will be used by that CL, so that
the refactoring touches fewer files.
No change in functionality.
BUG=none
BRANCH=cr50
TEST=make buildall; boot cr50 with a CR50_DEV=1 image
Change-Id: I3499d45e93fa15b6de9c04ce398d1c5bfbbc01e9
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/616300
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/tpm_registers.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/tpm_registers.c b/common/tpm_registers.c index 1fb0baef0b..b8d522a460 100644 --- a/common/tpm_registers.c +++ b/common/tpm_registers.c @@ -11,7 +11,6 @@ #include "byteorder.h" #include "console.h" -#include "device_state.h" #include "extension.h" #include "link_defs.h" #include "nvmem.h" @@ -829,7 +828,7 @@ void tpm_task(void) * up. No need to worry about the AP state in chip factory * mode of course. */ - while (device_get_state(DEVICE_AP) != DEVICE_STATE_ON) { + while (!ap_is_on()) { /* * The only event we should expect at this point would * be the reset request. |