Merge tag 'u-boot-imx-20200825' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[platform/kernel/u-boot.git] / arch / arm / include / asm / arch-octeontx / soc.h
1 /* 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
22 enum platform {
23         PLATFORM_HW = 0,
24         PLATFORM_EMULATOR = 1,
25         PLATFORM_ASIM = 3,
26 };
27
28 int read_platform(void);
29 u8 read_partnum(void);
30 const char *read_board_name(void);
31 bool read_alt_pkg(void);
32
33 #endif /* __SOC_H */