blob: 4eb9f4869df688515267b5a9c064a57d841962e3 [file] [log] [blame]
pchandri3657eef2015-08-06 10:26:00 -07001/*
2 * This file is part of the coreboot project.
3 *
Duncan Laurie88b21f32015-09-04 10:24:40 -07004 * Copyright (C) 2015 Google Inc.
5 * Copyright (C) 2015 Intel Corporation
pchandri3657eef2015-08-06 10:26:00 -07006 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
pchandri3657eef2015-08-06 10:26:00 -070015 */
16
17#include <boardid.h>
18#include <ec/google/chromeec/ec.h>
19
pchandri3657eef2015-08-06 10:26:00 -070020uint8_t board_id(void)
21{
22 MAYBE_STATIC int id = -1;
23
24 if (id < 0)
25 id = google_chromeec_get_board_version();
26
27 return id;
28}