diff options
author | You-Cheng Syu <youcheng@chromium.org> | 2019-04-09 13:04:34 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-08-26 07:49:42 -0700 |
commit | 555a4470c7e6373cb6d5397ea5e9278317bcb008 (patch) | |
tree | 092deb6e16531e651311625d61accc51708eafb6 /chip/host | |
parent | b3470c02db3b03781cc4d7b0a4c7894a342cba1a (diff) | |
download | chrome-ec-555a4470c7e6373cb6d5397ea5e9278317bcb008.tar.gz |
include: Move RESET_FLAG_* into ec_commands.h as EC_RESET_FLAG_*
RESET_FLAGS_* are used when setting/reading the field ec_reset_flags of
struct ec_response_uptime_info, which is defined in ec_commands.h. So it
might be better to put those macros there.
To be consistent with the other macros in the file, add "EC_" prefixes
to them.
BUG=b:109900671,b:118654976
BRANCH=none
TEST=make buildall -j
Cq-Depend: chrome-internal:1054910, chrome-internal:1054911, chrome-internal:1045539
Change-Id: If72ec25f1b34d8d46b74479fb4cd09252102aafa
Signed-off-by: You-Cheng Syu <youcheng@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1520574
Tested-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Ready: Yu-Ping Wu <yupingso@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Yilun Lin <yllin@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'chip/host')
-rw-r--r-- | chip/host/system.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chip/host/system.c b/chip/host/system.c index 86e6625964..b1654911ab 100644 --- a/chip/host/system.c +++ b/chip/host/system.c @@ -6,6 +6,7 @@ /* System module for emulator */ #include "common.h" +#include "ec_commands.h" #include "host_test.h" #include "panic.h" #include "persistence.h" @@ -100,7 +101,7 @@ static uint32_t load_reset_flags(void) uint32_t ret; if (f == NULL) - return RESET_FLAG_POWER_ON; + return EC_RESET_FLAG_POWER_ON; fread(&ret, sizeof(ret), 1, f); release_persistent_storage(f); remove_persistent_storage("reset_flags"); @@ -141,11 +142,11 @@ test_mockable void system_reset(int flags) { uint32_t save_flags = 0; if (flags & SYSTEM_RESET_PRESERVE_FLAGS) - save_flags = system_get_reset_flags() | RESET_FLAG_PRESERVED; + save_flags = system_get_reset_flags() | EC_RESET_FLAG_PRESERVED; if (flags & SYSTEM_RESET_LEAVE_AP_OFF) - save_flags |= RESET_FLAG_AP_OFF; + save_flags |= EC_RESET_FLAG_AP_OFF; if (flags & SYSTEM_RESET_HARD) - save_flags |= RESET_FLAG_HARD; + save_flags |= EC_RESET_FLAG_HARD; if (save_flags) save_reset_flags(save_flags); emulator_reboot(); @@ -158,7 +159,7 @@ test_mockable void system_hibernate(uint32_t seconds, uint32_t microseconds) if (board_hibernate) board_hibernate(); - save_reset_flags(RESET_FLAG_HIBERNATE); + save_reset_flags(EC_RESET_FLAG_HIBERNATE); if (!seconds && !microseconds) exit(EXIT_CODE_HIBERNATE); |