blob: dc081c70b2bcba7ece7c6a3301df9f70d23262b1 [file] [log] [blame]
Suneel Garapaticd530282019-10-19 18:32:33 -07001/* SPDX-License-Identifier: GPL-2.0
2 *
3 * Copyright (C) 2018 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#define otx_is_altpkg() read_alt_pkg()
18#define otx_is_soc(soc) (read_partnum() == (soc))
19#define otx_is_board(model) (!strcmp(read_board_name(), model))
20#define otx_is_platform(platform) (read_platform() == (platform))
21
22enum platform {
23 PLATFORM_HW = 0,
24 PLATFORM_EMULATOR = 1,
25 PLATFORM_ASIM = 3,
26};
27
28int read_platform(void);
29u8 read_partnum(void);
30const char *read_board_name(void);
31bool read_alt_pkg(void);
32
33#endif /* __SOC_H */