blob: dfa9532df0b05d1383f430db7da452ca7d12d2a2 [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Furquan Shaikh84bbab92014-06-24 17:38:03 -07002
Vadim Bendeburyf9fb0d92014-07-23 18:32:01 -07003#ifndef __INCLUDE_BOARDID_H__
4#define __INCLUDE_BOARDID_H__
Furquan Shaikh84bbab92014-06-24 17:38:03 -07005
6#include <stdint.h>
7
Julius Wernere2f17f72017-12-05 13:39:10 -08008#define UNDEFINED_STRAPPING_ID (~0)
9
Karthikeyan Ramasubramanianc80ff842018-09-17 16:19:34 -060010#define BOARD_ID_UNKNOWN ~((uint32_t)0) /* unsigned equivalent to -1 */
11#define BOARD_ID_INIT ~((uint32_t)1) /* unsigned equivalent to -2 */
12/**
13 * board_id() - Get the board version
14 *
15 * Return: board version on success, BOARD_ID_UNKNOWN on failure/error.
16 *
17 * This function is used to get the mainboard version.
18 */
Julius Werner96ed92d2017-12-01 19:12:14 -080019uint32_t board_id(void); /* differentiates revisions */
20uint32_t ram_code(void); /* identifies installed DRAM modules */
21uint32_t sku_id(void); /* differentiates other optional components */
Furquan Shaikh84bbab92014-06-24 17:38:03 -070022
Vadim Bendeburyf9fb0d92014-07-23 18:32:01 -070023#endif /* __INCLUDE_BOARDID_H__ */