tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / mainboard / google / nyan_big / boardid.c
blobac361e28ec2a22304245b3a605e3705104910c91
1 /*
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.
16 #include <boardid.h>
17 #include <console/console.h>
18 #include <gpio.h>
19 #include <stdlib.h>
21 uint8_t board_id(void)
23 static int id = -1;
24 gpio_t gpio[] = {[3] = GPIO(X4), [2] = GPIO(X1), /* X4 is MSB */
25 [1] = GPIO(T1), [0] = GPIO(Q3),}; /* Q3 is LSB */
27 if (id < 0) {
28 id = gpio_base3_value(gpio, ARRAY_SIZE(gpio));
30 printk(BIOS_SPEW, "Board TRISTATE ID: %d.\n", id);
33 return id;