1 /* 2 * Copyright (c) 2020-2021, Renesas Electronics Corporation. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef RZ_G2_BOARD_H 8 #define RZ_G2_BOARD_H 9 10 enum rzg2_board_id { 11 BOARD_HIHOPE_RZ_G2M = 0, 12 BOARD_HIHOPE_RZ_G2H, 13 BOARD_HIHOPE_RZ_G2N, 14 BOARD_EK874_RZ_G2E, 15 BOARD_UNKNOWN 16 }; 17 18 #define BOARD_REV_UNKNOWN (0xFFU) 19 20 extern const char *g_board_tbl[]; 21 22 /************************************************************************ 23 * Revisions are expressed in 8 bits. 24 * The upper 4 bits are major version. 25 * The lower 4 bits are minor version. 26 ************************************************************************/ 27 #define GET_BOARD_MAJOR(a) ((uint32_t)(a) >> 0x4) 28 #define GET_BOARD_MINOR(a) ((uint32_t)(a) & 0xF) 29 #define GET_BOARD_NAME(a) (g_board_tbl[(a)]) 30 31 void rzg_get_board_type(uint32_t *type, uint32_t *rev); 32 33 #endif /* RZ_G2_BOARD_H */ 34