Biju Das | 40e8073 | 2020-12-07 16:29:22 +0000 | [diff] [blame] | 1 | /* |
Lad Prabhakar | e1c0f74 | 2020-12-21 13:51:58 +0000 | [diff] [blame] | 2 | * Copyright (c) 2020-2021, Renesas Electronics Corporation. All rights reserved. |
Biju Das | 40e8073 | 2020-12-07 16:29:22 +0000 | [diff] [blame] | 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, |
Lad Prabhakar | e1c0f74 | 2020-12-21 13:51:58 +0000 | [diff] [blame] | 12 | BOARD_HIHOPE_RZ_G2H, |
Lad Prabhakar | 21d04f0 | 2021-03-19 12:01:00 +0000 | [diff] [blame] | 13 | BOARD_HIHOPE_RZ_G2N, |
Lad Prabhakar | ea64734 | 2021-03-19 12:14:01 +0000 | [diff] [blame] | 14 | BOARD_EK874_RZ_G2E, |
Biju Das | 40e8073 | 2020-12-07 16:29:22 +0000 | [diff] [blame] | 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 */ |