2 * This file is part of the coreboot project.
4 * Copyright 2014 Google Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 #include <console/console.h>
21 uint8_t board_id(void)
24 gpio_t gpio
[] = {[3] = GPIO(X4
), [2] = GPIO(X1
), /* X4 is MSB */
25 [1] = GPIO(T1
), [0] = GPIO(Q3
),}; /* Q3 is LSB */
28 id
= gpio_base3_value(gpio
, ARRAY_SIZE(gpio
));
30 printk(BIOS_SPEW
, "Board TRISTATE ID: %d.\n", id
);