xref: /rk3399_ARM-atf/drivers/renesas/rcar/board/board.h (revision 0a4bf763f3e5b2f67b0d5798a40fb9d0caefd554)
1 /*
2  * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights
3  * reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #ifndef BOARD_H
9 #define BOARD_H
10 
11 #define BOARD_SALVATOR_X		(0x00)
12 #define BOARD_KRIEK			(0x01)
13 #define BOARD_STARTER_KIT		(0x02)
14 #define BOARD_SALVATOR_XS		(0x04)
15 #define BOARD_EBISU			(0x08)
16 #define BOARD_STARTER_KIT_PRE		(0x0B)
17 #define BOARD_EBISU_4D			(0x0DU)
18 #define BOARD_DRAAK			(0x0EU)
19 #define BOARD_UNKNOWN			(BOARD_DRAAK + 1U)
20 
21 #define BOARD_REV_UNKNOWN		(0xFF)
22 
23 extern const char *g_board_tbl[];
24 
25 /************************************************************************
26  * Revisions are expressed in 8 bits.
27  *  The upper 4 bits are major version.
28  *  The lower 4 bits are minor version.
29  ************************************************************************/
30 #define GET_BOARD_MAJOR(a)	((uint32_t)(a) >> 0x4)
31 #define GET_BOARD_MINOR(a)	((uint32_t)(a) &  0xF)
32 #define GET_BOARD_NAME(a)	(g_board_tbl[(a)])
33 
34 int32_t rcar_get_board_type(uint32_t *type, uint32_t *rev);
35 
36 #endif /* BOARD_H */
37