pchandri | 3657eef | 2015-08-06 10:26:00 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Duncan Laurie | 88b21f3 | 2015-09-04 10:24:40 -0700 | [diff] [blame] | 4 | * Copyright (C) 2015 Google Inc. |
| 5 | * Copyright (C) 2015 Intel Corporation |
pchandri | 3657eef | 2015-08-06 10:26:00 -0700 | [diff] [blame] | 6 | * |
| 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. |
pchandri | 3657eef | 2015-08-06 10:26:00 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #include <boardid.h> |
| 18 | #include <ec/google/chromeec/ec.h> |
| 19 | |
pchandri | 3657eef | 2015-08-06 10:26:00 -0700 | [diff] [blame] | 20 | uint8_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 | } |