blob: 9cf6628da4bf6e29ac7de5484f9d0179a6f804dd [file] [log] [blame]
Suneel Garapati81526d52019-10-19 18:35:54 -07001/* SPDX-License-Identifier: GPL-2.0
2 *
3 * Copyright (C) 2019 Marvell International Ltd.
4 *
5 * https://spdx.org/licenses
6 */
7
8#ifndef __SOC_H__
9#define __SOC_H__
10
11/* Product PARTNUM */
12#define CN81XX 0xA2
13#define CN83XX 0xA3
14#define CN96XX 0xB2
15#define CN95XX 0xB3
16
17/* Register defines */
18
19#define otx_is_soc(soc) (read_partnum() == (soc))
20#define otx_is_board(model) (!strcmp(read_board_name(), model))
21#define otx_is_platform(platform) (read_platform() == (platform))
22
23enum platform_t {
24 PLATFORM_HW = 0,
25 PLATFORM_EMULATOR = 1,
26 PLATFORM_ASIM = 3,
27};
28
29int read_platform(void);
30u8 read_partnum(void);
31const char *read_board_name(void);
32
33#endif /* __SOC_H */