diff options
author | Duncan Laurie <dlaurie@google.com> | 2017-08-08 07:30:20 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-02 21:41:44 +0000 |
commit | ee80da857da052809b34746e87ee58651e913194 (patch) | |
tree | c080093336bac3d63d5442726331c629af6d7575 | |
parent | ca54ec42cbf8b3164529ed4e4425879fa774004b (diff) | |
download | chrome-ec-ee80da857da052809b34746e87ee58651e913194.tar.gz |
eve: Clean up board version defines
Add missing defines and use this enum instead of numbers
throughout board.c.
BUG=b:35581264
BRANCH=eve
TEST=make -j BOARD=eve
Change-Id: I5bbe1f67748942ed3a62db9f5d47ef9753cfb16d
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/611015
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2320252
Tested-by: Patryk Duda <pdk@semihalf.com>
Commit-Queue: Patryk Duda <pdk@semihalf.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r-- | board/eve/board.c | 4 | ||||
-rw-r--r-- | board/eve/board.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/board/eve/board.c b/board/eve/board.c index f3765e3f44..d26ec8fb28 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -466,7 +466,7 @@ int board_has_working_reset_flags(void) int version = board_get_version(); /* board version P1b to EVTb will lose reset flags on power cycle */ - if (version >= 3 && version < 6) + if (version >= BOARD_VERSION_P1B && version <= BOARD_VERSION_EVTB) return 0; /* All other board versions should have working reset flags */ @@ -505,7 +505,7 @@ static void board_init(void) board_update_ac_status(); #ifndef TEST_BUILD - if (board_get_version() == 4) { + if (board_get_version() == BOARD_VERSION_EVT) { /* Set F13 to new defined key on EVT */ CPRINTS("Overriding F13 scan code"); set_scancode_set2(3, 9, 0xe007); diff --git a/board/eve/board.h b/board/eve/board.h index 8a9a9f2faa..d710a8ddcc 100644 --- a/board/eve/board.h +++ b/board/eve/board.h @@ -210,7 +210,9 @@ enum board_version_list { BOARD_VERSION_P1, BOARD_VERSION_P1B, BOARD_VERSION_EVT, + BOARD_VERSION_EVTB, BOARD_VERSION_DVT, + BOARD_VERSION_DVTB, BOARD_VERSION_PVT, }; |