]> git.ipfire.org Git - thirdparty/u-boot.git/blob - include/fsl_errata.h
memory: ti-gpmc: use printf to dump settings/timings
[thirdparty/u-boot.git] / include / fsl_errata.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * Copyright 2013 - 2015 Freescale Semiconductor, Inc.
4 */
5
6 #ifndef _FSL_ERRATA_H
7 #define _FSL_ERRATA_H
8
9 #if defined(CONFIG_PPC)
10 #include <asm/processor.h>
11 #elif defined(CONFIG_ARCH_LS1021A)
12 #include <asm/arch-ls102xa/immap_ls102xa.h>
13 #elif defined(CONFIG_FSL_LAYERSCAPE)
14 #include <asm/arch/soc.h>
15 #endif
16
17
18 #ifdef CONFIG_SYS_FSL_ERRATUM_A006379
19 static inline bool has_erratum_a006379(void)
20 {
21 u32 svr = get_svr();
22 if (((SVR_SOC_VER(svr) == SVR_T4240) && SVR_MAJ(svr) <= 1) ||
23 ((SVR_SOC_VER(svr) == SVR_T4160) && SVR_MAJ(svr) <= 1) ||
24 ((SVR_SOC_VER(svr) == SVR_T4080) && SVR_MAJ(svr) <= 1) ||
25 ((SVR_SOC_VER(svr) == SVR_B4860) && SVR_MAJ(svr) <= 2) ||
26 ((SVR_SOC_VER(svr) == SVR_B4420) && SVR_MAJ(svr) <= 2) ||
27 ((SVR_SOC_VER(svr) == SVR_T2080) && SVR_MAJ(svr) <= 1) ||
28 ((SVR_SOC_VER(svr) == SVR_T2081) && SVR_MAJ(svr) <= 1))
29 return true;
30
31 return false;
32 }
33 #endif
34
35 #ifdef CONFIG_SYS_FSL_ERRATUM_A007186
36 static inline bool has_erratum_a007186(void)
37 {
38 u32 svr = get_svr();
39 u32 soc = SVR_SOC_VER(svr);
40
41 switch (soc) {
42 case SVR_T4240:
43 return IS_SVR_REV(svr, 2, 0);
44 case SVR_T4160:
45 return IS_SVR_REV(svr, 2, 0);
46 case SVR_B4860:
47 return IS_SVR_REV(svr, 2, 0);
48 case SVR_B4420:
49 return IS_SVR_REV(svr, 2, 0);
50 case SVR_T2081:
51 case SVR_T2080:
52 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
53 }
54
55 return false;
56 }
57 #endif
58
59 #ifdef CONFIG_SYS_FSL_ERRATUM_A008378
60 static inline bool has_erratum_a008378(void)
61 {
62 u32 svr = get_svr();
63 u32 soc = SVR_SOC_VER(svr);
64
65
66 switch (soc) {
67 #ifdef CONFIG_ARCH_LS1021A
68 case SOC_VER_LS1020:
69 case SOC_VER_LS1021:
70 case SOC_VER_LS1022:
71 case SOC_VER_SLS1020:
72 return IS_SVR_REV(svr, 1, 0);
73 #endif
74 #ifdef CONFIG_PPC
75 case SVR_T1023:
76 case SVR_T1024:
77 return IS_SVR_REV(svr, 1, 0);
78 case SVR_T1020:
79 case SVR_T1022:
80 case SVR_T1040:
81 case SVR_T1042:
82 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
83 #endif
84 default:
85 return false;
86 }
87 }
88 #endif
89
90 #endif /* _FSL_ERRATA_H */