armv8/fsl-ch3: Add support to print SoC personality
[platform/kernel/u-boot.git] / arch / arm / include / asm / arch-fsl-lsch3 / soc.h
1 /*
2  * Copyright 2015 Freescale Semiconductor
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 struct cpu_type {
8         char name[15];
9         u32 soc_ver;
10         u32 num_cores;
11 };
12
13 #define CPU_TYPE_ENTRY(n, v, nc) \
14         { .name = #n, .soc_ver = SVR_##v, .num_cores = (nc)}
15
16 #define SVR_WO_E                0xFFFFFE
17 #define SVR_LS2045              0x870120
18 #define SVR_LS2080              0x870110
19 #define SVR_LS2085              0x870100
20
21 #define SVR_MAJ(svr)            (((svr) >> 4) & 0xf)
22 #define SVR_MIN(svr)            (((svr) >> 0) & 0xf)
23 #define SVR_SOC_VER(svr)        (((svr) >> 8) & SVR_WO_E)
24 #define IS_E_PROCESSOR(svr)     (!((svr >> 8) & 0x1))
25
26 void fsl_lsch3_early_init_f(void);
27 void cpu_name(char *name);
28