blob: c0c3d0cda36f245fc3ac99b4f8e81e46bae0917d [file] [log] [blame]
Biju Das40e80732020-12-07 16:29:22 +00001/*
2 * Copyright (c) 2020, 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
10enum rzg2_board_id {
11 BOARD_HIHOPE_RZ_G2M = 0,
12 BOARD_UNKNOWN
13};
14
15#define BOARD_REV_UNKNOWN (0xFFU)
16
17extern const char *g_board_tbl[];
18
19/************************************************************************
20 * Revisions are expressed in 8 bits.
21 * The upper 4 bits are major version.
22 * The lower 4 bits are minor version.
23 ************************************************************************/
24#define GET_BOARD_MAJOR(a) ((uint32_t)(a) >> 0x4)
25#define GET_BOARD_MINOR(a) ((uint32_t)(a) & 0xF)
26#define GET_BOARD_NAME(a) (g_board_tbl[(a)])
27
28void rzg_get_board_type(uint32_t *type, uint32_t *rev);
29
30#endif /* RZ_G2_BOARD_H */