blob: 7bb2a0626b12d39139b67870643c8eec59859bc9 [file] [log] [blame]
Jorge Ramirez-Ortiz268162f2018-09-23 09:39:11 +02001/*
2 * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights
3 * reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00008#ifndef BOARD_H
9#define BOARD_H
Jorge Ramirez-Ortiz268162f2018-09-23 09:39:11 +020010
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_UNKNOWN (BOARD_EBISU_4D + 1U)
19
20#define BOARD_REV_UNKNOWN (0xFF)
21
22extern const char *g_board_tbl[];
23
24/************************************************************************
25 * Revisions are expressed in 8 bits.
26 * The upper 4 bits are major version.
27 * The lower 4 bits are minor version.
28 ************************************************************************/
29#define GET_BOARD_MAJOR(a) ((uint32_t)(a) >> 0x4)
30#define GET_BOARD_MINOR(a) ((uint32_t)(a) & 0xF)
31#define GET_BOARD_NAME(a) (g_board_tbl[(a)])
32
33int32_t rcar_get_board_type(uint32_t *type, uint32_t *rev);
34
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000035#endif /* BOARD_H */