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