summaryrefslogtreecommitdiff
path: root/src/mainboard/google/rush_ryu
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/rush_ryu')
-rw-r--r--src/mainboard/google/rush_ryu/Kconfig1
-rw-r--r--src/mainboard/google/rush_ryu/boardid.c12
2 files changed, 7 insertions, 6 deletions
diff --git a/src/mainboard/google/rush_ryu/Kconfig b/src/mainboard/google/rush_ryu/Kconfig
index 192b9faead..ec6eadb86b 100644
--- a/src/mainboard/google/rush_ryu/Kconfig
+++ b/src/mainboard/google/rush_ryu/Kconfig
@@ -31,6 +31,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select MAINBOARD_HAS_BOOTBLOCK_INIT
select BOARD_ROMSIZE_KB_4096
select VIRTUAL_DEV_SWITCH
+ select TERTIARY_BOARD_ID
config MAINBOARD_DIR
string
diff --git a/src/mainboard/google/rush_ryu/boardid.c b/src/mainboard/google/rush_ryu/boardid.c
index 67e55ba3fb..42a51bd0cf 100644
--- a/src/mainboard/google/rush_ryu/boardid.c
+++ b/src/mainboard/google/rush_ryu/boardid.c
@@ -19,6 +19,7 @@
#include <console/console.h>
#include <soc/nvidia/tegra132/gpio.h>
+#include <stdlib.h>
#include <boardid.h>
@@ -27,12 +28,11 @@ uint8_t board_id(void)
static int id = -1;
if (id < 0) {
- id = gpio_get_in_value(GPIO(Q3)) << 0 |
- gpio_get_in_value(GPIO(T1)) << 1 |
- gpio_get_in_value(GPIO(X1)) << 2 |
- gpio_get_in_value(GPIO(X4)) << 3;
- printk(BIOS_SPEW, "Board ID: %#x.\n", id);
- }
+ gpio_t gpio[] = {GPIO(Q3), GPIO(Q4)};
+
+ id = gpio_get_in_tristate_values(gpio, ARRAY_SIZE(gpio), 0);
+ printk(BIOS_SPEW, "Board TRISTATE ID: %#x.\n", id);
+ }
return id;
}