blob: f240fca95020fa4c8286c0bd9ca202819c7909a0 [file] [log] [blame]
Aaron Durbinebe148d2016-07-06 22:53:51 -05001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2015 Google Inc.
5 * Copyright (C) 2015 Intel Corporation
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.
15 */
16
Aaron Durbin10d67cb2016-09-02 16:56:03 -050017#include <baseboard/variants.h>
Aaron Durbinebe148d2016-07-06 22:53:51 -050018#include <boardid.h>
Aaron Durbin10d67cb2016-09-02 16:56:03 -050019#include <stddef.h>
Aaron Durbinebe148d2016-07-06 22:53:51 -050020
21uint8_t board_id(void)
22{
23 MAYBE_STATIC int id = -1;
24
25 if (id < 0)
Aaron Durbin10d67cb2016-09-02 16:56:03 -050026 id = variant_board_id();
Aaron Durbinebe148d2016-07-06 22:53:51 -050027
28 return id;
29}