From 0bbf03d7c64b6741722adcbe14a1b855f1c05939 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Wed, 15 Aug 2018 00:31:28 -0700 Subject: nocturne: Flip board version reporting. It turns out that BRD_ID3 was not actually the least significant bit in the board version strapping. In actuality, it turned out to be BRD_ID0. This commit simply flips the board version reporting to have BRD_ID0 to be the least significant bit. BUG=b:73260349 BRANCH=None TEST=Flash nocturne; verify that board revision match up with board version table in the schematics. Change-Id: I8a3f3e3dbb5dbdcbdd55793d55c711d8ec9670a4 Signed-off-by: Aseda Aboagye Reviewed-on: https://chromium-review.googlesource.com/1175557 Commit-Ready: Aseda Aboagye Tested-by: Aseda Aboagye Reviewed-by: Furquan Shaikh --- board/nocturne/board.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/board/nocturne/board.c b/board/nocturne/board.c index 4b53b40b22..93452d6ed8 100644 --- a/board/nocturne/board.c +++ b/board/nocturne/board.c @@ -356,14 +356,14 @@ int board_get_version(void) if (board_version == -1) { board_version = 0; - /* BRD_ID3 is LSb. */ - if (gpio_get_level(GPIO_EC_BRD_ID3)) + /* BRD_ID0 is LSb. */ + if (gpio_get_level(GPIO_EC_BRD_ID0)) board_version |= 0x1; - if (gpio_get_level(GPIO_EC_BRD_ID2)) - board_version |= 0x2; if (gpio_get_level(GPIO_EC_BRD_ID1)) + board_version |= 0x2; + if (gpio_get_level(GPIO_EC_BRD_ID2)) board_version |= 0x4; - if (gpio_get_level(GPIO_EC_BRD_ID0)) + if (gpio_get_level(GPIO_EC_BRD_ID3)) board_version |= 0x8; } -- cgit v1.2.1