t132: ryu: Correct how board id is retrieved
Two changes: 1. A44 ID straps use different gpio pins than nyan. 2. A44 uses tristate values instead two state values. BUG=none BRANCH=none TEST=Built and tested on A44 board. Change-Id: I6a36f6da0c9f6168780606ba76595c7a0af8e8bf Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 2eb0cae0e3396da1eaeaa72411c4b74300138a7b Original-Change-Id: Ia2a4309d3b63b0a94d79465dd727b01fae01e1b9 Original-Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com> Original-Reviewed-on: https://chromium-review.googlesource.com/211753 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/8920 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
573e21132f
commit
6d7c9acc17
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue