Angel Pons | 32859fc | 2020-04-02 23:48:27 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Furquan Shaikh | 84bbab9 | 2014-06-24 17:38:03 -0700 | [diff] [blame] | 2 | |
Vadim Bendebury | f9fb0d9 | 2014-07-23 18:32:01 -0700 | [diff] [blame] | 3 | #ifndef __INCLUDE_BOARDID_H__ |
| 4 | #define __INCLUDE_BOARDID_H__ |
Furquan Shaikh | 84bbab9 | 2014-06-24 17:38:03 -0700 | [diff] [blame] | 5 | |
| 6 | #include <stdint.h> |
| 7 | |
Julius Werner | e2f17f7 | 2017-12-05 13:39:10 -0800 | [diff] [blame] | 8 | #define UNDEFINED_STRAPPING_ID (~0) |
| 9 | |
Karthikeyan Ramasubramanian | c80ff84 | 2018-09-17 16:19:34 -0600 | [diff] [blame] | 10 | #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 Werner | 96ed92d | 2017-12-01 19:12:14 -0800 | [diff] [blame] | 19 | uint32_t board_id(void); /* differentiates revisions */ |
| 20 | uint32_t ram_code(void); /* identifies installed DRAM modules */ |
| 21 | uint32_t sku_id(void); /* differentiates other optional components */ |
Furquan Shaikh | 84bbab9 | 2014-06-24 17:38:03 -0700 | [diff] [blame] | 22 | |
Vadim Bendebury | f9fb0d9 | 2014-07-23 18:32:01 -0700 | [diff] [blame] | 23 | #endif /* __INCLUDE_BOARDID_H__ */ |